From f75d3fc087e86394d29151ee3514ed4647e68802 Mon Sep 17 00:00:00 2001 From: coderzc Date: Tue, 20 Aug 2024 12:24:08 +0800 Subject: [PATCH] Migrate project to computer directory --- .github/workflows/ci.yml | 1 + computer-algorithm/pom.xml | 78 - .../betweenness/BetweennessCentrality.java | 190 - .../BetweennessCentralityParams.java | 46 - .../betweenness/BetweennessMessage.java | 88 - .../betweenness/BetweennessValue.java | 71 - .../closeness/ClosenessCentrality.java | 166 - .../closeness/ClosenessCentralityParams.java | 45 - .../closeness/ClosenessMessage.java | 87 - .../centrality/closeness/ClosenessValue.java | 42 - .../centrality/degree/DegreeCentrality.java | 124 - .../degree/DegreeCentralityParams.java | 45 - .../centrality/pagerank/PageRank.java | 153 - .../centrality/pagerank/PageRank4Master.java | 101 - .../centrality/pagerank/PageRankParams.java | 44 - .../cc/ClusteringCoefficientOutput.java | 61 - .../cc/ClusteringCoefficientParams.java | 42 - .../cc/ClusteringCoefficientValue.java | 92 - .../algorithm/community/kcore/Kcore.java | 122 - .../community/kcore/KcoreParams.java | 41 - .../algorithm/community/kcore/KcoreValue.java | 100 - .../computer/algorithm/community/lpa/Lpa.java | 99 - .../algorithm/community/lpa/LpaParams.java | 38 - .../trianglecount/TriangleCount.java | 116 - .../trianglecount/TriangleCountParams.java | 42 - .../algorithm/community/wcc/WccParams.java | 41 - .../algorithm/path/rings/RingsDetection.java | 114 - .../path/rings/RingsDetectionOutput.java | 48 - .../path/rings/filter/FilterDescribe.java | 83 - .../rings/filter/RingsDetectionMessage.java | 76 - .../filter/RingsDetectionWithFilter.java | 121 - .../RingsDetectionWithFilterParams.java | 42 - .../path/rings/filter/SpreadFilter.java | 155 - .../algorithm/path/shortest/QuantityType.java | 25 - .../shortest/SingleSourceShortestPath.java | 285 -- .../SingleSourceShortestPathCombiner.java | 30 - .../SingleSourceShortestPathMaster.java | 47 - .../SingleSourceShortestPathOutput.java | 56 - .../SingleSourceShortestPathValue.java | 103 - .../algorithm/sampling/RandomWalk.java | 389 -- .../algorithm/sampling/RandomWalkMessage.java | 96 - .../algorithm/sampling/RandomWalkOutput.java | 48 - .../algorithm/sampling/RandomWalkParams.java | 44 - computer-api/pom.xml | 41 - .../computer/algorithm/AlgorithmParams.java | 75 - .../computer/core/aggregator/Aggregator.java | 91 - .../core/aggregator/Aggregator4Master.java | 78 - .../core/aggregator/Aggregator4Worker.java | 65 - .../computer/core/allocator/Allocator.java | 32 - .../computer/core/allocator/Recyclable.java | 21 - .../core/allocator/RecyclerReference.java | 43 - .../computer/core/combiner/Combiner.java | 53 - .../core/combiner/DoubleValueSumCombiner.java | 33 - .../core/combiner/FloatValueSumCombiner.java | 33 - .../core/combiner/IdListMergeCombiner.java | 39 - .../core/combiner/IdSetMergeCombiner.java | 30 - .../core/combiner/IntValueSumCombiner.java | 33 - .../core/combiner/LongValueSumCombiner.java | 33 - .../combiner/MergeNewPropertiesCombiner.java | 53 - .../combiner/MergeOldPropertiesCombiner.java | 53 - .../core/combiner/OverwriteCombiner.java | 33 - .../combiner/OverwritePropertiesCombiner.java | 39 - .../core/combiner/ValueMaxCombiner.java | 37 - .../core/combiner/ValueMinCombiner.java | 37 - .../computer/core/common/Constants.java | 75 - .../computer/core/common/SerialEnum.java | 53 - .../common/exception/ComputerException.java | 54 - .../computer/core/config/ComputerOptions.java | 1024 ----- .../computer/core/config/Config.java | 50 - .../computer/core/config/DefaultConfig.java | 203 - .../computer/core/config/EdgeFrequency.java | 42 - .../computer/core/config/HotConfig.java | 49 - .../hugegraph/computer/core/config/Null.java | 30 - .../computer/core/graph/GraphFactory.java | 76 - .../computer/core/graph/edge/Edge.java | 44 - .../computer/core/graph/edge/Edges.java | 25 - .../hugegraph/computer/core/graph/id/Id.java | 29 - .../computer/core/graph/id/IdFactory.java | 107 - .../graph/properties/DefaultProperties.java | 129 - .../core/graph/properties/Properties.java | 41 - .../core/graph/value/BooleanValue.java | 109 - .../core/graph/value/DoubleValue.java | 132 - .../computer/core/graph/value/IdList.java | 55 - .../computer/core/graph/value/IdSet.java | 114 - .../computer/core/graph/value/IntValue.java | 132 - .../computer/core/graph/value/ListValue.java | 248 -- .../computer/core/graph/value/LongValue.java | 132 - .../computer/core/graph/value/MapValue.java | 166 - .../computer/core/graph/value/NullValue.java | 101 - .../core/graph/value/StringValue.java | 102 - .../computer/core/graph/value/Value.java | 106 - .../computer/core/graph/value/ValueType.java | 70 - .../computer/core/graph/vertex/Vertex.java | 60 - .../computer/core/input/InputFilter.java | 32 - .../computer/core/io/BytesInput.java | 21 - .../computer/core/io/BytesOutput.java | 33 - .../computer/core/io/GraphComputeInput.java | 36 - .../computer/core/io/GraphComputeOutput.java | 37 - .../computer/core/io/GraphInput.java | 21 - .../computer/core/io/GraphOutput.java | 22 - .../core/io/GraphWritebackOutput.java | 36 - .../computer/core/io/RandomAccessInput.java | 78 - .../computer/core/io/RandomAccessOutput.java | 67 - .../hugegraph/computer/core/io/Readable.java | 25 - .../hugegraph/computer/core/io/Writable.java | 25 - .../core/master/DefaultMasterComputation.java | 43 - .../core/master/MasterComputation.java | 53 - .../core/master/MasterComputationContext.java | 60 - .../computer/core/master/MasterContext.java | 26 - .../core/output/AbstractComputerOutput.java | 52 - .../computer/core/output/ComputerOutput.java | 66 - .../core/output/hg/HugeGraphOutput.java | 104 - .../hg/exceptions/WriteBackException.java | 39 - .../core/output/hg/metrics/LoadMetrics.java | 47 - .../core/output/hg/metrics/LoadReport.java | 40 - .../core/output/hg/metrics/LoadSummary.java | 71 - .../core/output/hg/metrics/Printer.java | 56 - .../core/output/hg/task/BatchInsertTask.java | 101 - .../core/output/hg/task/InsertTask.java | 79 - .../core/output/hg/task/SingleInsertTask.java | 60 - .../core/output/hg/task/TaskManager.java | 187 - .../computer/core/util/BytesUtil.java | 76 - .../computer/core/util/CoderUtil.java | 157 - .../hugegraph/computer/core/util/IdUtil.java | 53 - .../computer/core/util/JsonUtilExt.java | 46 - .../core/worker/ComputationContext.java | 134 - .../core/worker/FilterComputation.java | 111 - .../core/worker/ReduceComputation.java | 97 - .../computer/core/worker/WorkerContext.java | 36 - computer-core/pom.xml | 81 - .../computer/core/aggregator/Aggregators.java | 79 - .../core/aggregator/DefaultAggregator.java | 169 - .../core/aggregator/MasterAggrManager.java | 154 - .../core/aggregator/RegisterAggregators.java | 73 - .../core/allocator/DefaultAllocator.java | 81 - .../core/allocator/RecycleHandler.java | 35 - .../computer/core/bsp/Bsp4Master.java | 220 - .../computer/core/bsp/Bsp4Worker.java | 256 -- .../hugegraph/computer/core/bsp/BspBase.java | 141 - .../computer/core/bsp/BspClient.java | 76 - .../hugegraph/computer/core/bsp/BspEvent.java | 54 - .../computer/core/bsp/EtcdBspClient.java | 81 - .../computer/core/bsp/EtcdClient.java | 457 -- .../combiner/AbstractPointerCombiner.java | 71 - .../core/combiner/EdgeValueCombiner.java | 32 - .../core/combiner/MessageValueCombiner.java | 34 - .../computer/core/common/ContainerInfo.java | 135 - .../common/exception/IllegalArgException.java | 43 - .../common/exception/TransportException.java | 69 - .../core/common/exception/WriteException.java | 39 - .../computer/core/compute/ComputeManager.java | 206 - .../core/compute/FileGraphPartition.java | 445 -- .../core/compute/input/MessageInput.java | 125 - .../core/compute/input/ReusablePointer.java | 104 - .../core/compute/input/VertexInput.java | 87 - .../core/graph/BuiltinGraphFactory.java | 199 - .../computer/core/graph/SuperstepStat.java | 170 - .../computer/core/graph/edge/DefaultEdge.java | 118 - .../core/graph/edge/DefaultEdges.java | 70 - .../computer/core/graph/id/BytesId.java | 212 - .../core/graph/partition/HashPartitioner.java | 51 - .../core/graph/partition/PartitionStat.java | 151 - .../core/graph/partition/Partitioner.java | 39 - .../core/graph/vertex/DefaultVertex.java | 166 - .../computer/core/input/EdgeFetcher.java | 29 - .../computer/core/input/ElementFetcher.java | 29 - .../computer/core/input/GraphFetcher.java | 31 - .../computer/core/input/HugeConverter.java | 99 - .../hugegraph/computer/core/input/IdUtil.java | 66 - .../core/input/InputSourceFactory.java | 55 - .../core/input/InputSplitFetcher.java | 40 - .../core/input/MasterInputHandler.java | 65 - .../core/input/MasterInputManager.java | 62 - .../computer/core/input/VertexFetcher.java | 29 - .../core/input/WorkerInputManager.java | 155 - .../core/input/filter/DefaultInputFilter.java | 37 - .../filter/ExtractAllPropertyInputFilter.java | 35 - .../core/input/hg/HugeEdgeFetcher.java | 46 - .../core/input/hg/HugeElementFetcher.java | 88 - .../core/input/hg/HugeGraphFetcher.java | 72 - .../core/input/hg/HugeInputSplitFetcher.java | 83 - .../core/input/hg/HugeVertexFetcher.java | 47 - .../core/input/loader/FileEdgeFetcher.java | 71 - .../core/input/loader/FileElementFetcher.java | 139 - .../core/input/loader/FileInputSplit.java | 84 - .../loader/LoaderFileInputSplitFetcher.java | 207 - .../core/input/loader/LoaderGraphFetcher.java | 64 - .../core/io/AbstractBufferedFileInput.java | 161 - .../core/io/AbstractBufferedFileOutput.java | 103 - .../computer/core/io/BufferedFileInput.java | 109 - .../computer/core/io/BufferedFileOutput.java | 99 - .../computer/core/io/BufferedStreamInput.java | 180 - .../core/io/BufferedStreamOutput.java | 191 - .../core/io/CsvStructGraphOutput.java | 138 - .../hugegraph/computer/core/io/IOFactory.java | 88 - .../core/io/JsonStructGraphOutput.java | 168 - .../computer/core/io/OptimizedBytesInput.java | 235 - .../core/io/OptimizedBytesOutput.java | 213 - .../computer/core/io/OutputFormat.java | 27 - .../computer/core/io/StreamGraphInput.java | 162 - .../computer/core/io/StreamGraphOutput.java | 142 - .../computer/core/io/StructGraphOutput.java | 116 - .../core/io/StructRandomAccessOutput.java | 166 - .../computer/core/io/UnsafeBytesInput.java | 284 -- .../computer/core/io/UnsafeBytesOutput.java | 267 -- .../computer/core/manager/Manager.java | 76 - .../computer/core/manager/Managers.java | 86 - .../computer/core/master/MasterService.java | 507 --- .../computer/core/network/ClientHandler.java | 27 - .../computer/core/network/ConnectionId.java | 110 - .../core/network/DataClientManager.java | 126 - .../core/network/DataServerManager.java | 65 - .../computer/core/network/IOMode.java | 28 - .../computer/core/network/MessageHandler.java | 47 - .../core/network/TransportClient.java | 95 - .../computer/core/network/TransportConf.java | 213 - .../core/network/TransportHandler.java | 42 - .../core/network/TransportProvider.java | 25 - .../core/network/TransportServer.java | 59 - .../computer/core/network/TransportState.java | 28 - .../computer/core/network/TransportUtil.java | 167 - .../core/network/buffer/NettyBuffer.java | 75 - .../core/network/buffer/NetworkBuffer.java | 73 - .../core/network/buffer/NioBuffer.java | 74 - .../network/connection/ConnectionManager.java | 87 - .../TransportConnectionManager.java | 151 - .../core/network/message/AbstractMessage.java | 197 - .../core/network/message/AckMessage.java | 44 - .../core/network/message/DataMessage.java | 69 - .../core/network/message/FailMessage.java | 86 - .../core/network/message/FinishMessage.java | 42 - .../core/network/message/Message.java | 65 - .../core/network/message/MessageType.java | 72 - .../core/network/message/PingMessage.java | 38 - .../core/network/message/PongMessage.java | 38 - .../core/network/message/RequestMessage.java | 25 - .../core/network/message/ResponseMessage.java | 25 - .../core/network/message/StartMessage.java | 44 - .../network/netty/AbstractNettyHandler.java | 144 - .../network/netty/BufAllocatorFactory.java | 29 - .../netty/ChannelFutureListenerOnWrite.java | 78 - .../core/network/netty/HeartbeatHandler.java | 89 - .../network/netty/NettyClientFactory.java | 228 - .../network/netty/NettyClientHandler.java | 116 - .../network/netty/NettyEventLoopUtil.java | 109 - .../core/network/netty/NettyProtocol.java | 203 - .../network/netty/NettyServerHandler.java | 235 - .../network/netty/NettyTransportClient.java | 196 - .../network/netty/NettyTransportProvider.java | 42 - .../network/netty/NettyTransportServer.java | 226 - .../core/network/netty/ServerIdleHandler.java | 58 - .../network/netty/codec/FrameDecoder.java | 73 - .../network/netty/codec/MessageDecoder.java | 97 - .../network/netty/codec/MessageEncoder.java | 90 - .../netty/codec/PreciseFrameDecoder.java | 98 - .../core/network/session/ClientSession.java | 275 -- .../core/network/session/ServerSession.java | 141 - .../core/output/LimitedLogOutput.java | 56 - .../computer/core/output/LogOutput.java | 42 - .../computer/core/output/hdfs/HdfsOutput.java | 174 - .../core/output/hdfs/HdfsOutputMerger.java | 88 - .../core/output/hg/HugeGraphDoubleOutput.java | 30 - .../core/output/hg/HugeGraphFloatOutput.java | 30 - .../core/output/hg/HugeGraphIdOutput.java | 37 - .../core/output/hg/HugeGraphIntOutput.java | 30 - .../core/output/hg/HugeGraphLongOutput.java | 30 - .../core/output/hg/HugeGraphStringOutput.java | 30 - .../core/receiver/MessageRecvBuffers.java | 120 - .../core/receiver/MessageRecvManager.java | 260 -- .../core/receiver/MessageRecvPartition.java | 230 - .../core/receiver/MessageRecvPartitions.java | 120 - .../computer/core/receiver/MessageStat.java | 49 - .../edge/EdgeMessageRecvPartition.java | 61 - .../edge/EdgeMessageRecvPartitions.java | 51 - .../message/ComputeMessageRecvPartition.java | 66 - .../message/ComputeMessageRecvPartitions.java | 48 - .../vertex/VertexMessageRecvPartition.java | 55 - .../vertex/VertexMessageRecvPartitions.java | 52 - .../core/rpc/AggregateRpcService.java | 37 - .../core/rpc/InputSplitRpcService.java | 27 - .../computer/core/rpc/MasterRpcManager.java | 73 - .../computer/core/rpc/WorkerRpcManager.java | 70 - .../computer/core/sender/MessageQueue.java | 58 - .../core/sender/MessageSendBuffers.java | 83 - .../core/sender/MessageSendManager.java | 294 -- .../core/sender/MessageSendPartition.java | 76 - .../computer/core/sender/MessageSender.java | 48 - .../computer/core/sender/QueuedMessage.java | 47 - .../core/sender/QueuedMessageSender.java | 313 -- .../computer/core/sender/WriteBuffer.java | 95 - .../computer/core/sender/WriteBuffers.java | 133 - .../core/snapshot/SnapshotManager.java | 271 -- .../computer/core/sort/BufferFileSorter.java | 105 - .../computer/core/sort/DefaultSorter.java | 83 - .../computer/core/sort/HgkvFileSorter.java | 108 - .../hugegraph/computer/core/sort/Sorter.java | 111 - .../sort/flusher/CombinableSorterFlusher.java | 67 - .../flusher/CombineKvInnerSortFlusher.java | 42 - .../flusher/CombineKvOuterSortFlusher.java | 47 - .../flusher/CombineSubKvInnerSortFlusher.java | 162 - .../core/sort/flusher/InnerSortFlusher.java | 49 - .../core/sort/flusher/KvInnerSortFlusher.java | 50 - .../core/sort/flusher/KvOuterSortFlusher.java | 40 - .../core/sort/flusher/OuterSortFlusher.java | 53 - .../core/sort/flusher/PeekableIterator.java | 63 - .../sort/flusher/PeekableIteratorAdaptor.java | 75 - .../computer/core/sort/merge/FileMerger.java | 40 - .../core/sort/merge/FileMergerImpl.java | 120 - .../core/sort/sorter/InputSorter.java | 31 - .../core/sort/sorter/InputsSorter.java | 31 - .../core/sort/sorter/InputsSorterImpl.java | 68 - .../core/sort/sorter/JavaInputSorter.java | 48 - .../core/sort/sorter/SubKvSorter.java | 130 - .../sort/sorting/AbstractInputsSorting.java | 47 - .../core/sort/sorting/HeapInputsSorting.java | 130 - .../core/sort/sorting/InputsSorting.java | 22 - .../sort/sorting/LoserTreeInputsSorting.java | 146 - .../core/sort/sorting/RecvSortManager.java | 57 - .../core/sort/sorting/SendSortManager.java | 41 - .../core/sort/sorting/SortManager.java | 229 - .../core/sort/sorting/SortingFactory.java | 57 - .../core/sort/sorting/SortingMode.java | 27 - .../computer/core/store/EntryIterator.java | 30 - .../computer/core/store/FileGenerator.java | 66 - .../core/store/KvEntryFileReader.java | 22 - .../core/store/KvEntryFileWriter.java | 37 - .../core/store/SuperstepFileGenerator.java | 50 - .../core/store/buffer/KvEntriesInput.java | 68 - .../buffer/KvEntriesWithFirstSubKvInput.java | 51 - .../core/store/buffer/SubKvEntriesInput.java | 73 - .../core/store/entry/AbstractKvEntry.java | 44 - .../core/store/entry/CachedPointer.java | 79 - .../core/store/entry/DefaultKvEntry.java | 37 - .../core/store/entry/EntriesUtil.java | 168 - .../core/store/entry/EntryInputImpl.java | 54 - .../core/store/entry/EntryOutput.java | 44 - .../core/store/entry/EntryOutputImpl.java | 65 - .../core/store/entry/InlinePointer.java | 78 - .../computer/core/store/entry/KvEntry.java | 27 - .../core/store/entry/KvEntryReaderImpl.java | 59 - .../store/entry/KvEntryWithFirstSubKv.java | 40 - .../core/store/entry/KvEntryWriter.java | 29 - .../computer/core/store/entry/Pointer.java | 32 - .../computer/core/store/entry/Range.java | 25 - .../bufferfile/BufferFileEntryBuilder.java | 56 - .../bufferfile/BufferFileEntryReader.java | 87 - .../bufferfile/BufferFileSubEntryReader.java | 81 - .../store/file/hgkvfile/AbstractHgkvFile.java | 80 - .../core/store/file/hgkvfile/HgkvDir.java | 33 - .../core/store/file/hgkvfile/HgkvDirImpl.java | 163 - .../core/store/file/hgkvfile/HgkvFile.java | 66 - .../file/hgkvfile/builder/BlockBuilder.java | 35 - .../builder/DataBlockBuilderImpl.java | 63 - .../hgkvfile/builder/HgkvDirBuilderImpl.java | 107 - .../hgkvfile/builder/HgkvFileBuilder.java | 56 - .../hgkvfile/builder/HgkvFileBuilderImpl.java | 172 - .../hgkvfile/builder/IndexBlockBuilder.java | 29 - .../builder/IndexBlockBuilderImpl.java | 50 - .../reader/HgkvDir4SubKvReaderImpl.java | 69 - .../hgkvfile/reader/HgkvDirReaderImpl.java | 136 - .../hgkvfile/reader/HgkvFileReaderImpl.java | 108 - .../file/select/DefaultSelectedFiles.java | 43 - .../file/select/DisperseEvenlySelector.java | 199 - .../store/file/select/InputFilesSelector.java | 39 - .../core/store/file/select/SelectedFiles.java | 27 - .../store/file/seqfile/BitsFileReader.java | 33 - .../file/seqfile/BitsFileReaderImpl.java | 64 - .../store/file/seqfile/BitsFileWriter.java | 42 - .../file/seqfile/BitsFileWriterImpl.java | 74 - .../core/store/file/seqfile/ValueFile.java | 79 - .../store/file/seqfile/ValueFileInput.java | 202 - .../store/file/seqfile/ValueFileOutput.java | 192 - .../core/util/ComputerContextUtil.java | 89 - .../computer/core/util/Consumers.java | 214 - .../computer/core/util/FileUtil.java | 36 - .../computer/core/util/JsonUtil.java | 63 - .../computer/core/util/SerializeUtil.java | 84 - .../computer/core/util/StringEncodeUtil.java | 52 - .../computer/core/worker/WorkerService.java | 471 -- .../computer/core/worker/WorkerStat.java | 109 - .../core/worker/load/LoadService.java | 248 -- computer-dist/Dockerfile | 26 - computer-dist/pom.xml | 131 - computer-dist/release-docs/LICENSE | 491 --- computer-dist/release-docs/NOTICE | 3824 ----------------- .../licenses/LICENSE-accessors-smart.txt | 202 - .../licenses/LICENSE-activation.txt | 119 - .../LICENSE-animal-sniffer-annotations.txt | 8 - .../licenses/LICENSE-apiguardian-api.txt | 201 - .../licenses/LICENSE-audience-annotations.txt | 202 - .../LICENSE-auto-service-annotations.txt | 202 - .../licenses/LICENSE-automaton.txt | 24 - .../release-docs/licenses/LICENSE-avro.txt | 387 -- .../licenses/LICENSE-bcprov-jdk18on.txt | 22 - .../release-docs/licenses/LICENSE-bolt.txt | 201 - .../licenses/LICENSE-builder-annotations.txt | 201 - .../licenses/LICENSE-byte-buddy.txt | 180 - .../licenses/LICENSE-checker-qual.txt | 22 - .../licenses/LICENSE-commons-beanutils.txt | 202 - .../licenses/LICENSE-commons-cli.txt | 202 - .../licenses/LICENSE-commons-codec.txt | 202 - .../licenses/LICENSE-commons-collections.txt | 202 - .../licenses/LICENSE-commons-compress.txt | 387 -- .../LICENSE-commons-configuration.txt | 202 - .../LICENSE-commons-configuration2.txt | 202 - .../licenses/LICENSE-commons-crypto.txt | 202 - .../licenses/LICENSE-commons-io.txt | 203 - .../licenses/LICENSE-commons-lang.txt | 202 - .../licenses/LICENSE-commons-lang3.txt | 387 -- .../licenses/LICENSE-commons-logging.txt | 202 - .../licenses/LICENSE-commons-math3.txt | 387 -- .../licenses/LICENSE-commons-text.txt | 202 - .../licenses/LICENSE-curator-client.txt | 202 - .../licenses/LICENSE-curator-recipes.txt | 202 - .../licenses/LICENSE-disruptor.txt | 202 - .../LICENSE-error_prone_annotations.txt | 202 - .../licenses/LICENSE-failsafe.txt | 202 - .../licenses/LICENSE-findbugs-annotations.txt | 202 - .../release-docs/licenses/LICENSE-generex.txt | 201 - .../licenses/LICENSE-groovy-all.txt | 250 -- .../licenses/LICENSE-grpc-api.txt | 202 - .../licenses/LICENSE-grpc-context.txt | 202 - .../licenses/LICENSE-grpc-grpclb.txt | 202 - .../licenses/LICENSE-grpc-netty.txt | 202 - .../licenses/LICENSE-grpc-protobuf-lite.txt | 202 - .../licenses/LICENSE-grpc-protobuf.txt | 202 - .../licenses/LICENSE-grpc-stub.txt | 202 - .../release-docs/licenses/LICENSE-gson.txt | 202 - .../release-docs/licenses/LICENSE-guava.txt | 202 - .../licenses/LICENSE-hadoop-annotations.txt | 1834 -------- .../licenses/LICENSE-hadoop-common.txt | 1834 -------- .../licenses/LICENSE-hadoop-hdfs-client.txt | 1834 -------- .../licenses/LICENSE-hamcrest-core.txt | 27 - .../licenses/LICENSE-hbase-client.txt | 202 - .../licenses/LICENSE-hbase-common.txt | 202 - .../licenses/LICENSE-hbase-hadoop-compat.txt | 202 - .../licenses/LICENSE-hbase-hadoop2-compat.txt | 202 - .../licenses/LICENSE-hbase-http.txt | 202 - .../licenses/LICENSE-hbase-metrics-api.txt | 202 - .../licenses/LICENSE-hbase-metrics.txt | 202 - .../LICENSE-hbase-protocol-shaded.txt | 202 - .../licenses/LICENSE-hbase-replication.txt | 202 - .../licenses/LICENSE-hbase-server.txt | 202 - ...LICENSE-hbase-shaded-client-byo-hadoop.txt | 202 - .../LICENSE-hbase-shaded-miscellaneous.txt | 202 - .../licenses/LICENSE-hbase-shaded-netty.txt | 202 - .../LICENSE-hbase-shaded-protobuf.txt | 202 - .../licenses/LICENSE-hbase-zookeeper.txt | 202 - .../release-docs/licenses/LICENSE-hessian.txt | 201 - .../licenses/LICENSE-htrace-core4.txt | 202 - .../licenses/LICENSE-hugegraph-client.txt | 202 - .../licenses/LICENSE-hugegraph-common.txt | 202 - .../licenses/LICENSE-hugegraph-loader.txt | 202 - .../licenses/LICENSE-hugegraph-rpc.txt | 202 - .../licenses/LICENSE-j2objc-annotations.txt | 202 - .../licenses/LICENSE-jackson-core-asl.txt | 13 - .../licenses/LICENSE-jackson-core.txt | 202 - .../LICENSE-jackson-dataformat-yaml.txt | 8 - .../LICENSE-jackson-datatype-jsr310.txt | 8 - .../licenses/LICENSE-jackson-jaxrs-base.txt | 8 - .../LICENSE-jackson-jaxrs-json-provider.txt | 8 - .../licenses/LICENSE-jackson-jaxrs.txt | 13 - .../licenses/LICENSE-jackson-mapper-asl.txt | 13 - ...ICENSE-jackson-module-jaxb-annotations.txt | 8 - .../licenses/LICENSE-jackson-xc.txt | 202 - .../LICENSE-jakarta.activation-api.txt | 29 - .../licenses/LICENSE-jakarta.activation.txt | 29 - .../licenses/LICENSE-jamon-runtime.txt | 151 - .../licenses/LICENSE-javassist.txt | 137 - .../licenses/LICENSE-javax.annotation-api.txt | 124 - .../licenses/LICENSE-javax.el.txt | 356 -- .../licenses/LICENSE-javax.inject.txt | 348 -- .../licenses/LICENSE-javax.json.txt | 362 -- .../licenses/LICENSE-javax.servlet-api.txt | 124 - .../LICENSE-javax.servlet.jsp-api.txt | 356 -- .../licenses/LICENSE-javax.servlet.jsp.txt | 356 -- .../licenses/LICENSE-jaxb-core.txt | 28 - .../licenses/LICENSE-jaxb-impl.txt | 335 -- .../licenses/LICENSE-jcip-annotations.txt | 202 - .../licenses/LICENSE-jcodings.txt | 17 - .../licenses/LICENSE-jcommander.txt | 202 - .../licenses/LICENSE-jersey-core.txt | 350 -- .../licenses/LICENSE-jersey-json.txt | 350 -- .../licenses/LICENSE-jersey-servlet.txt | 350 -- .../licenses/LICENSE-jetcd-common.txt | 202 - .../licenses/LICENSE-jetcd-core.txt | 202 - .../licenses/LICENSE-jettison.txt | 192 - .../licenses/LICENSE-jetty-http.txt | 290 -- .../licenses/LICENSE-jetty-io.txt | 290 -- .../licenses/LICENSE-jetty-security.txt | 290 -- .../licenses/LICENSE-jetty-server.txt | 290 -- .../licenses/LICENSE-jetty-servlet.txt | 290 -- .../licenses/LICENSE-jetty-util-ajax.txt | 292 -- .../licenses/LICENSE-jetty-util.txt | 290 -- .../licenses/LICENSE-jetty-webapp.txt | 290 -- .../licenses/LICENSE-jetty-xml.txt | 290 -- .../release-docs/licenses/LICENSE-jline.txt | 32 - .../licenses/LICENSE-joda-time.txt | 202 - .../release-docs/licenses/LICENSE-joni.txt | 21 - .../release-docs/licenses/LICENSE-jsch.txt | 26 - .../licenses/LICENSE-json-smart.txt | 202 - .../release-docs/licenses/LICENSE-jsr305.txt | 202 - .../release-docs/licenses/LICENSE-junit.txt | 214 - .../licenses/LICENSE-kerb-admin.txt | 202 - .../licenses/LICENSE-kerb-client.txt | 202 - .../licenses/LICENSE-kerb-common.txt | 202 - .../licenses/LICENSE-kerb-core.txt | 202 - .../licenses/LICENSE-kerb-crypto.txt | 202 - .../licenses/LICENSE-kerb-identity.txt | 202 - .../licenses/LICENSE-kerb-server.txt | 202 - .../licenses/LICENSE-kerb-simplekdc.txt | 202 - .../licenses/LICENSE-kerb-util.txt | 202 - .../licenses/LICENSE-kerby-asn1.txt | 202 - .../licenses/LICENSE-kerby-pkix.txt | 202 - .../licenses/LICENSE-kerby-util.txt | 202 - .../licenses/LICENSE-kerby-xdr.txt | 202 - .../licenses/LICENSE-kotlin-stdlib-common.txt | 202 - .../licenses/LICENSE-kotlin-stdlib-jdk7.txt | 202 - .../licenses/LICENSE-kotlin-stdlib-jdk8.txt | 202 - .../licenses/LICENSE-kubernetes-client.txt | 201 - ...kubernetes-model-admissionregistration.txt | 201 - .../LICENSE-kubernetes-model-apps.txt | 201 - .../LICENSE-kubernetes-model-batch.txt | 201 - .../LICENSE-kubernetes-model-certificates.txt | 201 - .../LICENSE-kubernetes-model-common.txt | 201 - .../LICENSE-kubernetes-model-coordination.txt | 201 - .../LICENSE-kubernetes-model-core.txt | 201 - .../LICENSE-kubernetes-model-discovery.txt | 201 - .../LICENSE-kubernetes-model-events.txt | 201 - .../LICENSE-kubernetes-model-extensions.txt | 201 - .../LICENSE-kubernetes-model-flowcontrol.txt | 201 - .../LICENSE-kubernetes-model-networking.txt | 201 - .../LICENSE-kubernetes-model-node.txt | 201 - .../LICENSE-kubernetes-model-policy.txt | 201 - .../LICENSE-kubernetes-model-rbac.txt | 201 - .../LICENSE-kubernetes-model-scheduling.txt | 201 - .../LICENSE-kubernetes-model-storageclass.txt | 201 - .../LICENSE-kubernetes-server-mock.txt | 201 - .../licenses/LICENSE-lightning-csv.txt | 21 - .../licenses/LICENSE-listenablefuture.txt | 202 - .../licenses/LICENSE-log4j-api.txt | 202 - .../licenses/LICENSE-log4j-core.txt | 202 - .../licenses/LICENSE-log4j-slf4j-impl.txt | 202 - .../release-docs/licenses/LICENSE-log4j.txt | 202 - .../licenses/LICENSE-logging-interceptor.txt | 201 - .../licenses/LICENSE-lookout-api.txt | 202 - .../licenses/LICENSE-lz4-java.txt | 202 - .../release-docs/licenses/LICENSE-minio.txt | 202 - .../licenses/LICENSE-mockito-core.txt | 21 - .../release-docs/licenses/LICENSE-mvel2.txt | 201 - .../licenses/LICENSE-netty-all.txt | 202 - .../release-docs/licenses/LICENSE-netty.txt | 202 - .../licenses/LICENSE-nimbus-jose-jwt.txt | 202 - .../licenses/LICENSE-objenesis.txt | 202 - .../release-docs/licenses/LICENSE-okhttp.txt | 202 - .../licenses/LICENSE-okio-jvm.txt | 202 - .../release-docs/licenses/LICENSE-okio.txt | 202 - .../licenses/LICENSE-opentracing-mock.txt | 202 - .../licenses/LICENSE-opentracing-noop.txt | 202 - .../licenses/LICENSE-opentracing-util.txt | 202 - .../release-docs/licenses/LICENSE-ow2-asm.txt | 29 - .../licenses/LICENSE-paranamer.txt | 29 - .../licenses/LICENSE-perfmark-api.txt | 202 - .../LICENSE-proto-google-common-protos.txt | 202 - .../licenses/LICENSE-protobuf-java-util.txt | 32 - .../licenses/LICENSE-protobuf-java.txt | 32 - .../release-docs/licenses/LICENSE-re2j.txt | 27 - .../LICENSE-resourcecify-annotations.txt | 201 - .../licenses/LICENSE-sfm-converter.txt | 21 - .../release-docs/licenses/LICENSE-sfm-map.txt | 21 - .../licenses/LICENSE-sfm-reflect.txt | 21 - .../licenses/LICENSE-sfm-tuples.txt | 21 - .../licenses/LICENSE-sfm-util.txt | 21 - .../licenses/LICENSE-simple-xml-safe.txt | 201 - .../licenses/LICENSE-slf4j-api.txt | 21 - .../licenses/LICENSE-snakeyaml.txt | 202 - .../licenses/LICENSE-snappy-java.txt | 202 - .../licenses/LICENSE-sofa-common-tools.txt | 202 - .../licenses/LICENSE-stax2-api.txt | 13 - .../licenses/LICENSE-sundr-codegen.txt | 202 - .../licenses/LICENSE-sundr-core.txt | 201 - .../licenses/LICENSE-swagger-annotations.txt | 202 - .../licenses/LICENSE-swagger-core.txt | 202 - .../licenses/LICENSE-token-provider.txt | 202 - .../licenses/LICENSE-tracer-core.txt | 201 - .../licenses/LICENSE-validation-api.txt | 202 - .../licenses/LICENSE-woodstox-core.txt | 202 - .../licenses/LICENSE-zjsonpatch.txt | 201 - .../licenses/LICENSE-zookeeper.txt | 202 - computer-dist/scripts/apache-release.sh | 104 - .../scripts/dependency/check_dependencies.sh | 32 - .../scripts/dependency/known-dependencies.txt | 276 -- .../regenerate_known_dependencies.sh | 33 - .../src/assembly/dataset/schema.groovy | 47 - .../src/assembly/dataset/struct.json | 211 - .../src/assembly/descriptor/assembly.xml | 77 - .../src/assembly/static/bin/start-computer.sh | 233 - .../assembly/static/conf/computer.properties | 37 - .../src/assembly/static/conf/log4j2.xml | 66 - .../src/assembly/travis/build-images.sh | 33 - .../src/assembly/travis/install-env.sh | 23 - .../src/assembly/travis/install-hdfs.sh | 65 - .../travis/install-hugegraph-from-source.sh | 46 - .../travis/load-data-into-hugegraph.sh | 63 - .../src/assembly/travis/start-etcd.sh | 31 - .../computer/dist/HugeGraphComputer.java | 151 - computer-driver/pom.xml | 38 - .../driver/ComputerDriverException.java | 55 - .../computer/driver/DefaultJobState.java | 145 - .../computer/driver/JobObserver.java | 26 - .../hugegraph/computer/driver/JobState.java | 42 - .../hugegraph/computer/driver/JobStatus.java | 39 - .../computer/driver/SuperstepStat.java | 120 - .../driver/config/DriverConfigOption.java | 73 - .../computer/driver/util/JsonUtil.java | 59 - computer-k8s-operator/Dockerfile | 21 - .../crd-generate/.dockerignore | 20 - computer-k8s-operator/crd-generate/.gitignore | 26 - computer-k8s-operator/crd-generate/Dockerfile | 49 - computer-k8s-operator/crd-generate/Makefile | 186 - computer-k8s-operator/crd-generate/PROJECT | 41 - computer-k8s-operator/crd-generate/README.md | 94 - .../crd-generate/api/v1/groupversion_info.go | 59 - .../api/v1/hugegraphcomputerjob_types.go | 182 - .../api/v1/hugegraphcomputerjob_webhook.go | 103 - .../crd-generate/api/v1/webhook_suite_test.go | 133 - .../crd-generate/cmd/generate.go | 101 - .../crd-generate/cmd/main.go | 98 - .../config/certmanager/certificate.yaml | 41 - .../config/certmanager/kustomization.yaml | 21 - .../config/certmanager/kustomizeconfig.yaml | 32 - .../config/crd/kustomization.yaml | 38 - .../config/crd/kustomizeconfig.yaml | 35 - .../cainjection_in_hugegraphcomputerjobs.yaml | 23 - .../webhook_in_hugegraphcomputerjobs.yaml | 32 - .../config/default/kustomization.yaml | 90 - .../config/default/manager_config_patch.yaml | 36 - .../config/default/manager_webhook_patch.yaml | 39 - .../default/webhookcainjection_patch.yaml | 31 - .../crd-generate/config/etcd/etcd_server.yaml | 101 - .../config/etcd/kustomization.yaml | 27 - .../manager/controller_manager_config.yaml | 27 - .../config/manager/kustomization.yaml | 38 - .../crd-generate/config/manager/manager.yaml | 111 - .../config/minio/kustomization.yaml | 27 - .../config/minio/minio_server.yaml | 108 - .../config/prometheus/kustomization.yaml | 18 - .../config/prometheus/monitor.yaml | 36 - .../rbac/auth_proxy_client_clusterrole.yaml | 25 - .../config/rbac/auth_proxy_role.yaml | 33 - .../config/rbac/auth_proxy_role_binding.yaml | 28 - .../config/rbac/auth_proxy_service.yaml | 29 - .../hugegraphcomputerjob_viewer_role.yaml | 36 - .../config/rbac/kustomization.yaml | 38 - .../config/rbac/leader_election_role.yaml | 53 - .../rbac/leader_election_role_binding.yaml | 28 - .../crd-generate/config/rbac/role.yaml | 205 - .../config/rbac/role_binding.yaml | 28 - .../config/rbac/service_account.yaml | 21 - .../config/samples/kustomization.yaml | 20 - .../operator_v1_hugegraphcomputerjob.yaml | 22 - .../config/webhook/kustomization.yaml | 22 - .../config/webhook/kustomizeconfig.yaml | 41 - .../crd-generate/config/webhook/service.yaml | 28 - computer-k8s-operator/crd-generate/go.mod | 71 - .../crd-generate/hack/boilerplate.go.txt | 15 - .../hugegraph-computer-crd.v1beta1.yaml | 1091 ----- .../manifest/hugegraph-computer-operator.yaml | 806 ---- computer-k8s-operator/pom.xml | 73 - .../k8s/operator/OperatorEntrypoint.java | 248 -- .../operator/common/AbstractController.java | 438 -- .../k8s/operator/common/MatchWithMsg.java | 39 - .../k8s/operator/common/OperatorRequest.java | 111 - .../k8s/operator/common/WorkQueue.java | 118 - .../k8s/operator/config/OperatorOptions.java | 153 - .../controller/ComputerJobComponent.java | 84 - .../controller/ComputerJobController.java | 562 --- .../controller/ComputerJobDeployer.java | 650 --- .../src/main/resources/log4j2.xml | 48 - computer-k8s/schema/crd-schema.json | 320 -- computer-k8s/schema/enum-schema.json | 73 - .../hugegraph/computer/k8s/Constants.java | 65 - .../k8s/config/KubeDriverOptions.java | 157 - .../k8s/crd/model/HugeGraphComputerJob.java | 60 - .../crd/model/HugeGraphComputerJobList.java | 26 - .../computer/k8s/driver/KubernetesDriver.java | 578 --- .../hugegraph/computer/k8s/util/KubeUtil.java | 278 -- .../src/main/resources/docker_push.sh | 87 - computer-test/conf/images/docker_push_test.sh | 89 - computer-test/conf/log4j2-test.xml | 42 - computer-test/pom.xml | 208 - .../computer/algorithm/AlgorithmTestBase.java | 150 - .../algorithm/AlgorithmTestSuite.java | 53 - .../BetweennessCentralityTest.java | 142 - .../closeness/ClosenessCentralityTest.java | 163 - .../degree/DegreeCentralityTest.java | 100 - .../centrality/pagerank/PageRankTest.java | 29 - .../cc/ClusteringCoefficientTest.java | 131 - .../algorithm/community/kcore/KcoreTest.java | 29 - .../trianglecount/TriangleCountTest.java | 132 - .../algorithm/community/wcc/WccTest.java | 35 - .../path/rings/RingsDetectionTest.java | 139 - .../rings/RingsDetectionWithFilterTest.java | 134 - .../SingleSourceShortestPathTest.java | 148 - .../algorithm/sampling/RandomWalkTest.java | 180 - .../core/allocator/AllocatorTestSuite.java | 29 - .../core/allocator/DefaultAllocatorTest.java | 165 - .../core/allocator/RecyclersTest.java | 177 - .../computer/core/bsp/BspEventTest.java | 42 - .../computer/core/bsp/BspTestSuite.java | 29 - .../computer/core/bsp/EtcdBspTest.java | 187 - .../computer/core/bsp/EtcdClientTest.java | 265 -- .../core/combiner/CombinerTestSuite.java | 37 - .../combiner/DoubleValueSumCombinerTest.java | 63 - .../combiner/FloatValueSumCombinerTest.java | 63 - .../combiner/IntValueSumCombinerTest.java | 63 - .../combiner/LongValueSumCombinerTest.java | 63 - .../MergeNewPropertiesCombinerTest.java | 82 - .../MergeOldPropertiesCombinerTest.java | 82 - .../core/combiner/OverwriteCombinerTest.java | 64 - .../core/combiner/PointerCombinerTest.java | 173 - .../core/combiner/ValueMaxCombinerTest.java | 63 - .../core/combiner/ValueMinCombinerTest.java | 56 - .../computer/core/common/CommonTestSuite.java | 29 - .../core/common/ContainerInfoTest.java | 70 - .../computer/core/common/ExceptionTest.java | 74 - .../core/common/FakeMasterComputation.java | 46 - .../core/compute/ComputeManagerTest.java | 238 - .../core/compute/ComputeTestSuite.java | 34 - .../core/compute/MockComputation.java | 82 - .../core/compute/MockMessageSender.java | 46 - .../core/compute/input/EdgesInputTest.java | 288 -- .../core/compute/input/MessageInputTest.java | 180 - .../compute/input/ResuablePointerTest.java | 52 - .../computer/core/config/ConfigTestSuite.java | 28 - .../core/config/DefaultConfigTest.java | 187 - .../core/graph/BuiltinGraphFactoryTest.java | 102 - .../computer/core/graph/DefaultEdgeTest.java | 88 - .../core/graph/DefaultPropertiesTest.java | 94 - .../computer/core/graph/GraphTestSuite.java | 68 - .../core/graph/SuperstepStatTest.java | 162 - .../computer/core/graph/id/BytesIdTest.java | 177 - .../computer/core/graph/id/IdFactoryTest.java | 62 - .../computer/core/graph/id/IdTypeTest.java | 49 - .../graph/partition/HashPartitionerTest.java | 208 - .../graph/partition/PartitionStatTest.java | 148 - .../core/graph/value/DoubleValueTest.java | 250 -- .../core/graph/value/IdListListTest.java | 101 - .../core/graph/value/IdValueListTest.java | 85 - .../core/graph/value/IdValueTest.java | 216 - .../core/graph/value/IntValueTest.java | 256 -- .../core/graph/value/ListValueTest.java | 458 -- .../core/graph/value/LongValueTest.java | 222 - .../core/graph/value/NullValueTest.java | 149 - .../core/graph/value/StringValueTest.java | 158 - .../core/input/FileInputSplitTest.java | 65 - .../core/input/HugeConverterTest.java | 129 - .../core/input/InputSplitDataTest.java | 97 - .../computer/core/input/InputSplitTest.java | 51 - .../computer/core/input/InputTestSuite.java | 31 - .../core/input/MockMasterInputManager.java | 58 - .../computer/core/input/MockRpcClient.java | 39 - .../core/input/MockWorkerInputManager.java | 114 - .../computer/core/io/BufferedFileTest.java | 751 ---- .../computer/core/io/BufferedStreamTest.java | 407 -- .../core/io/CsvStructGraphOutputTest.java | 163 - .../computer/core/io/IOTestSuite.java | 36 - .../core/io/JsonStructGraphOutputTest.java | 174 - .../computer/core/io/MockRankComputation.java | 50 - .../core/io/OptimizedUnsafeBytesTest.java | 189 - .../core/io/StreamGraphOutputInputTest.java | 268 -- .../computer/core/io/UnsafeBytesTest.java | 610 --- .../core/network/ConnectionIdTest.java | 75 - .../core/network/MockClientHandler.java | 50 - .../core/network/MockMessageHandler.java | 86 - .../core/network/MockUnDecodeMessage.java | 47 - .../core/network/NetworkTestSuite.java | 46 - .../core/network/TransportUtilTest.java | 126 - .../network/buffer/NetworkBufferTest.java | 154 - .../connection/ConnectionManagerTest.java | 144 - .../network/netty/AbstractNetworkTest.java | 142 - .../network/netty/NettyClientFactoryTest.java | 133 - .../netty/NettyTransportClientTest.java | 332 -- .../netty/NettyTransportServerTest.java | 242 -- .../network/session/TransportSessionTest.java | 341 -- .../core/receiver/MessageRecvBuffersTest.java | 184 - .../core/receiver/MessageRecvManagerTest.java | 154 - .../core/receiver/ReceiverTestSuite.java | 35 - .../computer/core/receiver/ReceiverUtil.java | 80 - .../edge/EdgeMessageRecvPartitionTest.java | 277 -- .../VertexMessageRecvPartitionTest.java | 276 -- .../core/sender/MessageQueueTest.java | 63 - .../core/sender/MessageSendBuffersTest.java | 63 - .../core/sender/MessageSendManagerTest.java | 28 - .../core/sender/MockTransportClient.java | 92 - .../computer/core/sender/MultiQueueTest.java | 247 -- .../core/sender/QueuedMessageSenderTest.java | 67 - .../core/sender/QueuedMessageTest.java | 36 - .../computer/core/sender/SenderTestSuite.java | 35 - .../computer/core/sender/WriteBufferTest.java | 192 - .../core/sender/WriteBuffersTest.java | 260 -- .../computer/core/sort/SorterTestUtil.java | 176 - .../sort/combiner/MockIntSumCombiner.java | 29 - .../core/sort/sorter/EmptyFlusherTest.java | 47 - .../core/sort/sorter/SortLargeDataTest.java | 331 -- .../computer/core/sort/sorter/SorterTest.java | 489 --- .../core/sort/sorter/SorterTestSuite.java | 31 - .../core/sort/sorting/InputsSortingTest.java | 73 - .../core/sort/sorting/SortingTestSuite.java | 29 - .../computer/core/sort/sorting/TestData.java | 141 - .../computer/core/store/BitFileTest.java | 92 - .../computer/core/store/EntriesUtilTest.java | 113 - .../computer/core/store/EntryOutputTest.java | 183 - .../computer/core/store/FileManagerTest.java | 107 - .../computer/core/store/HgkvDirTest.java | 144 - .../computer/core/store/StoreTestSuite.java | 35 - .../computer/core/store/StoreTestUtil.java | 184 - .../computer/core/store/ValueFileTest.java | 489 --- .../core/util/ComputerContextUtilTest.java | 72 - .../computer/core/util/IdUtilTest.java | 56 - .../computer/core/util/JsonUtilTest.java | 51 - .../computer/core/util/SerializeUtilTest.java | 53 - .../computer/core/util/UtilTestSuite.java | 30 - .../computer/core/worker/MockComputation.java | 405 -- .../core/worker/MockComputation2.java | 55 - .../core/worker/MockComputationParams.java | 45 - .../core/worker/MockMasterComputation.java | 389 -- .../core/worker/MockMasterComputation2.java | 94 - .../core/worker/MockWorkerService.java | 31 - .../core/worker/WorkerServiceTest.java | 242 -- .../computer/core/worker/WorkerStatTest.java | 115 - .../computer/core/worker/WorkerTestSuite.java | 29 - .../computer/dist/ComputerDistTestSuite.java | 27 - .../computer/dist/HugeGraphComputerTest.java | 103 - .../computer/driver/ComputerOptionsTest.java | 88 - .../hugegraph/computer/driver/DriverTest.java | 85 - .../computer/driver/DriverTestSuite.java | 29 - .../computer/k8s/AbstractK8sTest.java | 210 - .../hugegraph/computer/k8s/K8sTestSuite.java | 30 - .../computer/k8s/KubernetesDriverTest.java | 309 -- .../suite/integrate/IntegrateTestSuite.java | 57 - .../suite/integrate/SenderIntegrateTest.java | 456 -- .../computer/suite/unit/UnitTestBase.java | 306 -- .../computer/suite/unit/UnitTestSuite.java | 69 - .../src/main/resources/computer.properties | 31 - .../resources/hdfs_input_test/core-site.xml | 23 - .../resources/hdfs_input_test/struct.json | 224 - computer-test/src/main/resources/log4j2.xml | 66 - computer-yarn/pom.xml | 33 - computer/README.md | 44 + .../community/cc/ClusteringCoefficient.java | 0 .../trianglecount/TriangleCountValue.java | 0 .../computer/algorithm/community/wcc/Wcc.java | 0 .../path/rings/RingsDetectionParams.java | 0 .../SingleSourceShortestPathParams.java | 0 .../core/combiner/PropertiesCombiner.java | 0 .../computer/core/common/ComputerContext.java | 0 .../computer/core/graph/id/IdType.java | 0 .../computer/core/graph/value/FloatValue.java | 0 .../computer/core/graph/value/IdListList.java | 0 .../computer/core/worker/Computation.java | 0 .../core/aggregator/WorkerAggrManager.java | 0 .../core/combiner/PointerCombiner.java | 0 .../core/combiner/VertexValueCombiner.java | 0 .../core/common/exception/ReadException.java | 0 .../core/compute/input/EdgesInput.java | 0 .../computer/core/input/InputSplit.java | 0 .../core/input/loader/FileVertxFetcher.java | 0 .../computer/core/network/ClientFactory.java | 0 .../core/network/buffer/FileRegionBuffer.java | 0 .../network/session/TransportSession.java | 0 .../computer/core/sender/MultiQueue.java | 0 .../flusher/CombineSubKvOuterSortFlusher.java | 0 .../computer/core/store/FileManager.java | 0 .../computer/core/store/StoreManager.java | 0 .../computer/core/store/entry/EntryInput.java | 2 - .../core/store/entry/KvEntryReader.java | 2 - .../core/store/entry/KvEntryWriterImpl.java | 0 .../store/file/hgkvfile/HgkvFileImpl.java | 0 .../computer/core/util/ShutdownHook.java | 0 .../licenses/LICENSE-annotations.txt | 0 .../release-docs/licenses/LICENSE-asm.txt | 0 .../licenses/LICENSE-commons-net.txt | 0 .../licenses/LICENSE-curator-framework.txt | 0 .../licenses/LICENSE-grpc-core.txt | 0 .../licenses/LICENSE-hadoop-auth.txt | 0 .../licenses/LICENSE-hbase-mapreduce.txt | 0 .../licenses/LICENSE-hbase-procedure.txt | 0 .../licenses/LICENSE-hbase-protocol.txt | 0 .../licenses/LICENSE-jackson-annotations.txt | 0 .../licenses/LICENSE-jackson-databind.txt | 0 .../LICENSE-jersey-container-servlet-core.txt | 0 .../licenses/LICENSE-kerby-config.txt | 0 .../licenses/LICENSE-kotlin-stdlib.txt | 0 ...LICENSE-kubernetes-model-apiextensions.txt | 0 .../LICENSE-kubernetes-model-autoscaling.txt | 0 .../LICENSE-kubernetes-model-metrics.txt | 0 .../licenses/LICENSE-metrics-core.txt | 0 .../licenses/LICENSE-opentracing-api.txt | 0 .../release-docs/licenses/LICENSE-sfm-csv.txt | 0 .../licenses/LICENSE-slf4j-log4j12.txt | 0 .../licenses/LICENSE-sofa-rpc-all.txt | 0 .../licenses/LICENSE-swagger-models.txt | 0 .../assembly/dataset/load-movie-data.groovy | 0 .../src/assembly/travis/install-k8s.sh | 0 .../computer/driver/ComputerDriver.java | 0 .../default/manager_auth_proxy_patch.yaml | 0 .../hugegraphcomputerjob_editor_role.yaml | 0 .../config/webhook/manifests.yaml | 0 .../crd-generate/go.sum | 0 .../manifest/hugegraph-computer-crd.v1.yaml | 0 .../k8s/operator/common/OperatorResult.java | 0 .../computer-k8s}/pom.xml | 0 .../computer/k8s/config/KubeSpecOptions.java | 0 .../algorithm/community/lpa/LpaTest.java | 4 +- .../core/graph/value/BooleanValueTest.java | 0 .../core/graph/value/FloatValueTest.java | 0 .../core/graph/value/ValueTypeTest.java | 0 .../core/io/StructRandomAccessOutputTest.java | 0 .../core/network/DataServerManagerTest.java | 0 .../network/netty/HeartbeatHandlerTest.java | 0 .../netty/NettyEncodeDecodeHandlerTest.java | 0 .../ComputeMessageRecvPartitionTest.java | 0 .../core/sort/sorter/FlusherTest.java | 0 .../computer/core/store/HgkvFileTest.java | 0 .../computer/core/store/PointerTest.java | 0 .../hugegraph/computer/k8s/MiniKubeTest.java | 0 .../hugegraph/computer/k8s/OperatorTest.java | 0 .../suite/integrate/MockComputation.java | 0 .../resources/hdfs_input_test/schema.json | 0 pom.xml => computer/pom.xml | 0 931 files changed, 47 insertions(+), 115149 deletions(-) delete mode 100644 computer-algorithm/pom.xml delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientOutput.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientValue.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/QuantityType.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPath.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathCombiner.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathMaster.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathOutput.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathValue.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkMessage.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkOutput.java delete mode 100644 computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkParams.java delete mode 100644 computer-api/pom.xml delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmParams.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Master.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Worker.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Allocator.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Recyclable.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclerReference.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/Combiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdListMergeCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdSetMergeCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombiner.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/common/Constants.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/common/SerialEnum.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/common/exception/ComputerException.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Config.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfig.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/EdgeFrequency.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/HotConfig.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Null.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/GraphFactory.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edge.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edges.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/Id.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactory.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/DefaultProperties.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/Properties.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdList.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdSet.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/MapValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValue.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/Value.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueType.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/Vertex.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/input/InputFilter.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesInput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeInput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphInput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphWritebackOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessInput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Readable.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Writable.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/master/DefaultMasterComputation.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputation.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputationContext.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterContext.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/AbstractComputerOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/ComputerOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphOutput.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/exceptions/WriteBackException.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadMetrics.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadReport.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadSummary.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/Printer.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/BatchInsertTask.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/InsertTask.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/SingleInsertTask.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/TaskManager.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/util/BytesUtil.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/util/CoderUtil.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/util/IdUtil.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilExt.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ComputationContext.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/FilterComputation.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ReduceComputation.java delete mode 100644 computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerContext.java delete mode 100644 computer-core/pom.xml delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregators.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/DefaultAggregator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/MasterAggrManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/RegisterAggregators.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/RecycleHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Master.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Worker.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspClient.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEvent.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspClient.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClient.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/AbstractPointerCombiner.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/EdgeValueCombiner.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/MessageValueCombiner.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfo.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/IllegalArgException.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/TransportException.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/WriteException.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/FileGraphPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/ReusablePointer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/VertexInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStat.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdge.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdges.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesId.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitioner.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStat.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/Partitioner.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/DefaultVertex.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/EdgeFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/ElementFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/GraphFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/IdUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSourceFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/VertexFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/WorkerInputManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/DefaultInputFilter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/ExtractAllPropertyInputFilter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeEdgeFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeElementFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeGraphFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeInputSplitFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeVertexFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileEdgeFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileElementFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileInputSplit.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderFileInputSplitFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderGraphFetcher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/IOFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OutputFormat.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructGraphOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Manager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Managers.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionId.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataClientManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/IOMode.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/MessageHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportClient.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportConf.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportProvider.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportServer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportState.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NettyBuffer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBuffer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NioBuffer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/TransportConnectionManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AbstractMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AckMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/DataMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FailMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FinishMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/Message.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/MessageType.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PingMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PongMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/RequestMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/ResponseMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/StartMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNettyHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/BufAllocatorFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ChannelFutureListenerOnWrite.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEventLoopUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyProtocol.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyServerHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClient.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportProvider.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ServerIdleHandler.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/FrameDecoder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageDecoder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageEncoder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/PreciseFrameDecoder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ClientSession.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ServerSession.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LimitedLogOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LogOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutputMerger.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphDoubleOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphFloatOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIdOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIntOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphLongOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphStringOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffers.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartitions.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageStat.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitions.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitions.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitions.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/AggregateRpcService.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/InputSplitRpcService.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/MasterRpcManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/WorkerRpcManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueue.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffers.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendPartition.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSender.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessage.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSender.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffers.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/BufferFileSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/DefaultSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/HgkvFileSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/Sorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombinableSorterFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvInnerSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvOuterSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvInnerSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/InnerSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvInnerSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvOuterSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/OuterSortFlusher.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIterator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIteratorAdaptor.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMerger.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMergerImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorterImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/JavaInputSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SubKvSorter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/AbstractInputsSorting.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/HeapInputsSorting.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSorting.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/LoserTreeInputsSorting.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/RecvSortManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SendSortManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortManager.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingFactory.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingMode.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/EntryIterator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileGenerator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileReader.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileWriter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/SuperstepFileGenerator.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesWithFirstSubKvInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/SubKvEntriesInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/AbstractKvEntry.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/CachedPointer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/DefaultKvEntry.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntriesUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInputImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutputImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/InlinePointer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntry.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReaderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWithFirstSubKv.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Pointer.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Range.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryBuilder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryReader.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileSubEntryReader.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/AbstractHgkvFile.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDir.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDirImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFile.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/BlockBuilder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/DataBlockBuilderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvDirBuilderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilder.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDir4SubKvReaderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDirReaderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvFileReaderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DefaultSelectedFiles.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DisperseEvenlySelector.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/InputFilesSelector.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/SelectedFiles.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReader.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReaderImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriter.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriterImpl.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFile.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileInput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileOutput.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/Consumers.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/FileUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/util/StringEncodeUtil.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStat.java delete mode 100644 computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/load/LoadService.java delete mode 100644 computer-dist/Dockerfile delete mode 100644 computer-dist/pom.xml delete mode 100644 computer-dist/release-docs/LICENSE delete mode 100644 computer-dist/release-docs/NOTICE delete mode 100644 computer-dist/release-docs/licenses/LICENSE-accessors-smart.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-activation.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-apiguardian-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-audience-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-auto-service-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-automaton.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-avro.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-bcprov-jdk18on.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-bolt.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-builder-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-byte-buddy.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-checker-qual.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-beanutils.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-cli.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-codec.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-collections.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-compress.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-configuration.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-configuration2.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-crypto.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-io.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-lang.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-lang3.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-logging.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-math3.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-commons-text.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-curator-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-curator-recipes.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-disruptor.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-failsafe.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-generex.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-groovy-all.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-context.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-grpclb.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-netty.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-grpc-stub.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-gson.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-guava.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hadoop-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hadoop-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hadoop-hdfs-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hamcrest-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-hadoop-compat.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-hadoop2-compat.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-http.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-metrics-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-metrics.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-protocol-shaded.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-replication.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-server.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-shaded-client-byo-hadoop.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-shaded-miscellaneous.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-shaded-netty.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-shaded-protobuf.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hbase-zookeeper.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hessian.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-htrace-core4.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hugegraph-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hugegraph-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hugegraph-loader.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-hugegraph-rpc.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-core-asl.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-mapper-asl.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jackson-xc.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jakarta.activation-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jakarta.activation.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jamon-runtime.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javassist.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.annotation-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.el.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.inject.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.json.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.servlet-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jaxb-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jaxb-impl.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jcip-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jcodings.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jcommander.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jersey-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jersey-json.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jersey-servlet.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetcd-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetcd-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jettison.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-http.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-io.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-security.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-server.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-servlet.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-util-ajax.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-webapp.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jetty-xml.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jline.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-joda-time.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-joni.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jsch.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-json-smart.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-jsr305.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-junit.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-admin.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-crypto.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-identity.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-server.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerb-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerby-asn1.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerby-pkix.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerby-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kerby-xdr.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk7.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk8.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-client.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-admissionregistration.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apps.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-batch.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-certificates.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-common.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-coordination.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-discovery.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-events.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-extensions.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-flowcontrol.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-networking.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-node.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-policy.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-rbac.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-scheduling.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-model-storageclass.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-kubernetes-server-mock.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-lightning-csv.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-listenablefuture.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-log4j-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-log4j-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-log4j.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-logging-interceptor.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-lookout-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-lz4-java.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-minio.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-mockito-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-mvel2.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-netty-all.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-netty.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-nimbus-jose-jwt.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-objenesis.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-okhttp.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-okio-jvm.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-okio.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-opentracing-mock.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-opentracing-noop.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-opentracing-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-ow2-asm.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-paranamer.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-perfmark-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-protobuf-java-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-protobuf-java.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-re2j.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-resourcecify-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sfm-converter.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sfm-map.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sfm-reflect.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sfm-tuples.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sfm-util.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-simple-xml-safe.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-slf4j-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-snakeyaml.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-snappy-java.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sofa-common-tools.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-stax2-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sundr-codegen.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-sundr-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-swagger-annotations.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-swagger-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-token-provider.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-tracer-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-validation-api.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-woodstox-core.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-zjsonpatch.txt delete mode 100644 computer-dist/release-docs/licenses/LICENSE-zookeeper.txt delete mode 100755 computer-dist/scripts/apache-release.sh delete mode 100644 computer-dist/scripts/dependency/check_dependencies.sh delete mode 100644 computer-dist/scripts/dependency/known-dependencies.txt delete mode 100644 computer-dist/scripts/dependency/regenerate_known_dependencies.sh delete mode 100644 computer-dist/src/assembly/dataset/schema.groovy delete mode 100644 computer-dist/src/assembly/dataset/struct.json delete mode 100644 computer-dist/src/assembly/descriptor/assembly.xml delete mode 100644 computer-dist/src/assembly/static/bin/start-computer.sh delete mode 100644 computer-dist/src/assembly/static/conf/computer.properties delete mode 100644 computer-dist/src/assembly/static/conf/log4j2.xml delete mode 100755 computer-dist/src/assembly/travis/build-images.sh delete mode 100755 computer-dist/src/assembly/travis/install-env.sh delete mode 100755 computer-dist/src/assembly/travis/install-hdfs.sh delete mode 100755 computer-dist/src/assembly/travis/install-hugegraph-from-source.sh delete mode 100755 computer-dist/src/assembly/travis/load-data-into-hugegraph.sh delete mode 100644 computer-dist/src/assembly/travis/start-etcd.sh delete mode 100644 computer-dist/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputer.java delete mode 100644 computer-driver/pom.xml delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriverException.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/DefaultJobState.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobObserver.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobState.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobStatus.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/SuperstepStat.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/config/DriverConfigOption.java delete mode 100644 computer-driver/src/main/java/org/apache/hugegraph/computer/driver/util/JsonUtil.java delete mode 100644 computer-k8s-operator/Dockerfile delete mode 100644 computer-k8s-operator/crd-generate/.dockerignore delete mode 100644 computer-k8s-operator/crd-generate/.gitignore delete mode 100644 computer-k8s-operator/crd-generate/Dockerfile delete mode 100644 computer-k8s-operator/crd-generate/Makefile delete mode 100644 computer-k8s-operator/crd-generate/PROJECT delete mode 100644 computer-k8s-operator/crd-generate/README.md delete mode 100644 computer-k8s-operator/crd-generate/api/v1/groupversion_info.go delete mode 100644 computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_types.go delete mode 100644 computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_webhook.go delete mode 100644 computer-k8s-operator/crd-generate/api/v1/webhook_suite_test.go delete mode 100644 computer-k8s-operator/crd-generate/cmd/generate.go delete mode 100644 computer-k8s-operator/crd-generate/cmd/main.go delete mode 100644 computer-k8s-operator/crd-generate/config/certmanager/certificate.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/certmanager/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/certmanager/kustomizeconfig.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/crd/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/crd/kustomizeconfig.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/crd/patches/cainjection_in_hugegraphcomputerjobs.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/crd/patches/webhook_in_hugegraphcomputerjobs.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/default/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/default/manager_config_patch.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/default/manager_webhook_patch.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/default/webhookcainjection_patch.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/etcd/etcd_server.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/etcd/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/manager/controller_manager_config.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/manager/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/manager/manager.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/minio/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/minio/minio_server.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/prometheus/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/prometheus/monitor.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/auth_proxy_client_clusterrole.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role_binding.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/auth_proxy_service.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_viewer_role.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/leader_election_role.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/leader_election_role_binding.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/role.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/role_binding.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/rbac/service_account.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/samples/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/samples/operator_v1_hugegraphcomputerjob.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/webhook/kustomization.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/webhook/kustomizeconfig.yaml delete mode 100644 computer-k8s-operator/crd-generate/config/webhook/service.yaml delete mode 100644 computer-k8s-operator/crd-generate/go.mod delete mode 100644 computer-k8s-operator/crd-generate/hack/boilerplate.go.txt delete mode 100644 computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml delete mode 100644 computer-k8s-operator/manifest/hugegraph-computer-operator.yaml delete mode 100644 computer-k8s-operator/pom.xml delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/AbstractController.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/MatchWithMsg.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorRequest.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/WorkQueue.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/config/OperatorOptions.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobComponent.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobController.java delete mode 100644 computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobDeployer.java delete mode 100644 computer-k8s-operator/src/main/resources/log4j2.xml delete mode 100644 computer-k8s/schema/crd-schema.json delete mode 100644 computer-k8s/schema/enum-schema.json delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/Constants.java delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeDriverOptions.java delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJob.java delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJobList.java delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/driver/KubernetesDriver.java delete mode 100644 computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/util/KubeUtil.java delete mode 100755 computer-k8s/src/main/resources/docker_push.sh delete mode 100644 computer-test/conf/images/docker_push_test.sh delete mode 100644 computer-test/conf/log4j2-test.xml delete mode 100644 computer-test/pom.xml delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestBase.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionWithFilterTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/AllocatorTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocatorTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclersTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEventTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClientTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/CombinerTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombinerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/common/CommonTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfoTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ExceptionTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/common/FakeMasterComputation.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManagerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockComputation.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockMessageSender.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/ResuablePointerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/config/ConfigTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfigTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactoryTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultEdgeTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultPropertiesTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/GraphTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStatTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesIdTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactoryTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdTypeTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitionerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStatTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListListTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueListTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/FileInputSplitTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverterTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitDataTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockMasterInputManager.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockRpcClient.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockWorkerInputManager.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/IOTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/MockRankComputation.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedUnsafeBytesTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutputInputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionIdTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockClientHandler.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockMessageHandler.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockUnDecodeMessage.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/NetworkTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBufferTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManagerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNetworkTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactoryTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClientTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSessionTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffersTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManagerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverUtil.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitionTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitionTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffersTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManagerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MockTransportClient.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueueTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSenderTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/SenderTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBufferTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffersTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/SorterTestUtil.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/combiner/MockIntSumCombiner.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/EmptyFlusherTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SortLargeDataTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSortingTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/TestData.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/BitFileTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntriesUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntryOutputTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/FileManagerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvDirTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestUtil.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/store/ValueFileTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/util/IdUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtilTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/util/UtilTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation2.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputationParams.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation2.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockWorkerService.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStatTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/dist/ComputerDistTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputerTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/driver/ComputerOptionsTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/k8s/AbstractK8sTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/k8s/K8sTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/k8s/KubernetesDriverTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestBase.java delete mode 100644 computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestSuite.java delete mode 100644 computer-test/src/main/resources/computer.properties delete mode 100644 computer-test/src/main/resources/hdfs_input_test/core-site.xml delete mode 100644 computer-test/src/main/resources/hdfs_input_test/struct.json delete mode 100644 computer-test/src/main/resources/log4j2.xml delete mode 100644 computer-yarn/pom.xml create mode 100644 computer/README.md rename {computer-algorithm => computer/computer-algorithm}/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficient.java (100%) rename {computer-algorithm => computer/computer-algorithm}/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java (100%) rename {computer-algorithm => computer/computer-algorithm}/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java (100%) rename {computer-algorithm => computer/computer-algorithm}/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java (100%) rename {computer-algorithm => computer/computer-algorithm}/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathParams.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/common/ComputerContext.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdType.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValue.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListList.java (100%) rename {computer-api => computer/computer-api}/src/main/java/org/apache/hugegraph/computer/core/worker/Computation.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/aggregator/WorkerAggrManager.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombiner.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/combiner/VertexValueCombiner.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/common/exception/ReadException.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInput.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/input/InputSplit.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileVertxFetcher.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/network/ClientFactory.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/network/buffer/FileRegionBuffer.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSession.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueue.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvOuterSortFlusher.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/FileManager.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/StoreManager.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java (96%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java (94%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriterImpl.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFileImpl.java (100%) rename {computer-core => computer/computer-core}/src/main/java/org/apache/hugegraph/computer/core/util/ShutdownHook.java (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-annotations.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-asm.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-commons-net.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-curator-framework.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-grpc-core.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-hadoop-auth.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-hbase-mapreduce.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-hbase-procedure.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-hbase-protocol.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-jackson-annotations.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-jackson-databind.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-jersey-container-servlet-core.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-kerby-config.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-kotlin-stdlib.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-kubernetes-model-apiextensions.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-kubernetes-model-autoscaling.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-kubernetes-model-metrics.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-metrics-core.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-opentracing-api.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-sfm-csv.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-slf4j-log4j12.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-sofa-rpc-all.txt (100%) rename {computer-dist => computer/computer-dist}/release-docs/licenses/LICENSE-swagger-models.txt (100%) rename {computer-dist => computer/computer-dist}/src/assembly/dataset/load-movie-data.groovy (100%) rename {computer-dist => computer/computer-dist}/src/assembly/travis/install-k8s.sh (100%) rename {computer-driver => computer/computer-driver}/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriver.java (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/crd-generate/config/default/manager_auth_proxy_patch.yaml (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/crd-generate/config/rbac/hugegraphcomputerjob_editor_role.yaml (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/crd-generate/config/webhook/manifests.yaml (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/crd-generate/go.sum (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/manifest/hugegraph-computer-crd.v1.yaml (100%) rename {computer-k8s-operator => computer/computer-k8s-operator}/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorResult.java (100%) rename {computer-k8s => computer/computer-k8s}/pom.xml (100%) rename {computer-k8s => computer/computer-k8s}/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeSpecOptions.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValueTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValueTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueTypeTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutputTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManagerTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandlerTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEncodeDecodeHandlerTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitionTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/FlusherTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/store/HgkvFileTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/core/store/PointerTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/k8s/OperatorTest.java (100%) rename {computer-test => computer/computer-test}/src/main/java/org/apache/hugegraph/computer/suite/integrate/MockComputation.java (100%) rename {computer-test => computer/computer-test}/src/main/resources/hdfs_input_test/schema.json (100%) rename pom.xml => computer/pom.xml (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cfd38a12..dbca08039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: + path: computer fetch-depth: 2 - name: Install JDK 8 for HDFS diff --git a/computer-algorithm/pom.xml b/computer-algorithm/pom.xml deleted file mode 100644 index f7e60644a..000000000 --- a/computer-algorithm/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-algorithm - - - - org.apache.hugegraph - computer-api - ${revision} - provided - - - org.mvel - mvel2 - 2.4.13.Final - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - package - - shade - - - - - *:* - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - - diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java deleted file mode 100644 index 5b5cc2d5a..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentrality.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.betweenness; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class BetweennessCentrality implements Computation { - - private static final Logger LOG = Log.logger(BetweennessCentrality.class); - - public static final String OPTION_SAMPLE_RATE = - "betweenness_centrality.sample_rate"; - - private double sampleRate; - /* - * Record the number of shortest paths for intermediate vertex, suppose - * there are two shortest paths from A(source vertex) to E(current vertex), - * [A -> B -> C -> E] and [A -> B -> D -> E] - * - * The saved data is as follows - * A: B:2 - * C:1 - * D:1 - * totalCount:2 - */ - private Map seqTable; - - @Override - public String name() { - return "betweenness_centrality"; - } - - @Override - public String category() { - return "centrality"; - } - - @Override - public void init(Config config) { - this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D); - if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) { - throw new ComputerException("The param %s must be in (0.0, 1.0], " + - "actual got '%s'", - OPTION_SAMPLE_RATE, this.sampleRate); - } - this.seqTable = new HashMap<>(); - } - - @Override - public void close(Config config) { - // pass - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - // First superstep is special, we just send vertex id to its neighbors - BetweennessValue initialValue = new BetweennessValue(0.0D); - initialValue.arrivedVertices().add(vertex.id()); - vertex.value(initialValue); - if (vertex.numEdges() == 0) { - return; - } - - IdList sequence = new IdList(); - sequence.add(vertex.id()); - context.sendMessageToAllEdges(vertex, new BetweennessMessage(sequence)); - LOG.info("Finished compute-0 step"); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - BetweennessValue value = vertex.value(); - // The betweenness value to be updated - DoubleValue betweenness = value.betweenness(); - // Collect the vertices sent here this time - IdSet arrivingVertices = new IdSet(); - while (messages.hasNext()) { - BetweennessMessage message = messages.next(); - // The value contributed to the intermediate node on the path - DoubleValue vote = message.vote(); - betweenness.value(betweenness.value() + vote.value()); - - this.forward(context, vertex, message.sequence(), arrivingVertices); - } - value.arrivedVertices().addAll(arrivingVertices); - - boolean active = !this.seqTable.isEmpty(); - if (active) { - this.sendMessage(context); - this.seqTable.clear(); - } else { - vertex.inactivate(); - } - } - - private void forward(ComputationContext context, Vertex vertex, - IdList sequence, IdSet arrivingVertices) { - if (sequence.size() == 0) { - return; - } - - BetweennessValue value = vertex.value(); - IdSet arrivedVertices = value.arrivedVertices(); - Id source = sequence.getFirst(); - // The source vertex is arriving at first time - if (!arrivedVertices.contains(source)) { - arrivingVertices.add(source); - - SeqCount seqCount = this.seqTable.computeIfAbsent( - source, k -> new SeqCount()); - seqCount.totalCount++; - // Accumulate the number of shortest paths for intermediate vertices - for (int i = 1; i < sequence.size(); i++) { - Id id = sequence.get(i); - Map idCounts = seqCount.idCount; - idCounts.put(id, idCounts.getOrDefault(id, 0) + 1); - } - - Id selfId = vertex.id(); - sequence.add(selfId); - BetweennessMessage newMessage = new BetweennessMessage(sequence); - for (Edge edge : vertex.edges()) { - Id targetId = edge.targetId(); - if (this.sample(selfId, targetId, edge) && - !sequence.contains(targetId)) { - context.sendMessage(targetId, newMessage); - } - } - } - } - - private void sendMessage(ComputationContext context) { - for (SeqCount seqCount : this.seqTable.values()) { - for (Map.Entry entry : seqCount.idCount.entrySet()) { - double vote = (double) entry.getValue() / seqCount.totalCount; - BetweennessMessage voteMessage = new BetweennessMessage( - new DoubleValue(vote)); - - context.sendMessage(entry.getKey(), voteMessage); - } - } - } - - private boolean sample(Id sourceId, Id targetId, Edge edge) { - // Now just use the simplest way - return Math.random() <= this.sampleRate; - } - - private static class SeqCount { - - private final Map idCount; - private int totalCount; - - public SeqCount() { - this.idCount = new HashMap<>(); - this.totalCount = 0; - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java deleted file mode 100644 index 55e63996d..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityParams.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.betweenness; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.algorithm.centrality.closeness.ClosenessCentrality; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; - -public class BetweennessCentralityParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS, - DefaultMasterComputation.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - BetweennessCentrality.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - BetweennessValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - BetweennessMessage.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_DOUBLE_OUTPUT_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS, - EXTRACTALLPROPERTYINPUTFILTER_CLASS_NAME); - this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE, - "0.5D"); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java deleted file mode 100644 index 1522f3557..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessMessage.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.betweenness; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class BetweennessMessage implements CustomizeValue { - - private final IdList sequence; - private final DoubleValue vote; - - public BetweennessMessage() { - this.sequence = new IdList(); - this.vote = new DoubleValue(0.0D); - } - - public BetweennessMessage(IdList sequence) { - this.sequence = sequence; - this.vote = new DoubleValue(); - } - - public BetweennessMessage(DoubleValue betweenness) { - this.sequence = new IdList(); - this.vote = betweenness; - } - - public IdList sequence() { - return this.sequence; - } - - public DoubleValue vote() { - return this.vote; - } - - @Override - public BetweennessMessage value() { - throw new UnsupportedOperationException(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.sequence.read(in); - this.vote.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.sequence.write(out); - this.vote.write(out); - } - - @Override - public int compareTo(Value value) { - E.checkArgument(value instanceof BetweennessMessage, - "The BetweennessMessage can't compare with class '%s'", - value.getClass()); - BetweennessMessage other = (BetweennessMessage) value; - E.checkArgument(this.sequence.size() != 0, "Sequence can't be empty"); - E.checkArgument(other.sequence.size() != 0, "Sequence can't be empty"); - Id selfSourceId = this.sequence.getFirst(); - Id otherSourceId = other.sequence.getFirst(); - return selfSourceId.compareTo(otherSourceId); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java deleted file mode 100644 index 06e8db38c..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessValue.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.betweenness; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class BetweennessValue implements CustomizeValue { - - private final DoubleValue betweenness; - private final IdSet arrivedVertices; - - public BetweennessValue() { - this(0.0D); - } - - public BetweennessValue(double betweenness) { - this.betweenness = new DoubleValue(betweenness); - this.arrivedVertices = new IdSet(); - } - - public DoubleValue betweenness() { - return this.betweenness; - } - - public IdSet arrivedVertices() { - return this.arrivedVertices; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.betweenness.read(in); - this.arrivedVertices.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.betweenness.write(out); - this.arrivedVertices.write(out); - } - - @Override - public Double value() { - return this.betweenness.value(); - } - - @Override - public String string() { - return this.value().toString(); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java deleted file mode 100644 index c4ed974ed..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentrality.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.closeness; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.util.Log; -import org.apache.hugegraph.util.NumericUtil; -import org.slf4j.Logger; - -public class ClosenessCentrality implements Computation { - - private static final Logger LOG = Log.logger(ClosenessCentrality.class); - - public static final String OPTION_WEIGHT_PROPERTY = - "closeness_centrality.weight_property"; - public static final String OPTION_SAMPLE_RATE = - "closeness_centrality.sample_rate"; - - private String weightProp; - private double sampleRate; - - @Override - public String name() { - return "closeness_centrality"; - } - - @Override - public String category() { - return "centrality"; - } - - @Override - public void init(Config config) { - this.weightProp = config.getString(OPTION_WEIGHT_PROPERTY, ""); - this.sampleRate = config.getDouble(OPTION_SAMPLE_RATE, 1.0D); - if (this.sampleRate <= 0.0D || this.sampleRate > 1.0D) { - throw new ComputerException("The param %s must be in (0.0, 1.0], " + - "actual got '%s'", - OPTION_SAMPLE_RATE, this.sampleRate); - } - } - - @Override - public void close(Config config) { - // pass - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - // Set empty map as initial value - vertex.value(new ClosenessValue()); - - // Send messages to adjacent edges - for (Edge edge : vertex.edges()) { - Id senderId = vertex.id(); - // Get property value - double value = this.weightValue(edge.property(this.weightProp)); - DoubleValue distance = new DoubleValue(value); - ClosenessMessage message = new ClosenessMessage(senderId, senderId, - distance); - context.sendMessage(edge.targetId(), message); - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - Id selfId = vertex.id(); - // Save the distance from other vertices to self - ClosenessValue localValue = vertex.value(); - boolean active = false; - while (messages.hasNext()) { - active = true; - ClosenessMessage message = messages.next(); - Id senderId = message.senderId(); - // In theory, it won't happen, defensive programming - if (selfId.equals(senderId)) { - continue; - } - Id startId = message.startId(); - if (selfId.equals(startId)) { - continue; - } - - DoubleValue oldValue = localValue.get(startId); - DoubleValue newValue = message.distance(); - // If the id already exists and the new value >= old value, skip it - if (oldValue != null && newValue.compareTo(oldValue) >= 0) { - continue; - } - // Update local saved values (take smaller value) - localValue.put(startId, newValue); - // Send this smaller value to neighbors - this.sendMessage(context, vertex, senderId, startId, newValue); - } - if (!active) { - vertex.inactivate(); - } - } - - private void sendMessage(ComputationContext context, Vertex vertex, - Id senderId, Id startId, DoubleValue newValue) { - Id selfId = vertex.id(); - double baseNewValue = this.weightValue(newValue); - for (Edge edge : vertex.edges()) { - Id targetId = edge.targetId(); - if (senderId.equals(targetId) || startId.equals(targetId)) { - continue; - } - if (!sample(selfId, targetId, edge)) { - continue; - } - // Update distance information - double updatedValue = baseNewValue + this.weightValue(edge.property( - this.weightProp)); - DoubleValue newDistance = new DoubleValue(updatedValue); - ClosenessMessage message = new ClosenessMessage(selfId, startId, - newDistance); - context.sendMessage(targetId, message); - } - } - - private boolean sample(Id sourceId, Id targetId, Edge edge) { - // Now just use the simplest way - return Math.random() <= this.sampleRate; - } - - private double weightValue(Value rawValue) { - if (rawValue == null) { - return 1.0D; - } - if (rawValue.isNumber()) { - return NumericUtil.convertToNumber(rawValue).doubleValue(); - } else { - throw new ComputerException("The weight property can only be " + - "either Long or Int or Double or " + - "Float, but got %s", - rawValue.valueType()); - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java deleted file mode 100644 index abc74c545..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityParams.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.closeness; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; - -public class ClosenessCentralityParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS, - DefaultMasterComputation.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - ClosenessCentrality.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - ClosenessValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - ClosenessMessage.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_DOUBLE_OUTPUT_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS, - EXTRACTALLPROPERTYINPUTFILTER_CLASS_NAME); - this.setIfAbsent(params, ClosenessCentrality.OPTION_SAMPLE_RATE, - "0.5D"); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java deleted file mode 100644 index 925b3683f..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessMessage.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.closeness; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdFactory; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class ClosenessMessage implements CustomizeValue { - - private final GraphFactory graphFactory; - - private Id senderId; - private Id startId; - private DoubleValue distance; - - public ClosenessMessage() { - this(IdFactory.createId(), IdFactory.createId(), new DoubleValue(0.0D)); - } - - public ClosenessMessage(Id senderId, Id startId, DoubleValue distance) { - this.graphFactory = ComputerContext.instance().graphFactory(); - this.senderId = senderId; - this.startId = startId; - this.distance = distance; - } - - public Id senderId() { - return this.senderId; - } - - public Id startId() { - return this.startId; - } - - public DoubleValue distance() { - return this.distance; - } - - @Override - public ClosenessMessage value() { - throw new UnsupportedOperationException(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.senderId = this.graphFactory.createId(); - this.senderId.read(in); - - this.startId = this.graphFactory.createId(); - this.startId.read(in); - - this.distance = (DoubleValue) this.graphFactory.createValue( - ValueType.DOUBLE); - this.distance.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.senderId.write(out); - this.startId.write(out); - this.distance.write(out); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java deleted file mode 100644 index 9c126755d..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessValue.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.closeness; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.MapValue; - -public class ClosenessValue extends MapValue { - - @Override - public Double value() { - // Cumulative distance - double centrality = 0; - for (Map.Entry entry : this.entrySet()) { - centrality += 1.0D / entry.getValue().value(); - } - return centrality; - } - - @Override - public String string() { - return this.value().toString(); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java deleted file mode 100644 index a4649e063..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.degree; - -import java.util.Iterator; - -import org.apache.commons.lang.StringUtils; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.NullValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.computer.core.worker.WorkerContext; -import org.apache.hugegraph.util.NumericUtil; - -public class DegreeCentrality implements Computation { - - public static final String OPTION_WEIGHT_PROPERTY = "degree_centrality.weight_property"; - - private boolean calculateByWeightProperty; - private String weightProperty; - - @Override - public String name() { - return "degree_centrality"; - } - - @Override - public String category() { - return "centrality"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - if (!this.calculateByWeightProperty) { - vertex.value(new DoubleValue(vertex.numEdges())); - } else { - /* - * TODO: Here we use doubleValue type now, we will use BigDecimal - * and output "BigDecimalValue" to resolve double type overflow - * int the future; - */ - double totalWeight = 0.0; - for (Edge edge : vertex.edges()) { - double weight = weightValue(edge.property(this.weightProperty)); - totalWeight += weight; - if (Double.isInfinite(totalWeight)) { - throw new ComputerException("Calculate weight overflow, " + - "current is %s, edge '%s' " + - "is %s", totalWeight, edge, weight); - } - } - vertex.value(new DoubleValue(totalWeight)); - } - vertex.inactivate(); - } - - private static double weightValue(Value value) { - if (value == null) { - return 1.0; - } - - switch (value.valueType()) { - case LONG: - case INT: - case DOUBLE: - case FLOAT: - return NumericUtil.convertToNumber(value).doubleValue(); - default: - throw new ComputerException("The weight property can only be " + - "either Long or Int or Double or " + - "Float, but got %s", - value.valueType()); - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - // pass - } - - @Override - public void init(Config config) { - this.weightProperty = config.getString( - OPTION_WEIGHT_PROPERTY, ""); - this.calculateByWeightProperty = StringUtils.isNotEmpty( - this.weightProperty); - } - - @Override - public void close(Config config) { - // pass - } - - @Override - public void beforeSuperstep(WorkerContext context) { - // pass - } - - @Override - public void afterSuperstep(WorkerContext context) { - // pass - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java deleted file mode 100644 index 23a09b4f4..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.degree; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; - -public class DegreeCentralityParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS, - DefaultMasterComputation.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - DegreeCentrality.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_DOUBLE_OUTPUT_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java deleted file mode 100644 index 1141649cc..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.pagerank; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.computer.core.worker.WorkerContext; - -public class PageRank implements Computation { - - public static final String OPTION_ALPHA = "page_rank.alpha"; - - public static final double ALPHA_DEFAULT_VALUE = 0.15; - - private double alpha; - private double danglingRank; - private double initialRankInSuperstep; - private double cumulativeRank; - - private Aggregator l1DiffAggr; - private Aggregator cumulativeRankAggr; - private Aggregator danglingVertexNumAggr; - private Aggregator danglingCumulativeAggr; - - // Initial value in superstep 0. - private DoubleValue initialValue; - private DoubleValue contribValue; - - @Override - public String name() { - return "page_rank"; - } - - @Override - public String category() { - return "centrality"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - vertex.value(this.initialValue); - this.cumulativeRankAggr.aggregateValue(this.initialValue.value()); - int edgeCount = vertex.numEdges(); - if (edgeCount == 0) { - this.danglingVertexNumAggr.aggregateValue(1L); - this.danglingCumulativeAggr.aggregateValue( - this.initialValue.value()); - } else { - this.contribValue.value(this.initialValue.value() / edgeCount); - context.sendMessageToAllEdges(vertex, this.contribValue); - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - DoubleValue message = Combiner.combineAll(context.combiner(), messages); - double rankFromNeighbors = 0.0; - if (message != null) { - rankFromNeighbors = message.value(); - } - double rank = (this.danglingRank + rankFromNeighbors) * - (1.0 - this.alpha) + this.initialRankInSuperstep; - rank /= this.cumulativeRank; - DoubleValue oldRank = vertex.value(); - vertex.value(new DoubleValue(rank)); - this.l1DiffAggr.aggregateValue(Math.abs(oldRank.value() - rank)); - this.cumulativeRankAggr.aggregateValue(rank); - int edgeCount = vertex.numEdges(); - if (edgeCount == 0) { - this.danglingVertexNumAggr.aggregateValue(1L); - this.danglingCumulativeAggr.aggregateValue(rank); - } else { - this.contribValue.value(rank / edgeCount); - context.sendMessageToAllEdges(vertex, this.contribValue); - } - } - - @Override - public void init(Config config) { - this.alpha = config.getDouble(OPTION_ALPHA, ALPHA_DEFAULT_VALUE); - this.contribValue = new DoubleValue(); - } - - @Override - public void close(Config config) { - // pass - } - - @Override - public void beforeSuperstep(WorkerContext context) { - // Get aggregator values for computation - DoubleValue danglingTotalRank = context.aggregatedValue( - PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY); - DoubleValue cumulativeRank = context.aggregatedValue( - PageRank4Master.AGGR_COMULATIVE_PROBABILITY); - long totalVertex = context.totalVertexCount(); - - this.danglingRank = danglingTotalRank.value() / totalVertex; - this.initialRankInSuperstep = this.alpha / totalVertex; - this.cumulativeRank = cumulativeRank.value(); - this.initialValue = new DoubleValue(1.0 / totalVertex); - - // Create aggregators - this.l1DiffAggr = context.createAggregator( - PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY); - this.cumulativeRankAggr = context.createAggregator( - PageRank4Master.AGGR_COMULATIVE_PROBABILITY); - this.danglingVertexNumAggr = context.createAggregator( - PageRank4Master.AGGR_DANGLING_VERTICES_NUM); - this.danglingCumulativeAggr = context.createAggregator( - PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY); - } - - @Override - public void afterSuperstep(WorkerContext context) { - context.aggregateValue( - PageRank4Master.AGGR_COMULATIVE_PROBABILITY, - this.cumulativeRankAggr.aggregatedValue()); - context.aggregateValue( - PageRank4Master.AGGR_L1_NORM_DIFFERENCE_KEY, - this.l1DiffAggr.aggregatedValue()); - context.aggregateValue( - PageRank4Master.AGGR_DANGLING_VERTICES_NUM, - this.danglingVertexNumAggr.aggregatedValue()); - context.aggregateValue( - PageRank4Master.AGGR_COMULATIVE_DANGLING_PROBABILITY, - this.danglingCumulativeAggr.aggregatedValue()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java deleted file mode 100644 index 14a57eabf..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRank4Master.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.pagerank; - -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.LongValueSumCombiner; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.master.MasterComputation; -import org.apache.hugegraph.computer.core.master.MasterComputationContext; -import org.apache.hugegraph.computer.core.master.MasterContext; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class PageRank4Master implements MasterComputation { - - private static final Logger LOG = Log.logger(PageRank4Master.class); - - public static final String CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY = - "pagerank.l1DiffThreshold"; - public static final double CONF_L1_DIFF_THRESHOLD_DEFAULT = 0.00001D; - - public static final String AGGR_L1_NORM_DIFFERENCE_KEY = - "pagerank.aggr_l1_norm_difference"; - public static final String AGGR_DANGLING_VERTICES_NUM = - "pagerank.dangling_vertices_num"; - public static final String AGGR_COMULATIVE_DANGLING_PROBABILITY = - "pagerank.comulative_dangling_probability"; - public static final String AGGR_COMULATIVE_PROBABILITY = - "pagerank.comulative_probability"; - - private double l1DiffThreshold; - - @Override - public void init(MasterContext context) { - this.l1DiffThreshold = context.config().getDouble( - CONF_L1_NORM_DIFFERENCE_THRESHOLD_KEY, - CONF_L1_DIFF_THRESHOLD_DEFAULT); - context.registerAggregator(AGGR_DANGLING_VERTICES_NUM, - ValueType.LONG, - LongValueSumCombiner.class); - context.registerAggregator(AGGR_COMULATIVE_DANGLING_PROBABILITY, - ValueType.DOUBLE, - DoubleValueSumCombiner.class); - context.registerAggregator(AGGR_COMULATIVE_PROBABILITY, - ValueType.DOUBLE, - DoubleValueSumCombiner.class); - context.registerAggregator(AGGR_L1_NORM_DIFFERENCE_KEY, - ValueType.DOUBLE, - DoubleValueSumCombiner.class); - } - - @Override - public void close(MasterContext context) { - // pass - } - - @Override - public boolean compute(MasterComputationContext context) { - LongValue danglingVerticesNum = context.aggregatedValue( - AGGR_DANGLING_VERTICES_NUM); - DoubleValue danglingProbability = context.aggregatedValue( - AGGR_COMULATIVE_DANGLING_PROBABILITY); - DoubleValue cumulativeProbability = context.aggregatedValue( - AGGR_COMULATIVE_PROBABILITY); - DoubleValue l1NormDifference = context.aggregatedValue( - AGGR_L1_NORM_DIFFERENCE_KEY); - - StringBuilder sb = new StringBuilder(); - sb.append("[Superstep ").append(context.superstep()).append("]") - .append(", dangling vertices num = ").append(danglingVerticesNum) - .append(", cumulative dangling probability = ") - .append(danglingProbability.value()) - .append(", cumulative probability = ").append(cumulativeProbability) - .append(", l1 norm difference = ").append(l1NormDifference.value()); - - LOG.info("PageRank running status: {}", sb); - double l1Diff = l1NormDifference.value(); - if (context.superstep() > 1 && l1Diff <= this.l1DiffThreshold) { - return false; - } else { - return true; - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java deleted file mode 100644 index d308051f3..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankParams.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.pagerank; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; - -public class PageRankParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS, - PageRank4Master.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - PageRank.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_DOUBLE_OUTPUT_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientOutput.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientOutput.java deleted file mode 100644 index 40a11de35..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientOutput.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.cc; - -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphOutput; -import org.apache.hugegraph.structure.constant.WriteType; - -/** - * Offer 2 ways to output: write-back + hdfs-file(TODO) - */ -public class ClusteringCoefficientOutput extends HugeGraphOutput { - - @Override - public String name() { - return "clustering_coefficient"; - } - - @Override - public void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asFloat() - .writeType(WriteType.OLAP_RANGE) - .ifNotExist() - .create(); - } - - @Override - protected org.apache.hugegraph.structure.graph.Vertex constructHugeVertex(Vertex vertex) { - org.apache.hugegraph.structure.graph.Vertex hugeVertex = - new org.apache.hugegraph.structure.graph.Vertex(null); - hugeVertex.id(vertex.id().asObject()); - float triangle = ((ClusteringCoefficientValue) vertex.value()).count(); - int degree = ((ClusteringCoefficientValue) vertex.value()).idSet().value().size(); - hugeVertex.property(this.name(), 2 * triangle / degree / (degree - 1)); - return hugeVertex; - } - - /* TODO: enhance it - @Override - protected Float value(Vertex vertex) { - float triangle = ((ClusteringCoefficientValue) vertex.value()).count(); - int degree = ((ClusteringCoefficientValue) vertex.value()).idList().size(); - return 2 * triangle / degree / (degree - 1); - }*/ -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientParams.java deleted file mode 100644 index ed3b09fad..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientParams.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.cc; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.graph.value.IdList; - -public class ClusteringCoefficientParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - ClusteringCoefficient.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - IdList.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - ClusteringCoefficientValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - ClusteringCoefficientOutput.class.getName()); - this.setIfAbsent(params, ComputerOptions.INPUT_EDGE_FREQ.name(), - EdgeFrequency.SINGLE.name()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientValue.java deleted file mode 100644 index 056093d32..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientValue.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.cc; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -/** - * TODO: We could reuse triangle's result to simplify it (and avoid logical differences) - */ -public class ClusteringCoefficientValue implements Value.CustomizeValue { - - private IdSet idSet; - private IntValue count; - private final IntValue degree; - - public ClusteringCoefficientValue() { - this.idSet = new IdSet(); - this.count = new IntValue(); - this.degree = new IntValue(); - } - - public IdSet idSet() { - return this.idSet; - } - - public int count() { - return this.count.intValue(); - } - - public void count(Integer count) { - this.count.value(count); - } - - public int degree() { - return this.degree.value(); - } - - public void degree(Integer degree) { - this.degree.value(degree); - } - - @Override - public ClusteringCoefficientValue copy() { - ClusteringCoefficientValue ccValue = new ClusteringCoefficientValue(); - ccValue.idSet = this.idSet.copy(); - ccValue.count = this.count.copy(); - return ccValue; - } - - @Override - public Integer value() { - return this.count.value(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.idSet.read(in); - this.count.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.idSet.write(out); - this.count.write(out); - } - - @Override - public String toString() { - return String.valueOf(count); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java deleted file mode 100644 index eeffe8320..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/Kcore.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.kcore; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -import com.google.common.collect.Iterators; - -public class Kcore implements Computation { - - public static final String OPTION_K = "kcore.k"; - public static final int K_DEFAULT_VALUE = 3; - - private final KcoreValue initValue = new KcoreValue(); - - private int k = 0; - - @Override - public String name() { - return "kcore"; - } - - @Override - public String category() { - return "community"; - } - - @Override - public void init(Config config) { - this.k = config.getInt(OPTION_K, K_DEFAULT_VALUE); - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - KcoreValue value = this.initValue; - value.core((Id) vertex.id().copy()); - vertex.value(value); - - if (vertex.numEdges() < this.k) { - value.degree(0); - /* - * TODO: send int type message at phase 1, it's different from id - * type of phase 2 (wcc message), need support switch message type. - */ - context.sendMessageToAllEdges(vertex, vertex.id()); - vertex.inactivate(); - } else { - value.degree(vertex.numEdges()); - assert vertex.active(); - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - KcoreValue value = vertex.value(); - if (!value.active()) { - // Ignore messages of deleted vertex - vertex.inactivate(); - return; - } - - int superstep = context.superstep(); - if (superstep <= 2) { - int deleted = Iterators.size(messages); - assert value.active(); - if (value.decreaseDegree(deleted) < this.k) { - // From active to inactive, delete self vertex - value.degree(0); - if (superstep == 1) { - context.sendMessageToAllEdges(vertex, vertex.id()); - } - vertex.inactivate(); - } else { - // From active to active, do wcc from superstep 2 - if (superstep == 2) { - // Start wcc - context.sendMessageToAllEdgesIf(vertex, vertex.id(), - (source, target) -> { - return source.compareTo(target) < 0; - }); - vertex.inactivate(); - } else { - // Keep active at superstep 1 to continue superstep 2 - assert superstep == 1; - assert vertex.active(); - } - } - } else { - // Do wcc - assert superstep > 2; - Id message = Combiner.combineAll(context.combiner(), messages); - if (value.core().compareTo(message) > 0) { - value.core(message); - context.sendMessageToAllEdges(vertex, message); - } - vertex.inactivate(); - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java deleted file mode 100644 index fa4c532bf..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreParams.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.kcore; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.combiner.ValueMinCombiner; -import org.apache.hugegraph.computer.core.config.ComputerOptions; - -public class KcoreParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - Kcore.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - KcoreValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - BYTESID_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS, - ValueMinCombiner.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_ID_OUTPUT_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java deleted file mode 100644 index d00cbe6c1..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreValue.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.kcore; - -import java.io.IOException; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdFactory; -import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class KcoreValue implements CustomizeValue { - - private int degree; - private Id core; - - public KcoreValue() { - this.degree = 0; - this.core = IdFactory.createId(); - } - - public void degree(int degree) { - assert degree >= 0; - this.degree = degree; - } - - public int degree() { - return this.degree; - } - - public int decreaseDegree(int decrease) { - assert decrease <= this.degree; - this.degree -= decrease; - return this.degree; - } - - public boolean active() { - return this.degree > 0; - } - - public void core(Id core) { - this.core = core; - } - - public Id core() { - E.checkNotNull(this.core, "core"); - return this.core; - } - - @Override - public KcoreValue copy() { - KcoreValue kcoreValue = new KcoreValue(); - kcoreValue.core = (Id) this.core.copy(); - kcoreValue.degree = this.degree; - return kcoreValue; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.core.read(in); - this.degree = in.readInt(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.core.write(out); - out.writeInt(this.degree); - } - - @Override - public String toString() { - return new ToStringBuilder(this) - .append("core", this.core) - .append("degree", this.degree) - .toString(); - } - - @Override - public Object value() { - return this.core.value(); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java deleted file mode 100644 index 1bb34413e..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/Lpa.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.lpa; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import org.apache.commons.lang3.mutable.MutableInt; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -public class Lpa implements Computation { - - private final Random random = new Random(); - - @Override - public String name() { - return "lpa"; - } - - @Override - public String category() { - return "community"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - Id value = vertex.id(); - vertex.value(value); - vertex.inactivate(); - context.sendMessageToAllEdges(vertex, value); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - Id label = this.voteLabel(messages); - Id value = vertex.value(); - if (!value.equals(label)) { - vertex.value(label); - context.sendMessageToAllEdges(vertex, label); - } - vertex.inactivate(); - } - - private Id voteLabel(Iterator messages) { - // Calculate label frequency - Map labels = new HashMap<>(); - assert messages.hasNext(); - while (messages.hasNext()) { - Id label = messages.next(); - MutableInt labelCount = labels.get(label); - if (labelCount != null) { - labelCount.increment(); - } else { - labels.put(label, new MutableInt(1)); - } - } - - // Calculate the labels with maximum frequency - List maxLabels = new ArrayList<>(); - int maxFreq = 1; - for (Map.Entry e : labels.entrySet()) { - int value = e.getValue().intValue(); - if (value > maxFreq) { - maxFreq = value; - maxLabels.clear(); - } - if (value == maxFreq) { - maxLabels.add(e.getKey()); - } - } - - // Random choice - int selected = this.random.nextInt(maxLabels.size()); - return maxLabels.get(selected); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java deleted file mode 100644 index f5700a74b..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaParams.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.lpa; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; - -public class LpaParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - Lpa.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - BYTESID_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - BYTESID_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_ID_OUTPUT_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java deleted file mode 100644 index 89aa9b841..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCount.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.trianglecount; - -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -public class TriangleCount implements Computation { - - @Override - public String name() { - return "triangle_count"; - } - - @Override - public String category() { - return "community"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - IdSet selfId = new IdSet(); - selfId.add(vertex.id()); - - context.sendMessageToAllEdgesIf(vertex, selfId, (ids, targetId) -> { - return !vertex.id().equals(targetId); - }); - vertex.value(new TriangleCountValue()); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - IdSet neighbors = ((TriangleCountValue) vertex.value()).idSet(); - Integer count = this.triangleCount(context, vertex, messages, neighbors); - if (count != null) { - ((TriangleCountValue) vertex.value()).count(count); - vertex.inactivate(); - } - } - - protected Integer triangleCount(ComputationContext context, Vertex vertex, - Iterator messages, IdSet neighbors) { - if (context.superstep() == 1) { - // Collect outgoing neighbors - Set outNeighbors = getOutNeighbors(vertex); - neighbors.addAll(outNeighbors); - - // Collect incoming neighbors - while (messages.hasNext()) { - IdList idList = messages.next(); - assert idList.size() == 1; - Id inId = idList.getFirst(); - if (!outNeighbors.contains(inId)) { - neighbors.add(inId); - } - } - - // Send all neighbors to neighbors - for (Id targetId : neighbors.value()) { - context.sendMessage(targetId, neighbors); - } - } else if (context.superstep() == 2) { - int count = 0; - - while (messages.hasNext()) { - IdList twoDegreeNeighbors = messages.next(); - for (Id twoDegreeNeighbor : twoDegreeNeighbors.values()) { - if (neighbors.contains(twoDegreeNeighbor)) { - count++; - } - } - } - - return count >> 1; - } - return null; - } - - private static Set getOutNeighbors(Vertex vertex) { - Set outNeighbors = new HashSet<>(); - Edges edges = vertex.edges(); - for (Edge edge : edges) { - Id targetId = edge.targetId(); - if (!vertex.id().equals(targetId)) { - outNeighbors.add(targetId); - } - } - return outNeighbors; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java deleted file mode 100644 index 93ed3c270..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountParams.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.trianglecount; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.graph.value.IdList; - -public class TriangleCountParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - TriangleCount.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - IdList.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - TriangleCountValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_INT_OUTPUT_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.INPUT_EDGE_FREQ.name(), - EdgeFrequency.SINGLE.name()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java deleted file mode 100644 index b01c32e4c..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccParams.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.wcc; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.combiner.ValueMinCombiner; -import org.apache.hugegraph.computer.core.config.ComputerOptions; - -public class WccParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - Wcc.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - BYTESID_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - BYTESID_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS, - ValueMinCombiner.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - HUGEGRAPH_ID_OUTPUT_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java deleted file mode 100644 index ba5cbc74e..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetection.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -public class RingsDetection implements Computation { - - @Override - public String name() { - return "rings"; - } - - @Override - public String category() { - return "path"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - vertex.value(new IdListList()); - if (vertex.edges().size() == 0) { - return; - } - - // Init path - Id id = vertex.id(); - IdList path = new IdList(); - path.add(id); - - for (Edge edge : vertex.edges()) { - /* - * Only send path to vertex whose id is larger than - * or equals current vertex id - */ - if (id.compareTo(edge.targetId()) <= 0) { - context.sendMessage(edge.targetId(), path); - } - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - Id id = vertex.id(); - boolean halt = true; - while (messages.hasNext()) { - halt = false; - IdList sequence = messages.next(); - if (id.equals(sequence.getFirst())) { - // Use the smallest vertex record ring - boolean isMin = true; - for (int i = 1; i < sequence.size(); i++) { - Id pathVertexValue = sequence.get(i); - if (id.compareTo(pathVertexValue) > 0) { - isMin = false; - break; - } - } - if (isMin) { - sequence.add(id); - IdListList sequences = vertex.value(); - sequences.add(sequence.copy()); - } - } else { - boolean contains = false; - // Drop sequence if path contains this vertex - for (int i = 0; i < sequence.size(); i++) { - Id pathVertexValue = sequence.get(i); - if (pathVertexValue.equals(vertex.id())) { - contains = true; - break; - } - } - // Field ringId is smallest vertex id in path - Id ringId = sequence.getFirst(); - if (!contains) { - sequence.add(vertex.id()); - for (Edge edge : vertex.edges()) { - if (ringId.compareTo(edge.targetId()) <= 0) { - context.sendMessage(edge.targetId(), sequence); - } - } - } - } - } - if (halt) { - vertex.inactivate(); - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java deleted file mode 100644 index d16b499a8..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionOutput.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphOutput; - -public class RingsDetectionOutput extends HugeGraphOutput> { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asText() - .writeType(this.writeType()) - .valueList() - .ifNotExist() - .create(); - } - - @Override - protected List value(Vertex vertex) { - IdListList value = vertex.value(); - List propValues = new ArrayList<>(); - for (int i = 0; i < value.size(); i++) { - propValues.add(value.get(i).toString()); - } - return propValues; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java deleted file mode 100644 index be60a05b3..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/FilterDescribe.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings.filter; - -import java.util.List; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.hugegraph.util.JsonUtil; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableList; - -public class FilterDescribe { - - private final List vertexFilter; - private final List edgeFilter; - - @JsonCreator - private FilterDescribe(@JsonProperty("vertex_filter") - List vertexFilter, - @JsonProperty("edge_filter") - List edgeFilter) { - this.vertexFilter = CollectionUtils.isEmpty(vertexFilter) ? - ImmutableList.of() : - ImmutableList.copyOf(vertexFilter); - this.edgeFilter = CollectionUtils.isEmpty(edgeFilter) ? - ImmutableList.of() : - ImmutableList.copyOf(edgeFilter); - } - - public static FilterDescribe of(String describe) { - return JsonUtil.fromJson(describe, FilterDescribe.class); - } - - public List vertexFilter() { - return this.vertexFilter; - } - - public List edgeFilter() { - return this.edgeFilter; - } - - public static class DescribeItem { - - private final String label; - private final String propertyFilter; - - @JsonCreator - private DescribeItem(@JsonProperty(value = "label", - required = true) - String label, - @JsonProperty(value = "property_filter", - required = true) - String propertyFilter) { - this.label = label; - this.propertyFilter = propertyFilter; - } - - public String label() { - return this.label; - } - - public String propertyFilter() { - return this.propertyFilter; - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java deleted file mode 100644 index eb3c20efd..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionMessage.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings.filter; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.properties.DefaultProperties; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.Value.CustomizeValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class RingsDetectionMessage implements CustomizeValue> { - - private final IdList path; - private Properties walkEdgeProps; - - public RingsDetectionMessage() { - GraphFactory graphFactory = ComputerContext.instance().graphFactory(); - this.path = new IdList(); - this.walkEdgeProps = new DefaultProperties(graphFactory); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.path.read(in); - this.walkEdgeProps.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.path.write(out); - this.walkEdgeProps.write(out); - } - - public IdList path() { - return this.path; - } - - public void addPath(Vertex vertex) { - this.path.add(vertex.id()); - } - - public Properties walkEdgeProp() { - return this.walkEdgeProps; - } - - public void walkEdgeProp(Properties properties) { - this.walkEdgeProps = properties; - } - - @Override - public List value() { - return this.path.value(); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java deleted file mode 100644 index 81e58a5d1..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilter.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings.filter; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -public class RingsDetectionWithFilter - implements Computation { - - public static final String OPTION_FILTER = "rings.property_filter"; - - private SpreadFilter filter; - - @Override - public String name() { - return "rings_with_filter"; - } - - @Override - public String category() { - return "path"; - } - - @Override - public void init(Config config) { - this.filter = new SpreadFilter(config.getString(OPTION_FILTER, "{}")); - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - vertex.value(new IdListList()); - if (vertex.edges().size() == 0 || !this.filter.filter(vertex)) { - return; - } - - RingsDetectionMessage message = new RingsDetectionMessage(); - message.addPath(vertex); - for (Edge edge : vertex.edges()) { - if (this.filter.filter(edge)) { - message.walkEdgeProp(edge.properties()); - context.sendMessage(edge.targetId(), message); - } - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - boolean halt = true; - if (this.filter.filter(vertex)) { - Id vertexId = vertex.id(); - while (messages.hasNext()) { - halt = false; - RingsDetectionMessage message = messages.next(); - IdList path = message.path(); - if (vertexId.equals(path.getFirst())) { - // Use the smallest vertex record ring - boolean isMin = true; - for (int i = 0; i < path.size(); i++) { - Id pathVertexValue = path.get(i); - if (vertexId.compareTo(pathVertexValue) > 0) { - isMin = false; - break; - } - } - if (isMin) { - path.add(vertexId); - IdListList value = vertex.value(); - value.add(path.copy()); - } - } else { - boolean contains = false; - // Drop sequence if path contains this vertex - for (int i = 0; i < path.size(); i++) { - Id pathVertexValue = path.get(i); - if (pathVertexValue.equals(vertex.id())) { - contains = true; - break; - } - } - if (!contains) { - path.add(vertex.id()); - for (Edge edge : vertex.edges()) { - if (this.filter.filter(edge, message)) { - message.walkEdgeProp(edge.properties()); - context.sendMessage(edge.targetId(), message); - } - } - } - } - } - } - if (halt) { - vertex.inactivate(); - } - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java deleted file mode 100644 index 9cfdc3a66..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/RingsDetectionWithFilterParams.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings.filter; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.algorithm.path.rings.RingsDetectionOutput; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.IdListList; - -public class RingsDetectionWithFilterParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - RingsDetectionWithFilter.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - IdListList.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - RingsDetectionMessage.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - RingsDetectionOutput.class.getName()); - this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS, - EXTRACTALLPROPERTYINPUTFILTER_CLASS_NAME); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java deleted file mode 100644 index 9fdccbb5f..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/filter/SpreadFilter.java +++ /dev/null @@ -1,155 +0,0 @@ -/* * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings.filter; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.mvel2.MVEL; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; - -public class SpreadFilter { - - private static final String ALL = "*"; - private static final String MESSAGE = "$message"; - private static final String ELEMENT = "$element"; - private static final List PASS = ImmutableList.of(); - - private final Map vertexFilter; - private final Map edgeSpreadFilter; - private final Map edgeFilter; - - public SpreadFilter(String describe) { - FilterDescribe des = FilterDescribe.of(describe); - - this.vertexFilter = new HashMap<>(); - this.edgeSpreadFilter = new HashMap<>(); - this.edgeFilter = new HashMap<>(); - - this.init(this.vertexFilter, des.vertexFilter(), expression -> true); - this.init(this.edgeSpreadFilter, des.edgeFilter(), expression -> true); - // TODO: Use a better scheme to parse expressions with only $element - this.init(this.edgeFilter, des.edgeFilter(), expression -> { - return !expression.contains(MESSAGE); - }); - } - - private void init(Map filter, - List describes, - Predicate predicate) { - for (FilterDescribe.DescribeItem describe : describes) { - String labelName = describe.label(); - String propertyFilter = describe.propertyFilter(); - if (predicate.test(propertyFilter) || ALL.equals(labelName)) { - Serializable expression = MVEL.compileExpression( - describe.propertyFilter()); - filter.put(labelName, expression); - } - } - } - - public boolean filter(Vertex vertex) { - String label = vertex.label(); - List expressions = expressions(this.vertexFilter, label); - - if (expressions == PASS) { - return true; - } - - Map> params = - ImmutableMap.of(ELEMENT, vertex.properties().get()); - return filter(params, expressions); - } - - public boolean filter(Edge edge) { - String label = edge.label(); - List expressions = expressions(this.edgeFilter, label); - - if (expressions == PASS) { - return true; - } - - Map> params = - ImmutableMap.of(ELEMENT, edge.properties().get()); - return filter(params, expressions); - } - - public boolean filter(Edge edge, RingsDetectionMessage message) { - String label = edge.label(); - List expressions = expressions(this.edgeSpreadFilter, - label); - - if (expressions == PASS) { - return true; - } - - Map> params = - ImmutableMap.of(ELEMENT, edge.properties().get(), - MESSAGE, message.walkEdgeProp().get()); - return filter(params, expressions); - } - - private static boolean filter(Map> params, - List expressions) { - Map map = convertParamsValueToObject(params); - return expressions.stream() - .allMatch(expression -> { - return (Boolean) MVEL.executeExpression( - expression, map); - }); - } - - private static List expressions( - Map filter, - String label) { - if (filter.size() == 0) { - return PASS; - } - List expressions = new ArrayList<>(); - if (filter.containsKey(ALL)) { - expressions.add(filter.get(ALL)); - } - if (filter.containsKey(label)) { - expressions.add(filter.get(label)); - } - - return expressions; - } - - private static Map convertParamsValueToObject( - Map> params) { - Map result = new HashMap<>(); - for (Map.Entry> entry : params.entrySet()) { - Map subKv = new HashMap<>(); - Map param = entry.getValue(); - for (Map.Entry paramItem : param.entrySet()) { - subKv.put(paramItem.getKey(), paramItem.getValue().value()); - } - result.put(entry.getKey(), subKv); - } - return result; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/QuantityType.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/QuantityType.java deleted file mode 100644 index 7cf722e73..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/QuantityType.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -public enum QuantityType { - - SINGLE, - MULTIPLE, - ALL -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPath.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPath.java deleted file mode 100644 index b9b1f12b7..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPath.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.stream.Collectors; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.util.IdUtil; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.computer.core.worker.WorkerContext; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class SingleSourceShortestPath implements Computation { - - private static final Logger LOG = Log.logger(SingleSourceShortestPath.class); - - public static final String OPTION_SOURCE_ID = "single_source_shortest_path.source_id"; - public static final String OPTION_TARGET_ID = "single_source_shortest_path.target_id"; - public static final String OPTION_WEIGHT_PROPERTY = - "single_source_shortest_path.weight_property"; - public static final String OPTION_DEFAULT_WEIGHT = - "single_source_shortest_path.default_weight"; - - /** - * source vertex id. - */ - private Id sourceId; - - /** - * target vertex id. - * 1. single target: A - * 2. multiple target: A, B, C - * 3. all: * - */ - private IdSet targetIdSet; // empty when targetId is all - /** - * target quantity type - */ - private QuantityType targetQuantityType; - - /** - * weight property. - * weight value must be a positive number. - */ - private String weightProperty; - - /** - * default weight. - * default 1 - */ - private Double defaultWeight; - - //****************** global data ******************// - /** - * reached targets - */ - private IdSet reachedTargets; // empty when targetId is all - - @Override - public String category() { - return "path"; - } - - @Override - public String name() { - return "single_source_shortest_path"; - } - - @Override - public void init(Config config) { - String sourceIdStr = config.getString(OPTION_SOURCE_ID, ""); - if (StringUtils.isBlank(sourceIdStr)) { - throw new ComputerException("The param '%s' must not be blank", OPTION_SOURCE_ID); - } - this.sourceId = IdUtil.parseId(sourceIdStr); - - String targetIdStr = config.getString(OPTION_TARGET_ID, ""); - if (StringUtils.isBlank(targetIdStr)) { - throw new ComputerException("The param '%s' must not be blank", OPTION_TARGET_ID); - } - // remove spaces - targetIdStr = Arrays.stream(targetIdStr.split(",")) - .map(e -> e.trim()) - .collect(Collectors.joining(",")); - this.targetQuantityType = this.getQuantityType(targetIdStr); - if (this.targetQuantityType != QuantityType.ALL) { - this.targetIdSet = new IdSet(); - for (String targetId : targetIdStr.split(",")) { - targetIdSet.add(IdUtil.parseId(targetId)); - } - } - - this.weightProperty = config.getString(OPTION_WEIGHT_PROPERTY, ""); - - this.defaultWeight = config.getDouble(OPTION_DEFAULT_WEIGHT, 1); - if (this.defaultWeight <= 0) { - throw new ComputerException("The param '%s' must be greater than 0, " + - "actual got '%s'", - OPTION_DEFAULT_WEIGHT, this.defaultWeight); - } - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - SingleSourceShortestPathValue value = new SingleSourceShortestPathValue(); - value.unreachable(); - vertex.value(value); - - // start from source vertex - if (!this.sourceId.equals(vertex.id())) { - vertex.inactivate(); - return; - } - value.zeroDistance(); // source vertex - - // single target && source == target - if (this.targetQuantityType == QuantityType.SINGLE && - this.targetIdSet.contains(this.sourceId)) { - LOG.debug("source vertex equals target vertex: {}", this.sourceId); - vertex.inactivate(); - return; - } - - if (vertex.numEdges() <= 0) { - // isolated vertex - LOG.debug("The source vertex is isolated: {}", this.sourceId); - vertex.inactivate(); - return; - } - - vertex.edges().forEach(edge -> { - SingleSourceShortestPathValue message = new SingleSourceShortestPathValue(); - message.addToPath(vertex, this.getEdgeWeight(edge)); - - context.sendMessage(edge.targetId(), message); - }); - - vertex.inactivate(); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - if (this.isTarget(vertex) && !this.reachedTargets.contains(vertex.id())) { - // reached targets - this.reachedTargets.add(vertex.id()); - } - - while (messages.hasNext()) { - SingleSourceShortestPathValue message = messages.next(); - SingleSourceShortestPathValue value = vertex.value(); - - if (message.totalWeight() < value.totalWeight()) { - // find a shorter path - value.shorterPath(vertex, message.path(), message.totalWeight()); - } else { - continue; - } - - // target vertex finds all targets reached or nowhere to go - if ((this.isTarget(vertex) && this.isAllTargetsReached(vertex)) || - vertex.numEdges() <= 0) { - continue; - } - - vertex.edges().forEach(edge -> { - SingleSourceShortestPathValue forwardMessage = new SingleSourceShortestPathValue(); - forwardMessage.addToPath(value.path(), - value.totalWeight() + this.getEdgeWeight(edge)); - - context.sendMessage(edge.targetId(), forwardMessage); - }); - } - - vertex.inactivate(); - } - - @Override - public void beforeSuperstep(WorkerContext context) { - this.reachedTargets = context.aggregatedValue( - SingleSourceShortestPathMaster.SINGLE_SOURCE_SHORTEST_PATH_REACHED_TARGETS); - } - - @Override - public void afterSuperstep(WorkerContext context) { - context.aggregateValue( - SingleSourceShortestPathMaster.SINGLE_SOURCE_SHORTEST_PATH_REACHED_TARGETS, - this.reachedTargets); - } - - /** - * get quantityType by targetId - */ - private QuantityType getQuantityType(String targetIdStr) { - if (targetIdStr.equals("*")) { - return QuantityType.ALL; - } else if (targetIdStr.contains(",")) { - return QuantityType.MULTIPLE; - } else { - return QuantityType.SINGLE; - } - } - - /** - * get the weight of an edge by its weight property - */ - private double getEdgeWeight(Edge edge) { - double weight = this.defaultWeight; - - Value property = edge.property(this.weightProperty); - if (property != null) { - if (!property.isNumber()) { - throw new ComputerException("The value of %s must be a numeric value, " + - "actual got '%s'", - this.weightProperty, property.string()); - } - - weight = ((DoubleValue) property).doubleValue(); - if (weight <= 0) { - throw new ComputerException("The value of %s must be greater than 0, " + - "actual got '%s'", - this.weightProperty, property.string()); - } - } - return weight; - } - - /** - * determine whether vertex is one of the target - */ - private boolean isTarget(Vertex vertex) { - return this.targetQuantityType != QuantityType.ALL && - this.targetIdSet.contains(vertex.id()); - } - - /** - * determine whether all targets reached - */ - private boolean isAllTargetsReached(Vertex vertex) { - if (this.targetQuantityType == QuantityType.ALL) { - return false; - } - - if (this.targetIdSet.size() == this.reachedTargets.size()) { - for (Id targetId : this.targetIdSet.value()) { - if (!this.reachedTargets.contains(targetId)) { - return false; - } - } - return true; - } - return false; - } - - public IdSet getTargetIdSet() { - return this.targetIdSet; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathCombiner.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathCombiner.java deleted file mode 100644 index 78ea2cd26..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathCombiner.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import org.apache.hugegraph.computer.core.combiner.Combiner; - -public class SingleSourceShortestPathCombiner implements Combiner { - - @Override - public void combine(SingleSourceShortestPathValue v1, SingleSourceShortestPathValue v2, - SingleSourceShortestPathValue result) { - SingleSourceShortestPathValue shorter = v2.totalWeight() < v1.totalWeight() ? v2 : v1; - result.copy(shorter); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathMaster.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathMaster.java deleted file mode 100644 index 358d77ad4..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathMaster.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import org.apache.hugegraph.computer.core.combiner.IdSetMergeCombiner; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.master.MasterComputation; -import org.apache.hugegraph.computer.core.master.MasterComputationContext; -import org.apache.hugegraph.computer.core.master.MasterContext; - -public class SingleSourceShortestPathMaster implements MasterComputation { - - public static final String SINGLE_SOURCE_SHORTEST_PATH_REACHED_TARGETS = - "single_source_shortest_path.reached_targets"; - - @Override - public void init(MasterContext context) { - context.registerAggregator(SINGLE_SOURCE_SHORTEST_PATH_REACHED_TARGETS, - ValueType.ID_SET, - IdSetMergeCombiner.class); - } - - @Override - public void close(MasterContext context) { - // pass - } - - @Override - public boolean compute(MasterComputationContext context) { - return true; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathOutput.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathOutput.java deleted file mode 100644 index 943babb2e..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathOutput.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphOutput; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.util.JsonUtil; - -public class SingleSourceShortestPathOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asText() - .writeType(this.writeType()) - .valueList() - .ifNotExist() - .create(); - } - - @Override - protected String value(Vertex vertex) { - SingleSourceShortestPathValue value = vertex.value(); - - Map map = new HashMap(); - map.put("path", value.path().toString()); - map.put("total_weight", value.totalWeight()); - return JsonUtil.toJson(map); - } - - @Override - public boolean filter(Config config, Computation computation, Vertex vertex) { - SingleSourceShortestPath sssp = (SingleSourceShortestPath) computation; - return sssp.getTargetIdSet() == null || sssp.getTargetIdSet().contains(vertex.id()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathValue.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathValue.java deleted file mode 100644 index f6ca1c166..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathValue.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class SingleSourceShortestPathValue implements Value.CustomizeValue> { - - /** - * path - */ - private final IdList path; - - /** - * total weight. - * infinity means unreachable. - */ - private final DoubleValue totalWeight; - - public SingleSourceShortestPathValue() { - this.path = new IdList(); - this.totalWeight = new DoubleValue(0); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.path.read(in); - this.totalWeight.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.path.write(out); - this.totalWeight.write(out); - } - - @Override - public List value() { - return this.path.value(); - } - - public void unreachable() { - this.totalWeight.value(Double.POSITIVE_INFINITY); - } - - public void zeroDistance() { - this.totalWeight.value(0); - } - - public void shorterPath(Vertex vertex, IdList path, double weight) { - this.path.clear(); - this.path.addAll(path.copy().values()); - this.path.add(vertex.id()); - this.totalWeight.value(weight); - } - - public void addToPath(Vertex vertex, double weight) { - this.path.add(vertex.id()); - this.totalWeight.value(weight); - } - - public void addToPath(IdList path, double weight) { - this.path.addAll(path.copy().values()); - this.totalWeight.value(weight); - } - - public IdList path() { - return this.path; - } - - public double totalWeight() { - return this.totalWeight.doubleValue(); - } - - public void copy(SingleSourceShortestPathValue value) { - this.path.clear(); - this.path.addAll(value.path().copy().values()); - this.totalWeight.value(value.totalWeight()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java deleted file mode 100644 index 6401de4fe..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.sampling; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class RandomWalk implements Computation { - - private static final Logger LOG = Log.logger(RandomWalk.class); - - public static final String OPTION_WALK_PER_NODE = "random_walk.walk_per_node"; - public static final String OPTION_WALK_LENGTH = "random_walk.walk_length"; - - public static final String OPTION_WEIGHT_PROPERTY = "random_walk.weight_property"; - public static final String OPTION_DEFAULT_WEIGHT = "random_walk.default_weight"; - public static final String OPTION_MIN_WEIGHT_THRESHOLD = "random_walk.min_weight_threshold"; - public static final String OPTION_MAX_WEIGHT_THRESHOLD = "random_walk.max_weight_threshold"; - - public static final String OPTION_RETURN_FACTOR = "random_walk.return_factor"; - public static final String OPTION_INOUT_FACTOR = "random_walk.inout_factor"; - - /** - * Random - */ - private Random random; - - /** - * Number of times per vertex(source vertex) walks - */ - private Integer walkPerNode; - - /** - * Walk length - */ - private Integer walkLength; - - /** - * Weight property, related to the walking probability - */ - private String weightProperty; - - /** - * Biased walk - * Default 1 - */ - private Double defaultWeight; - - /** - * Weight less than this threshold will be truncated. - * Default 0 - */ - private Double minWeightThreshold; - - /** - * Weight greater than this threshold will be truncated. - * Default Integer.MAX_VALUE - */ - private Double maxWeightThreshold; - - /** - * Controls the probability of re-walk to a previously walked vertex. - * Default 1 - */ - private Double returnFactor; - - /** - * Controls whether to walk inward or outward. - * Default 1 - */ - private Double inOutFactor; - - @Override - public String category() { - return "sampling"; - } - - @Override - public String name() { - return "random_walk"; - } - - @Override - public void init(Config config) { - this.random = new Random(); - - this.walkPerNode = config.getInt(OPTION_WALK_PER_NODE, 3); - if (this.walkPerNode <= 0) { - throw new ComputerException("The param %s must be greater than 0, " + - "actual got '%s'", - OPTION_WALK_PER_NODE, this.walkPerNode); - } - - this.walkLength = config.getInt(OPTION_WALK_LENGTH, 3); - if (this.walkLength <= 0) { - throw new ComputerException("The param %s must be greater than 0, " + - "actual got '%s'", - OPTION_WALK_LENGTH, this.walkLength); - } - - this.weightProperty = config.getString(OPTION_WEIGHT_PROPERTY, ""); - - this.defaultWeight = config.getDouble(OPTION_DEFAULT_WEIGHT, 1); - if (this.defaultWeight <= 0) { - throw new ComputerException("The param %s must be greater than 0, " + - "actual got '%s'", - OPTION_DEFAULT_WEIGHT, this.defaultWeight); - } - - this.minWeightThreshold = config.getDouble(OPTION_MIN_WEIGHT_THRESHOLD, 0.0); - if (this.minWeightThreshold < 0) { - throw new ComputerException("The param %s must be greater than or equal 0, " + - "actual got '%s'", - OPTION_MIN_WEIGHT_THRESHOLD, this.minWeightThreshold); - } - - this.maxWeightThreshold = config.getDouble(OPTION_MAX_WEIGHT_THRESHOLD, Double.MAX_VALUE); - if (this.maxWeightThreshold < 0) { - throw new ComputerException("The param %s must be greater than or equal 0, " + - "actual got '%s'", - OPTION_MAX_WEIGHT_THRESHOLD, this.maxWeightThreshold); - } - - if (this.minWeightThreshold > this.maxWeightThreshold) { - throw new ComputerException("%s must be greater than or equal %s, ", - OPTION_MAX_WEIGHT_THRESHOLD, OPTION_MIN_WEIGHT_THRESHOLD); - } - - this.returnFactor = config.getDouble(OPTION_RETURN_FACTOR, 1); - if (this.returnFactor <= 0) { - throw new ComputerException("The param %s must be greater than 0, " + - "actual got '%s'", - OPTION_RETURN_FACTOR, this.returnFactor); - } - - this.inOutFactor = config.getDouble(OPTION_INOUT_FACTOR, 1); - if (this.inOutFactor <= 0) { - throw new ComputerException("The param %s must be greater than 0, " + - "actual got '%s'", - OPTION_INOUT_FACTOR, this.inOutFactor); - } - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - vertex.value(new IdListList()); - - RandomWalkMessage message = new RandomWalkMessage(); - message.addToPath(vertex); - - if (vertex.numEdges() <= 0) { - // isolated vertex - this.savePath(vertex, message.path()); - vertex.inactivate(); - return; - } - - vertex.edges().forEach(edge -> message.addToPreVertexAdjacence(edge.targetId())); - - for (int i = 0; i < walkPerNode; ++i) { - // random select one edge and walk - Edge selectedEdge = this.randomSelectEdge(null, null, vertex.edges()); - context.sendMessage(selectedEdge.targetId(), message); - } - - vertex.inactivate(); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - while (messages.hasNext()) { - RandomWalkMessage message = messages.next(); - // the last id of path is the previous id - Id preVertexId = message.path().getLast(); - - if (message.isFinish()) { - this.savePath(vertex, message.path()); - - vertex.inactivate(); - continue; - } - - message.addToPath(vertex); - - if (vertex.numEdges() <= 0) { - // there is nowhere to walk, finish eariler - message.finish(); - context.sendMessage(this.getSourceId(message.path()), message); - - vertex.inactivate(); - continue; - } - - if (message.path().size() >= this.walkLength + 1) { - message.finish(); - Id sourceId = this.getSourceId(message.path()); - - if (vertex.id().equals(sourceId)) { - // current vertex is the source vertex,no need to send message once more - this.savePath(vertex, message.path()); - } else { - context.sendMessage(sourceId, message); - } - - vertex.inactivate(); - continue; - } - - vertex.edges().forEach(edge -> message.addToPreVertexAdjacence(edge.targetId())); - - // random select one edge and walk - Edge selectedEdge = this.randomSelectEdge(preVertexId, message.preVertexAdjacence(), - vertex.edges()); - context.sendMessage(selectedEdge.targetId(), message); - } - - vertex.inactivate(); - } - - /** - * random select one edge - */ - private Edge randomSelectEdge(Id preVertexId, IdList preVertexAdjacenceIdList, Edges edges) { - // TODO: use primitive array instead, like DoubleArray, - // in order to reduce memory fragmentation generated during calculations - List weightList = new ArrayList<>(); - - Iterator iterator = edges.iterator(); - while (iterator.hasNext()) { - Edge edge = iterator.next(); - // calculate edge weight - double weight = this.getEdgeWeight(edge); - double finalWeight = this.calculateEdgeWeight(preVertexId, preVertexAdjacenceIdList, - edge.targetId(), weight); - // TODO: improve to avoid OOM - weightList.add(finalWeight); - } - - int selectedIndex = this.randomSelectIndex(weightList); - Edge selectedEdge = this.selectEdge(edges.iterator(), selectedIndex); - return selectedEdge; - } - - /** - * get the weight of an edge by its weight property - */ - private double getEdgeWeight(Edge edge) { - double weight = this.defaultWeight; - - Value property = edge.property(this.weightProperty); - if (property != null) { - if (!property.isNumber()) { - throw new ComputerException("The value of %s must be a numeric value, " + - "actual got '%s'", - this.weightProperty, property.string()); - } - - weight = ((DoubleValue) property).doubleValue(); - } - - // weight threshold truncation - if (weight < this.minWeightThreshold) { - weight = this.minWeightThreshold; - } - if (weight > this.maxWeightThreshold) { - weight = this.maxWeightThreshold; - } - return weight; - } - - /** - * calculate edge weight - */ - private double calculateEdgeWeight(Id preVertexId, IdList preVertexAdjacenceIdList, - Id nextVertexId, double weight) { - /* - * 3 types of vertices. - * 1. current vertex, called v - * 2. previous vertex, called t - * 3. current vertex outer vertex, called x(x1, x2.. xn) - * - * Definition of weight correction coefficient α: - * if distance(t, x) = 0, then α = 1.0 / returnFactor - * if distance(t, x) = 1, then α = 1.0 - * if distance(t, x) = 2, then α = 1.0 / inOutFactor - * - * Final edge weight π(v, x) = α * edgeWeight - */ - double finalWeight = 0.0; - if (preVertexId != null && preVertexId.equals(nextVertexId)) { - // distance(t, x) = 0 - finalWeight = 1.0 / this.returnFactor * weight; - } else if (preVertexAdjacenceIdList != null && - preVertexAdjacenceIdList.contains(nextVertexId)) { - // distance(t, x) = 1 - finalWeight = 1.0 * weight; - } else { - // distance(t, x) = 2 - finalWeight = 1.0 / this.inOutFactor * weight; - } - return finalWeight; - } - - /** - * random select index - */ - private int randomSelectIndex(List weightList) { - int selectedIndex = 0; - double totalWeight = weightList.stream().mapToDouble(Double::doubleValue).sum(); - double randomNum = random.nextDouble() * totalWeight; // [0, totalWeight) - - // determine which interval the random number falls into - double cumulativeWeight = 0; - for (int i = 0; i < weightList.size(); ++i) { - cumulativeWeight += weightList.get(i); - if (randomNum < cumulativeWeight) { - selectedIndex = i; - break; - } - } - return selectedIndex; - } - - /** - * select edge from iterator by index - */ - private Edge selectEdge(Iterator iterator, int selectedIndex) { - Edge selectedEdge = null; - - int index = 0; - while (iterator.hasNext()) { - selectedEdge = iterator.next(); - if (index == selectedIndex) { - break; - } - index++; - } - return selectedEdge; - } - - /** - * get source id of path - */ - private Id getSourceId(IdList path) { - // the first id of path is the source id - return path.getFirst(); - } - - /** - * save path - */ - private void savePath(Vertex sourceVertex, IdList path) { - IdListList curValue = sourceVertex.value(); - curValue.add(path.copy()); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkMessage.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkMessage.java deleted file mode 100644 index 6d92781ac..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkMessage.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.sampling; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class RandomWalkMessage implements Value.CustomizeValue> { - - /** - * Previous vertex adjacent(out edge) vertex id list - */ - private final IdList preVertexAdjacence; - - /** - * Random walk path - */ - private final IdList path; - - /** - * Finish flag - */ - private BooleanValue isFinish; - - public RandomWalkMessage() { - this.preVertexAdjacence = new IdList(); - this.path = new IdList(); - this.isFinish = new BooleanValue(false); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.preVertexAdjacence.read(in); - this.path.read(in); - this.isFinish.read(in); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.preVertexAdjacence.write(out); - this.path.write(out); - this.isFinish.write(out); - } - - @Override - public List value() { - return this.path.value(); - } - - public IdList preVertexAdjacence() { - return this.preVertexAdjacence; - } - - public void addToPreVertexAdjacence(Id vertexId) { - this.preVertexAdjacence.add(vertexId); - } - - public IdList path() { - return this.path; - } - - public void addToPath(Vertex vertex) { - this.path.add(vertex.id()); - } - - public boolean isFinish() { - return this.isFinish.boolValue(); - } - - public void finish() { - this.isFinish = new BooleanValue(true); - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkOutput.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkOutput.java deleted file mode 100644 index 47ef2d58f..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkOutput.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.sampling; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphOutput; - -public class RandomWalkOutput extends HugeGraphOutput> { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asText() - .writeType(this.writeType()) - .valueList() - .ifNotExist() - .create(); - } - - @Override - protected List value(Vertex vertex) { - IdListList value = vertex.value(); - List propValues = new ArrayList<>(); - for (int i = 0; i < value.size(); i++) { - propValues.add(value.get(i).toString()); - } - return propValues; - } -} diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkParams.java b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkParams.java deleted file mode 100644 index a8d9fd817..000000000 --- a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkParams.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.sampling; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.IdListList; - -public class RandomWalkParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - RandomWalk.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - RandomWalkMessage.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - IdListList.class.getName()); - this.setIfAbsent(params, ComputerOptions.INPUT_FILTER_CLASS, - EXTRACTALLPROPERTYINPUTFILTER_CLASS_NAME); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - RandomWalkOutput.class.getName()); - - this.setIfAbsent(params, RandomWalk.OPTION_WALK_PER_NODE, "3"); - this.setIfAbsent(params, RandomWalk.OPTION_WALK_LENGTH, "3"); - } -} diff --git a/computer-api/pom.xml b/computer-api/pom.xml deleted file mode 100644 index b3cf5c9f9..000000000 --- a/computer-api/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-api - - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - org.apache.hugegraph - hugegraph-client - - - diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmParams.java b/computer-api/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmParams.java deleted file mode 100644 index 4343e485f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmParams.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm; - -import static org.apache.hugegraph.computer.core.config.ComputerOptions.COMPUTER_PROHIBIT_USER_OPTIONS; - -import java.util.Map; - -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public interface AlgorithmParams { - - Logger LOG = Log.logger(AlgorithmParams.class); - - String BYTESID_CLASS_NAME = "org.apache.hugegraph.computer.core.graph.id.BytesId"; - String HDFS_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core.output.hdfs.HdfsOutput"; - String HUGEGRAPH_ID_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphIdOutput"; - String LOG_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core.output.LogOutput"; - String HUGEGRAPH_DOUBLE_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphDoubleOutput"; - String HUGEGRAPH_FLOAT_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphFloatOutput"; - String HUGEGRAPH_INT_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphIntOutput"; - String HUGEGRAPH_LONG_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphLongOutput"; - String HUGEGRAPH_STRING_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphStringOutput"; - String HUGEGRAPH_LIST_OUTPUT_CLASS_NAME = "org.apache.hugegraph.computer.core" + - ".output.hg.HugeGraphListOutput"; - String DEFAULTINPUTFILTER_CLASS_NAME = "org.apache.hugegraph.computer" + - ".core.input.filter" + - ".DefaultInputFilter"; - String EXTRACTALLPROPERTYINPUTFILTER_CLASS_NAME = "org.apache.hugegraph.computer" + - ".core.input.filter" + - ".ExtractAllPropertyInputFilter"; - - /** - * set algorithm's specific configuration - * @param params - */ - void setAlgorithmParameters(Map params); - - default void setIfAbsent(Map params, String key, - String value) { - if (!params.containsKey(key) && !COMPUTER_PROHIBIT_USER_OPTIONS.contains(key)) { - LOG.debug("Put parameters key={}, value={}", key, value); - params.put(key, value); - } - } - - default void setIfAbsent(Map params, - ConfigOption keyOption, - String value) { - this.setIfAbsent(params, keyOption.name(), value); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator.java deleted file mode 100644 index 85d35c660..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public interface Aggregator { - - /** - * Used by worker to aggregate a new value when compute a vertex. - * The combination method needs to be commutative and associative. - * Can be called in worker computation compute() or afterSuperstep(). - * @param value The value to be aggregated - */ - void aggregateValue(V value); - - /** - * Used by worker to aggregate an int value. For performance reasons, it - * can aggregate without create an IntValue object. - */ - default void aggregateValue(int value) { - throw new ComputerException("Not implemented: aggregateValue(int)"); - } - - /** - * Used by worker to aggregate a long value. For performance reasons, it - * can aggregate without create a LongValue object. - */ - default void aggregateValue(long value) { - throw new ComputerException("Not implemented: aggregateValue(long)"); - } - - /** - * Used by worker to aggregate a float value. For performance reasons, it - * can aggregate without create a FloatValue object. - */ - default void aggregateValue(float value) { - throw new ComputerException("Not implemented: aggregateValue(float)"); - } - - /** - * Used by worker to aggregate a double value. For performance reasons, - * it can aggregate without create a DoubleValue object. - */ - default void aggregateValue(double value) { - throw new ComputerException("Not implemented: aggregateValue(double)"); - } - - /** - * Used by worker or master to get the aggregated value. The worker - * get an aggregated value of previous superstep in current superstep. - * The master can get an aggregated value of current superstep when - * master-computation compute(). - */ - V aggregatedValue(); - - /** - * Used by worker or master to set current aggregated value directly. The - * worker set aggregated value and then send to master for further - * aggregation. The master set aggregated value and then used by workers in - * the next superstep. - */ - void aggregatedValue(V value); - - /** - * Return cloned object of this instance. - */ - Aggregator copy(); - - /** - * Repair the object because some fields may not be deserialized. - */ - void repair(ComputerContext context); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Master.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Master.java deleted file mode 100644 index 251a9fff0..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Master.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; - -/** - * Aggregator4Master used by algorithm's master-computation. The master must - * register all aggregators before all supersteps start. Then the workers can - * aggregate aggregators in superstep, send the aggregators to master when - * superstep finish. The master aggregates the aggregators sent by workers. - * The workers can get the aggregated values master aggregated at next - * superstep. These values are identical among all workers. - */ -public interface Aggregator4Master { - - /** - * Register the aggregator with specified name. The name must be unique. - * Used by algorithm's master-computation init() to register aggregators. - */ - > - void registerAggregator(String name, Class aggregator); - - /** - * Register aggregator with specified value type and a combiner which can - * combine values with specified value type. The name must be unique. - * Used by algorithm's master-computation init() to register aggregators. - */ - > - void registerAggregator(String name, ValueType type, Class combiner); - - /** - * Register aggregator with specified default value(include type) and - * a combiner which can combine values with specified value type. - * The name must be unique. - * Used by algorithm's master-computation init() to register aggregators. - */ - > - void registerAggregator(String name, V defaultValue, Class combiner); - - /** - * Set the aggregated value by master-computation, generally users may not - * need to explicitly set a aggregated value. - * If the value is set, it will be received by workers at next superstep. - * Throws ComputerException if master-computation does not register - * aggregator with specified name. - */ - void aggregatedValue(String name, V value); - - /** - * Get the aggregated value. Each worker aggregate the aggregator value - * locally, then submit to master, then master aggregate the aggregators - * value from all workers. master-computation can get the aggregated value - * in master compute(), and worker-computation can get the aggregated value - * in the next superstep. - * Used by algorithm's master-computation compute() - * Throws ComputerException if master-computation does not register - * aggregator with the specified name. - */ - V aggregatedValue(String name); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Worker.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Worker.java deleted file mode 100644 index ec63a2be3..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregator4Worker.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import org.apache.hugegraph.computer.core.graph.value.Value; - -/** - * Aggregator4Worker used by algorithm's computation. The computation can - * only use the aggregator with specified name the master registered. - * See {@link Aggregator4Master} for detailed information about aggregation - * process. - */ -public interface Aggregator4Worker { - - /** - * Create aggregator by name in worker-computation, the aggregator is - * registered by master-computation. - * Used by algorithm's worker-computation beforeSuperstep(), can be called - * in each superstep. - * Throws ComputerException if master-computation does not register - * aggregator with the specified name. - */ - Aggregator createAggregator(String name); - - /** - * Set aggregate value in worker. The value of aggregator will be - * aggregated locally in worker first, and it would be sent to master when - * the current superstep finish. - * Used by algorithm's worker-computation afterSuperstep(), can be called - * in each superstep. - * Throws ComputerException if master-computation does not register - * aggregator with the specified name. - * @param value The value to be aggregated - */ - void aggregateValue(String name, V value); - - /** - * Get the aggregated value in worker-computation, the value is aggregated - * by master at previous superstep, it won't be changed in a superstep. - * Each worker aggregate an aggregator value locally, then submit to master, - * then master aggregate the aggregator values from all workers. - * master-computation can get the aggregated value in master compute(), and - * worker-computation can get the aggregated value in the next superstep. - * Used by algorithm's worker-computation compute(), can be called in - * each superstep. - * Throws ComputerException if master-computation does not register - * aggregator with the specified name. - */ - V aggregatedValue(String name); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Allocator.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Allocator.java deleted file mode 100644 index d8bec76ce..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Allocator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public interface Allocator { - - RecyclerReference newVertex(); - - void freeVertex(RecyclerReference reference); - - RecyclerReference newEdge(); - - void freeEdge(RecyclerReference reference); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Recyclable.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Recyclable.java deleted file mode 100644 index 2506439e7..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/Recyclable.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -public interface Recyclable { -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclerReference.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclerReference.java deleted file mode 100644 index 77cf1c857..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclerReference.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import java.lang.ref.SoftReference; - -public class RecyclerReference extends SoftReference - implements AutoCloseable { - - private final Handle> handle; - - // TODO: create interface here and make parameter a interface. - public RecyclerReference(T referent, - Handle> handle) { - super(referent); - this.handle = handle; - } - - @Override - public void close() { - this.handle.recycle(this); - } - - // Copy from io.netty.util.Recycler.Handle - public interface Handle { - void recycle(O object); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/Combiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/Combiner.java deleted file mode 100644 index a825a1b48..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/Combiner.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.graph.value.Value; - -public interface Combiner { - - /** - * @return The name of the combiner. - * @return class name by default. - */ - default String name() { - return this.getClass().getName(); - } - - /** - * Combine v1 and v2 to result. The combined value may - * take use v1 or v2. The value of v1 and v2 may be updated. Should not - * use v1 and v2 after combine them. - */ - void combine(T v1, T v2, T result); - - @SuppressWarnings("unchecked") - static T combineAll(Combiner combiner, - Iterator values) { - if (!values.hasNext()) { - return null; - } - T result = (T) values.next().copy(); - while (values.hasNext()) { - combiner.combine(result, values.next(), result); - } - return result; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java deleted file mode 100644 index 490acedc2..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombiner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.util.E; - -public class DoubleValueSumCombiner implements Combiner { - - @Override - public void combine(DoubleValue v1, DoubleValue v2, DoubleValue result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - result.value(v1.doubleValue() + v2.doubleValue()); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombiner.java deleted file mode 100644 index ce7a0b205..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombiner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.util.E; - -public class FloatValueSumCombiner implements Combiner { - - @Override - public void combine(FloatValue v1, FloatValue v2, FloatValue result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - result.value(v1.floatValue() + v2.floatValue()); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdListMergeCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdListMergeCombiner.java deleted file mode 100644 index 3cc18444e..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdListMergeCombiner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.IdList; - -public class IdListMergeCombiner implements Combiner { - - @Override - public void combine(IdList v1, IdList v2, IdList result) { - // merge - for (Id id : v1.values()) { - if (!result.contains(id)) { - result.add(id); - } - } - for (Id id : v2.values()) { - if (!result.contains(id)) { - result.add(id); - } - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdSetMergeCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdSetMergeCombiner.java deleted file mode 100644 index 5698da940..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IdSetMergeCombiner.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.IdSet; - -public class IdSetMergeCombiner implements Combiner { - - @Override - public void combine(IdSet v1, IdSet v2, IdSet result) { - // merge - result.addAll(v1); - result.addAll(v2); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombiner.java deleted file mode 100644 index 48e2a7846..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombiner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.util.E; - -public class IntValueSumCombiner implements Combiner { - - @Override - public void combine(IntValue v1, IntValue v2, IntValue result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - result.value(v1.intValue() + v2.intValue()); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombiner.java deleted file mode 100644 index a3e677ada..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombiner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.util.E; - -public class LongValueSumCombiner implements Combiner { - - @Override - public void combine(LongValue v1, LongValue v2, LongValue result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - result.value(v1.longValue() + v2.longValue()); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java deleted file mode 100644 index 13ca86a83..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombiner.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class MergeNewPropertiesCombiner implements PropertiesCombiner { - - /** - * Merge properties v2 and v1 into result. If a property exists in both v1 - * and v2, remain the value in v1. - */ - @Override - public void combine(Properties v1, Properties v2, Properties result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - E.checkArgument(v1 != result && v2 != result, - "The combine parameter result " + - "can't same with v1 or v2"); - - result.clear(); - - Map v1Map = v1.get(); - for (Map.Entry entry : v1Map.entrySet()) { - result.put(entry.getKey(), entry.getValue()); - } - Map v2Map = v2.get(); - for (Map.Entry entry : v2Map.entrySet()) { - result.putIfAbsent(entry.getKey(), entry.getValue()); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java deleted file mode 100644 index 46f89edd1..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombiner.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class MergeOldPropertiesCombiner implements PropertiesCombiner { - - /** - * Merge properties v1 and v2 into result. If a property exists in both v1 - * and v2, remain the value in v2. - */ - @Override - public void combine(Properties v1, Properties v2, Properties result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - E.checkArgument(v1 != result && v2 != result, - "The combine parameter result " + - "can't same with v1 or v2"); - - result.clear(); - - Map v2Map = v2.get(); - for (Map.Entry entry : v2Map.entrySet()) { - result.put(entry.getKey(), entry.getValue()); - } - Map v1Map = v1.get(); - for (Map.Entry entry : v1Map.entrySet()) { - result.putIfAbsent(entry.getKey(), entry.getValue()); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombiner.java deleted file mode 100644 index 9374264a6..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombiner.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class OverwriteCombiner implements Combiner { - - @Override - public void combine(T v1, T v2, T result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - result.assign(v2); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java deleted file mode 100644 index 93b9621ce..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwritePropertiesCombiner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.util.E; - -public class OverwritePropertiesCombiner implements PropertiesCombiner { - - @Override - public void combine(Properties v1, Properties v2, Properties result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - - E.checkArgument(v1 != result && v2 != result, - "The combine parameter result " + - "can't same with v1 or v2"); - - result.clear(); - result.putAll(v2.get()); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombiner.java deleted file mode 100644 index aa4d47ed2..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombiner.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class ValueMaxCombiner implements Combiner { - - @Override - public void combine(T v1, T v2, T result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - if (v1.compareTo(v2) >= 0) { - result.assign(v1); - } else { - result.assign(v2); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombiner.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombiner.java deleted file mode 100644 index d8130d4fb..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombiner.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class ValueMinCombiner implements Combiner { - - @Override - public void combine(T v1, T v2, T result) { - E.checkArgumentNotNull(v1, "The combine parameter v1 can't be null"); - E.checkArgumentNotNull(v2, "The combine parameter v2 can't be null"); - E.checkArgumentNotNull(result, - "The combine parameter result can't be null"); - if (v1.compareTo(v2) <= 0) { - result.assign(v1); - } else { - result.assign(v2); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/Constants.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/Constants.java deleted file mode 100644 index 846ccaaca..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/Constants.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import org.apache.hugegraph.util.Bytes; - -public final class Constants { - - public static final byte[] EMPTY_BYTES = new byte[0]; - - public static final int BOOLEAN_LEN = 1; - public static final int BYTE_LEN = Byte.BYTES; - public static final int SHORT_LEN = Short.BYTES; - public static final int INT_LEN = Integer.BYTES; - public static final int LONG_LEN = Long.BYTES; - public static final int CHAR_LEN = Character.BYTES; - public static final int FLOAT_LEN = Float.BYTES; - public static final int DOUBLE_LEN = Double.BYTES; - - public static final int UINT8_MAX = 0xff; - public static final int UINT16_MAX = 0xffff; - public static final long UINT32_MAX = 0xffffffffL; - - /* - * The small buffer size for buffered input & output, - * mainly used in input & output of memory - */ - public static final int SMALL_BUF_SIZE = 32; - - /* - * The big buffer size for buffered input & output, - * mainly used in input & output of file and stream - */ - public static final int BIG_BUF_SIZE = (int) Bytes.KB * 8; - - /* - * The capacity of message queue - */ - public static final int QUEUE_CAPACITY = 128; - - /* - * The timeout in second for asynchronous tasks - */ - public static final int FUTURE_TIMEOUT = 300; - - /* - * The timeout in millisecond for thread-pool shutdown - */ - public static final long SHUTDOWN_TIMEOUT = 5000L; - - // The mode to read a file - public static final String FILE_MODE_READ = "r"; - - // The mode to write a file - public static final String FILE_MODE_WRITE = "rw"; - - public static final String EMPTY_STR = ""; - - public static final int INPUT_SUPERSTEP = -1; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/SerialEnum.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/SerialEnum.java deleted file mode 100644 index 5f7cd389f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/SerialEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.util.CollectionUtil; - -import com.google.common.collect.HashBasedTable; -import com.google.common.collect.Table; - -public interface SerialEnum { - - byte code(); - - Table, Byte, SerialEnum> TABLE = HashBasedTable.create(); - - static void register(Class clazz) { - Object enums; - try { - enums = clazz.getMethod("values").invoke(null); - } catch (Exception e) { - throw new ComputerException("Call method values() error", e); - } - for (SerialEnum e : CollectionUtil.toList(enums)) { - TABLE.put(clazz, e.code(), e); - } - } - - static T fromCode(Class clazz, byte code) { - @SuppressWarnings("unchecked") - T value = (T) TABLE.get(clazz, code); - if (value == null) { - throw new ComputerException("Can't construct %s from code %s", - clazz.getSimpleName(), code); - } - return value; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/exception/ComputerException.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/exception/ComputerException.java deleted file mode 100644 index 2165a6ea5..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/exception/ComputerException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common.exception; - -/** - * The base class for all exception types - */ -public class ComputerException extends RuntimeException { - - private static final long serialVersionUID = 3621207523020113277L; - - public ComputerException(String message) { - super(message); - } - - public ComputerException(String message, Throwable cause) { - super(message, cause); - } - - public ComputerException(String message, Object... args) { - super(String.format(message, args)); - } - - public ComputerException(String message, Throwable cause, Object... args) { - super(String.format(message, args), cause); - } - - public Throwable rootCause() { - return rootCause(this); - } - - public static Throwable rootCause(Throwable e) { - Throwable cause = e; - while (cause.getCause() != null) { - cause = cause.getCause(); - } - return cause; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java deleted file mode 100644 index 6978bf089..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import static org.apache.hugegraph.computer.algorithm.AlgorithmParams.DEFAULTINPUTFILTER_CLASS_NAME; -import static org.apache.hugegraph.computer.algorithm.AlgorithmParams.LOG_OUTPUT_CLASS_NAME; -import static org.apache.hugegraph.config.OptionChecker.allowValues; -import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; -import static org.apache.hugegraph.config.OptionChecker.nonNegativeInt; -import static org.apache.hugegraph.config.OptionChecker.positiveInt; - -import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.combiner.OverwritePropertiesCombiner; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; -import org.apache.hugegraph.config.ConfigConvOption; -import org.apache.hugegraph.config.ConfigListOption; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.OptionHolder; -import org.apache.hugegraph.structure.constant.Direction; -import org.apache.hugegraph.util.Bytes; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; - -public class ComputerOptions extends OptionHolder { - - private static final Logger LOG = Log.logger(ComputerOptions.class); - - public static final int TRANSPORT_DEFAULT_THREADS = 4; - public static final String RPC_SERVER_HOST_NAME = "rpc.server_host"; - public static final String RPC_SERVER_PORT_NAME = "rpc.server_port"; - public static final String RPC_REMOTE_URL_NAME = "rpc.remote_url"; - - private ComputerOptions() { - super(); - } - - private static volatile ComputerOptions INSTANCE; - - public static synchronized ComputerOptions instance() { - if (INSTANCE == null) { - INSTANCE = new ComputerOptions(); - // Should initialize all static members first, then register. - INSTANCE.registerOptions(); - } - return INSTANCE; - } - - public static final ConfigOption> ALGORITHM_PARAMS_CLASS = - new ConfigOption<>( - "algorithm.params_class", - "The class used to transfer algorithms' parameters " + - "before algorithm been run.", - disallowEmpty(), - Null.class - ); - - public static final ConfigOption> ALGORITHM_RESULT_CLASS = - new ConfigOption<>( - "algorithm.result_class", - "The class of vertex's value, the instance is used to " + - "store computation result for the vertex.", - disallowEmpty(), - Null.class - ); - - public static final ConfigOption> ALGORITHM_MESSAGE_CLASS = - new ConfigOption<>( - "algorithm.message_class", - "The class of message passed when compute vertex.", - disallowEmpty(), - Null.class - ); - - public static final ConfigOption INPUT_SOURCE_TYPE = - new ConfigOption<>( - "input.source_type", - "The source type to load input data", - allowValues("hugegraph-server", "hugegraph-loader"), - "hugegraph-server" - ); - - public static final ConfigOption INPUT_SPLIT_FETCH_TIMEOUT = - new ConfigOption<>( - "input.split_fetch_timeout", - "The timeout in seconds to fetch input splits", - positiveInt(), - 300 - ); - - public static final ConfigOption INPUT_SPLITS_SIZE = - new ConfigOption<>( - "input.split_size", - "The input split size in bytes", - positiveInt(), - 1024 * 1024L - ); - - public static final ConfigOption INPUT_MAX_SPLITS = - new ConfigOption<>( - "input.split_max_splits", - "The maximum number of input splits", - positiveInt(), - 10_000_000 - ); - - public static final ConfigOption INPUT_SPLIT_PAGE_SIZE = - new ConfigOption<>( - "input.split_page_size", - "The page size for streamed load input split data", - positiveInt(), - 500 - ); - - public static final ConfigOption> INPUT_FILTER_CLASS = - new ConfigOption<>( - "input.filter_class", - "The class to create input-filter object, " + - "input-filter is used to Filter vertex edges " + - "according to user needs.", - disallowEmpty(), - loadClass(DEFAULTINPUTFILTER_CLASS_NAME) - ); - - public static final ConfigConvOption - INPUT_EDGE_DIRECTION = new ConfigConvOption<>( - "input.edge_direction", - "The data of the edge in which direction is loaded, " + - "when the value is BOTH, the edges in both OUT and IN " + - "direction will be loaded.", - allowValues("OUT", "IN", "BOTH"), - Direction::valueOf, - "OUT" - ); - - public static final ConfigConvOption - INPUT_EDGE_FREQ = new ConfigConvOption<>( - "input.edge_freq", - "The frequency of edges can exist between a pair of " + - "vertices, allowed values: [SINGLE, SINGLE_PER_LABEL, " + - "MULTIPLE]. SINGLE means that only one edge can exist " + - "between a pair of vertices, use sourceId + targetId to " + - "identify it; SINGLE_PER_LABEL means that each edge " + - "label can exist one edge between a pair of vertices, " + - "use sourceId + edgelabel + targetId to identify it; " + - "MULTIPLE means that many edge can exist between a pair " + - "of vertices, use sourceId + edgelabel + sortValues + " + - "targetId to identify it.", - allowValues("SINGLE", "SINGLE_PER_LABEL", "MULTIPLE"), - EdgeFrequency::valueOf, - "MULTIPLE" - ); - - public static final ConfigOption INPUT_MAX_EDGES_IN_ONE_VERTEX = - new ConfigOption<>( - "input.max_edges_in_one_vertex", - "The maximum number of adjacent edges allowed to be " + - "attached to a vertex, the adjacent edges will be " + - "stored and transferred together as a batch unit.", - positiveInt(), - 200 - ); - - public static final ConfigOption INPUT_LOADER_STRUCT_PATH = - new ConfigOption<>( - "input.loader_struct_path", - "The struct path of loader input, only takes effect when " + - "the input.source_type=loader is enabled", - null, - "" - ); - - public static final ConfigOption INPUT_LOADER_SCHEMA_PATH = - new ConfigOption<>( - "input.loader_schema_path", - "The schema path of loader input, only takes effect when " + - "the input.source_type=loader is enabled", - null, - "" - ); - - public static final ConfigOption SNAPSHOT_WRITE = - new ConfigOption<>( - "snapshot.write", - "Whether to write snapshot of input vertex/edge partitions.", - allowValues(true, false), - false - ); - - public static final ConfigOption SNAPSHOT_LOAD = - new ConfigOption<>( - "snapshot.load", - "Whether to load from snapshot of vertex/edge partitions.", - allowValues(true, false), - false - ); - - public static final ConfigOption SNAPSHOT_NAME = - new ConfigOption<>( - "snapshot.name", - "The user-defined snapshot name.", - null, - "" - ); - - public static final ConfigOption SNAPSHOT_MINIO_ENDPOINT = - new ConfigOption<>( - "snapshot.minio_endpoint", - "The endpoint of MinIO, MinIO can be used to store snapshots.", - null, - "" - ); - - public static final ConfigOption SNAPSHOT_MINIO_ACCESS_KEY = - new ConfigOption<>( - "snapshot.minio_access_key", - "The access key of MinIO.", - null, - "minioadmin" - ); - - public static final ConfigOption SNAPSHOT_MINIO_SECRET_KEY = - new ConfigOption<>( - "snapshot.minio_secret_key", - "The secret key of MinIO.", - null, - "minioadmin" - ); - - public static final ConfigOption SNAPSHOT_MINIO_BUCKET_NAME = - new ConfigOption<>( - "snapshot.minio_bucket_name", - "The bucket name of MinIO.", - null, - "" - ); - - public static final ConfigOption INPUT_SEND_THREAD_NUMS = - new ConfigOption<>( - "input.send_thread_nums", - "The number of threads for parallel sending vertex or edge.", - positiveInt(), - 4 - ); - - public static final ConfigOption SORT_THREAD_NUMS = - new ConfigOption<>( - "sort.thread_nums", - "The number of threads performing internal sorting.", - positiveInt(), - 4 - ); - - public static final ConfigOption> OUTPUT_CLASS = - new ConfigOption<>( - "output.output_class", - "The class to output the computation result of each " + - "vertex. Be called after iteration computation.", - disallowEmpty(), - loadClass(LOG_OUTPUT_CLASS_NAME) - ); - - public static final ConfigOption OUTPUT_RESULT_NAME = - new ConfigOption<>( - "output.result_name", - "The value is assigned dynamically by #name() of " + - "instance created by WORKER_COMPUTATION_CLASS.", - disallowEmpty(), - "value" - ); - - public static final ConfigOption OUTPUT_WITH_ADJACENT_EDGES = - new ConfigOption<>( - "output.with_adjacent_edges", - "Output the adjacent edges of the vertex or not", - allowValues(true, false), - false - ); - - public static final ConfigOption OUTPUT_WITH_VERTEX_PROPERTIES = - new ConfigOption<>( - "output.with_vertex_properties", - "Output the properties of the vertex or not", - allowValues(true, false), - false - ); - - public static final ConfigOption OUTPUT_WITH_EDGE_PROPERTIES = - new ConfigOption<>( - "output.with_edge_properties", - "Output the properties of the edge or not", - allowValues(true, false), - false - ); - - public static final ConfigOption OUTPUT_RESULT_WRITE_TYPE = - new ConfigOption<>( - "output.result_write_type", - "The result write-type to output to hugegraph, " + - "allowed values are: " + - "[OLAP_COMMON, OLAP_SECONDARY, OLAP_RANGE].", - allowValues("OLAP_COMMON", "OLAP_SECONDARY", "OLAP_RANGE"), - "OLAP_COMMON" - ); - - public static final ConfigOption OUTPUT_BATCH_SIZE = - new ConfigOption<>( - "output.batch_size", - "The batch size of output", - positiveInt(), - 500 - ); - - public static final ConfigOption OUTPUT_BATCH_THREADS = - new ConfigOption<>( - "output.batch_threads", - "The threads number used to batch output", - positiveInt(), - 1 - ); - - public static final ConfigOption OUTPUT_SINGLE_THREADS = - new ConfigOption<>( - "output.single_threads", - "The threads number used to single output", - positiveInt(), - 1 - ); - - public static final ConfigOption - OUTPUT_THREAD_POOL_SHUTDOWN_TIMEOUT = - new ConfigOption<>( - "output.thread_pool_shutdown_timeout", - "The timeout seconds of output threads pool shutdown", - positiveInt(), - 60 - ); - - public static final ConfigOption OUTPUT_RETRY_TIMES = - new ConfigOption<>( - "output.retry_times", - "The retry times when output failed", - positiveInt(), - 3 - ); - - public static final ConfigOption OUTPUT_RETRY_INTERVAL = - new ConfigOption<>( - "output.retry_interval", - "The retry interval when output failed", - positiveInt(), - 10 - ); - - public static final ConfigOption OUTPUT_HDFS_URL = - new ConfigOption<>( - "output.hdfs_url", - "The hdfs url of output.", - disallowEmpty(), - "hdfs://127.0.0.1:9000" - ); - - public static final ConfigOption OUTPUT_HDFS_USER = - new ConfigOption<>( - "output.hdfs_user", - "The hdfs user of output.", - disallowEmpty(), - "hadoop" - ); - - public static final ConfigOption OUTPUT_HDFS_CORE_SITE_PATH = - new ConfigOption<>( - "output.hdfs_core_site_path", - "The hdfs core site path.", - null, - "" - ); - - public static final ConfigOption OUTPUT_HDFS_SITE_PATH = - new ConfigOption<>( - "output.hdfs_site_path", - "The hdfs site path.", - null, - "" - ); - - public static final ConfigOption OUTPUT_HDFS_REPLICATION = - new ConfigOption<>( - "output.hdfs_replication", - "The replication number of hdfs.", - positiveInt(), - (short) 3 - ); - - public static final ConfigOption OUTPUT_HDFS_DIR = - new ConfigOption<>( - "output.hdfs_path_prefix", - "The directory of hdfs output result.", - disallowEmpty(), - "/hugegraph-computer/results" - ); - - public static final ConfigOption OUTPUT_HDFS_DELIMITER = - new ConfigOption<>( - "output.hdfs_delimiter", - "The delimiter of hdfs output.", - disallowEmpty(), - "," - ); - - public static final ConfigOption OUTPUT_HDFS_MERGE = - new ConfigOption<>( - "output.hdfs_merge_partitions", - "Whether merge output files of multiple partitions.", - allowValues(true, false), - true - ); - - public static final ConfigOption OUTPUT_HDFS_KERBEROS_ENABLE = - new ConfigOption<>( - "output.hdfs_kerberos_enable", - "Is Kerberos authentication enabled for Hdfs.", - allowValues(true, false), - false - ); - - public static final ConfigOption OUTPUT_HDFS_KRB5_CONF = - new ConfigOption<>( - "output.hdfs_krb5_conf", - "Kerberos configuration file.", - disallowEmpty(), - "/etc/krb5.conf" - ); - - public static final ConfigOption OUTPUT_HDFS_KERBEROS_PRINCIPAL = - new ConfigOption<>( - "output.hdfs_kerberos_principal", - "The Hdfs's principal for kerberos authentication.", - null, - "" - ); - - public static final ConfigOption OUTPUT_HDFS_KERBEROS_KEYTAB = - new ConfigOption<>( - "output.hdfs_kerberos_keytab", - "The Hdfs's key tab file for kerberos authentication.", - null, - "" - ); - - public static final ConfigOption - ALLOCATOR_MAX_VERTICES_PER_THREAD = new ConfigOption<>( - "allocator.max_vertices_per_thread", - "Maximum number of vertices per thread processed " + - "in each memory allocator", - positiveInt(), - 10000 - ); - - public static final ConfigOption JOB_NAMESPACE = - new ConfigOption<>( - "job.namespace", - "The job namespace can seperate different data source.", - null, - "" - ); - - public static final ConfigOption JOB_ID = - new ConfigOption<>( - "job.id", - "The job id on Yarn cluster or K8s cluster.", - disallowEmpty(), - "local_0001" - ); - - public static final ConfigOption JOB_WORKERS_COUNT = - new ConfigOption<>( - "job.workers_count", - "The workers count for computing one graph " + - "algorithm job.", - positiveInt(), - 1 - ); - - public static final ConfigOption JOB_PARTITIONS_COUNT = - new ConfigOption<>( - "job.partitions_count", - "The partitions count for computing one graph " + - "algorithm job.", - positiveInt(), - 1 - ); - - public static final ConfigOption PARTITIONS_COMPUTE_THREAD_NUMS = - new ConfigOption<>( - "job.partitions_thread_nums", - "The number of threads for partition parallel compute.", - positiveInt(), - 4 - ); - - public static final ConfigOption BSP_MAX_SUPER_STEP = - new ConfigOption<>( - "bsp.max_super_step", - "The max super step of the algorithm.", - positiveInt(), - 10 - ); - - public static final ConfigOption BSP_ETCD_ENDPOINTS = - new ConfigOption<>( - "bsp.etcd_endpoints", - "The end points to access etcd.", - disallowEmpty(), - "http://localhost:2379" - ); - - public static final ConfigOption BSP_REGISTER_TIMEOUT = - new ConfigOption<>( - "bsp.register_timeout", - "The max timeout to wait for master and works to register.", - positiveInt(), - TimeUnit.MINUTES.toMillis(5L) - ); - - public static final ConfigOption BSP_WAIT_WORKERS_TIMEOUT = - new ConfigOption<>( - "bsp.wait_workers_timeout", - "The max timeout to wait for workers bsp event.", - positiveInt(), - TimeUnit.HOURS.toMillis(24L) - ); - - public static final ConfigOption BSP_WAIT_MASTER_TIMEOUT = - new ConfigOption<>( - "bsp.wait_master_timeout", - "The max timeout(in ms) to wait for master bsp event.", - positiveInt(), - TimeUnit.HOURS.toMillis(24L) - ); - - public static final ConfigOption BSP_LOG_INTERVAL = - new ConfigOption<>( - "bsp.log_interval", - "The log interval(in ms) to print the log while " + - "waiting bsp event.", - positiveInt(), - TimeUnit.SECONDS.toMillis(30L) - ); - - public static final ConfigOption> WORKER_PARTITIONER = - new ConfigOption<>( - "worker.partitioner", - "The partitioner that decides which partition a vertex " + - "should be in, and which worker a partition should be in.", - disallowEmpty(), - loadClass("org.apache.hugegraph.computer.core.graph.partition.HashPartitioner") - ); - - public static final ConfigOption> WORKER_COMPUTATION_CLASS = - new ConfigOption<>( - "worker.computation_class", - "The class to create worker-computation object, " + - "worker-computation is used to compute each vertex " + - "in each superstep.", - disallowEmpty(), - Null.class - ); - - public static final ConfigOption> WORKER_COMBINER_CLASS = - new ConfigOption<>( - "worker.combiner_class", - "Combiner can combine messages into one value for a " + - "vertex, for example page-rank algorithm can combine " + - "messages of a vertex to a sum value.", - disallowEmpty(), - Null.class - ); - - public static final ConfigOption> - WORKER_VERTEX_PROPERTIES_COMBINER_CLASS = - new ConfigOption<>( - "worker.vertex_properties_combiner_class", - "The combiner can combine several properties of the same " + - "vertex into one properties at inputstep.", - disallowEmpty(), - OverwritePropertiesCombiner.class - ); - - public static final ConfigOption> - WORKER_EDGE_PROPERTIES_COMBINER_CLASS = - new ConfigOption<>( - "worker.edge_properties_combiner_class", - "The combiner can combine several properties of the same " + - "edge into one properties at inputstep.", - disallowEmpty(), - OverwritePropertiesCombiner.class - ); - - public static final ConfigOption WORKER_RECEIVED_BUFFERS_BYTES_LIMIT = - new ConfigOption<>( - "worker.received_buffers_bytes_limit", - "The limit bytes of buffers of received data, " + - "the total size of all buffers can't excess this limit. " + - "If received buffers reach this limit, they will be " + - "merged into a file.", - positiveInt(), - 100 * Bytes.MB - ); - - public static final ConfigOption WORKER_WAIT_SORT_TIMEOUT = - new ConfigOption<>( - "worker.wait_sort_timeout", - "The max timeout(in ms) message-handler wait for " + - "sort-thread to sort one batch of buffers.", - positiveInt(), - TimeUnit.MINUTES.toMillis(10) - ); - - public static final ConfigOption WORKER_WAIT_FINISH_MESSAGES_TIMEOUT = - new ConfigOption<>( - "worker.wait_finish_messages_timeout", - "The max timeout(in ms) message-handler wait for " + - "finish-message of all workers.", - positiveInt(), - TimeUnit.HOURS.toMillis(24) - ); - - public static final ConfigListOption WORKER_DATA_DIRS = - new ConfigListOption<>( - "worker.data_dirs", - true, - "The directories separated by ',' that received " + - "vertices and messages can persist into.", - disallowEmpty(), - String.class, - ImmutableList.of("jobs") - ); - - public static final ConfigOption WORKER_WRITE_BUFFER_THRESHOLD = - new ConfigOption<>( - "worker.write_buffer_threshold", - "The threshold of write buffer, exceeding it will " + - "trigger sorting, the write buffer is used to store " + - "vertex or message.", - positiveInt(), - (int) (50 * Bytes.MB) - ); - - public static final ConfigOption - WORKER_WRITE_BUFFER_INIT_CAPACITY = new ConfigOption<>( - "worker.write_buffer_capacity", - "The initial size of write buffer that used to store " + - "vertex or message.", - positiveInt(), - (int) (50 * Bytes.MB) - ); - - public static final ConfigOption> MASTER_COMPUTATION_CLASS = - new ConfigOption<>( - "master.computation_class", - "Master-computation is computation that can determine " + - "whether to continue next superstep. It runs at the end " + - "of each superstep on master.", - disallowEmpty(), - DefaultMasterComputation.class - ); - - public static final ConfigOption HUGEGRAPH_URL = - new ConfigOption<>( - "hugegraph.url", - "The hugegraph url to load data and write results back.", - disallowEmpty(), - "http://127.0.0.1:8080" - ); - - public static final ConfigOption HUGEGRAPH_GRAPH_NAME = - new ConfigOption<>( - "hugegraph.name", - "The graph name to load data and write results back.", - disallowEmpty(), - "hugegraph" - ); - - public static final ConfigOption HUGEGRAPH_USERNAME = - new ConfigOption<>( - "hugegraph.username", - "The username of graph for authentication.", - null, - "" - ); - - public static final ConfigOption HUGEGRAPH_PASSWORD = - new ConfigOption<>( - "hugegraph.password", - "The password of graph for authentication.", - null, - "" - ); - - public static final ConfigOption TRANSPORT_SERVER_HOST = - new ConfigOption<>( - "transport.server_host", - "The server hostname or ip to listen on to transfer data.", - disallowEmpty(), - "127.0.0.1" - ); - - public static final ConfigOption TRANSPORT_SERVER_PORT = - new ConfigOption<>( - "transport.server_port", - "The server port to listen on to transfer data. " + - "The system will assign a random port if it's set to 0.", - nonNegativeInt(), - 0 - ); - - public static final ConfigOption TRANSPORT_SERVER_THREADS = - new ConfigOption<>( - "transport.server_threads", - "The number of transport threads for server.", - positiveInt(), - TRANSPORT_DEFAULT_THREADS - ); - - public static final ConfigOption TRANSPORT_CLIENT_THREADS = - new ConfigOption<>( - "transport.client_threads", - "The number of transport threads for client.", - positiveInt(), - TRANSPORT_DEFAULT_THREADS - ); - - public static final ConfigOption> TRANSPORT_PROVIDER_CLASS = - new ConfigOption<>( - "transport.provider_class", - "The transport provider, currently only supports Netty.", - disallowEmpty(), - loadClass("org.apache.hugegraph.computer.core.network.netty" + - ".NettyTransportProvider") - ); - - public static final ConfigOption TRANSPORT_IO_MODE = - new ConfigOption<>( - "transport.io_mode", - "The network IO Mode, either 'NIO', 'EPOLL', 'AUTO', the " + - "'AUTO' means selecting the property mode automatically.", - allowValues("NIO", "EPOLL", "AUTO"), - "AUTO" - ); - - public static final ConfigOption TRANSPORT_EPOLL_LT = - new ConfigOption<>( - "transport.transport_epoll_lt", - "Whether enable EPOLL level-trigger.", - allowValues(true, false), - false - ); - - public static final ConfigOption TRANSPORT_RECV_FILE_MODE = - new ConfigOption<>( - "transport.recv_file_mode", - "Whether enable receive buffer-file mode, it will " + - "receive buffer write file from socket by " + - "zero-copy if enable.", - allowValues(true, false), - true - ); - - public static final ConfigOption TRANSPORT_TCP_KEEP_ALIVE = - new ConfigOption<>( - "transport.tcp_keep_alive", - "Whether enable TCP keep-alive.", - allowValues(true, false), - true - ); - - public static final ConfigOption TRANSPORT_MAX_SYN_BACKLOG = - new ConfigOption<>( - "transport.max_syn_backlog", - "The capacity of SYN queue on server side, 0 means using " + - "system default value.", - nonNegativeInt(), - 511 - ); - - public static final ConfigOption TRANSPORT_RECEIVE_BUFFER_SIZE = - new ConfigOption<>( - "transport.receive_buffer_size", - "The size of socket receive-buffer in bytes, 0 means " + - "using system default value.", - nonNegativeInt(), - 0 - ); - - public static final ConfigOption TRANSPORT_SEND_BUFFER_SIZE = - new ConfigOption<>( - "transport.send_buffer_size", - "The size of socket send-buffer in bytes, 0 means using " + - "system default value.", - nonNegativeInt(), - // TODO: Test to get an best value - 0 - ); - - public static final ConfigOption TRANSPORT_CLIENT_CONNECT_TIMEOUT = - new ConfigOption<>( - "transport.client_connect_timeout", - "The timeout(in ms) of client connect to server.", - positiveInt(), - 3000L - ); - - public static final ConfigOption TRANSPORT_CLOSE_TIMEOUT = - new ConfigOption<>( - "transport.close_timeout", - "The timeout(in ms) of close server or close client.", - positiveInt(), - 10_000L - ); - - public static final ConfigOption TRANSPORT_SYNC_REQUEST_TIMEOUT = - new ConfigOption<>( - "transport.sync_request_timeout", - "The timeout(in ms) to wait response after " + - "sending sync-request.", - positiveInt(), - 10_000L - ); - - public static final ConfigOption TRANSPORT_FINISH_SESSION_TIMEOUT = - new ConfigOption<>( - "transport.finish_session_timeout", - "The timeout(in ms) to finish session, " + - "0 means using (transport.sync_request_timeout * " + - "transport.max_pending_requests).", - nonNegativeInt(), - 0L - ); - - public static final ConfigOption TRANSPORT_WRITE_SOCKET_TIMEOUT = - new ConfigOption<>( - "transport.write_socket_timeout", - "The timeout(in ms) to write data to socket buffer.", - positiveInt(), - 3000L - ); - - public static final ConfigOption TRANSPORT_NETWORK_RETRIES = - new ConfigOption<>( - "transport.network_retries", - "The number of retry attempts for network communication," + - "if network unstable.", - nonNegativeInt(), - 3 - ); - - public static final ConfigOption TRANSPORT_WRITE_BUFFER_HIGH_MARK = - new ConfigOption<>( - "transport.write_buffer_high_mark", - "The high water mark for write buffer in bytes, " + - "it will trigger the sending unavailable if the number " + - "of queued bytes > write_buffer_high_mark.", - nonNegativeInt(), - 64 * (int) Bytes.MB - ); - - public static final ConfigOption TRANSPORT_WRITE_BUFFER_LOW_MARK = - new ConfigOption<>( - "transport.write_buffer_low_mark", - "The low water mark for write buffer in bytes, it will " + - "trigger the sending available if the number of queued " + - "bytes < write_buffer_low_mark." + - nonNegativeInt(), - 32 * (int) Bytes.MB - ); - - public static final ConfigOption TRANSPORT_MAX_PENDING_REQUESTS = - new ConfigOption<>( - "transport.max_pending_requests", - "The max number of client unreceived ack, " + - "it will trigger the sending unavailable if the number " + - "of unreceived ack >= max_pending_requests.", - positiveInt(), - 8 - ); - - public static final ConfigOption TRANSPORT_MIN_PENDING_REQUESTS = - new ConfigOption<>( - "transport.min_pending_requests", - "The minimum number of client unreceived ack, " + - "it will trigger the sending available if the number of " + - "unreceived ack < min_pending_requests.", - positiveInt(), - 6 - ); - - public static final ConfigOption TRANSPORT_MIN_ACK_INTERVAL = - new ConfigOption<>( - "transport.min_ack_interval", - "The minimum interval(in ms) of server reply ack.", - positiveInt(), - 200L - ); - - public static final ConfigOption TRANSPORT_SERVER_IDLE_TIMEOUT = - new ConfigOption<>( - "transport.server_idle_timeout", - "The max timeout(in ms) of server idle.", - positiveInt(), - 360_000L - ); - - public static final ConfigOption TRANSPORT_HEARTBEAT_INTERVAL = - new ConfigOption<>( - "transport.heartbeat_interval", - "The minimum interval(in ms) between heartbeats on " + - "client side.", - positiveInt(), - 20_000L - ); - - public static final ConfigOption - TRANSPORT_MAX_TIMEOUT_HEARTBEAT_COUNT = - new ConfigOption<>( - "transport.max_timeout_heartbeat_count", - "The maximum times of timeout heartbeat on client side, " + - "if the number of timeouts waiting for heartbeat " + - "response continuously > max_heartbeat_timeouts the " + - "channel will be closed from client side.", - positiveInt(), - 120 - ); - - public static final ConfigOption HGKV_MAX_FILE_SIZE = - new ConfigOption<>( - "hgkv.max_file_size", - "The max number of bytes in each hgkv-file.", - positiveInt(), - Bytes.GB * 2 - ); - - public static final ConfigOption HGKV_DATABLOCK_SIZE = - new ConfigOption<>( - "hgkv.max_data_block_size", - "The max byte size of hgkv-file data block.", - positiveInt(), - Bytes.KB * 64 - ); - - public static final ConfigOption HGKV_MERGE_FILES_NUM = - new ConfigOption<>( - "hgkv.max_merge_files", - "The max number of files to merge at one time.", - positiveInt(), - // TODO: test if the default value is appropriate. - 10 - ); - - public static final ConfigOption HGKV_TEMP_DIR = - new ConfigOption<>( - "hgkv.temp_file_dir", - "This folder is used to store temporary files, temporary " + - "files will be generated during the file merging process.", - disallowEmpty(), - "/tmp/hgkv" - ); - - public static final ConfigOption VALUE_FILE_MAX_SEGMENT_SIZE = - new ConfigOption<>( - "valuefile.max_segment_size", - "The max number of bytes in each segment of value-file.", - positiveInt(), - Bytes.GB - ); - - public static Set REQUIRED_OPTIONS = ImmutableSet.of( - ); - - public static final Set COMPUTER_PROHIBIT_USER_OPTIONS = - ImmutableSet.of( - ComputerOptions.BSP_ETCD_ENDPOINTS.name(), - ComputerOptions.TRANSPORT_SERVER_HOST.name(), - ComputerOptions.TRANSPORT_SERVER_PORT.name(), - ComputerOptions.JOB_NAMESPACE.name(), - ComputerOptions.JOB_ID.name(), - ComputerOptions.JOB_WORKERS_COUNT.name(), - ComputerOptions.RPC_SERVER_HOST_NAME, - ComputerOptions.RPC_SERVER_PORT_NAME, - ComputerOptions.RPC_REMOTE_URL_NAME - ); - - public static final Set COMPUTER_REQUIRED_USER_OPTIONS = ImmutableSet.of( - ComputerOptions.ALGORITHM_PARAMS_CLASS.name() - ); - - private static Class loadClass(String className) { - try { - return Class.forName(className); - } catch (ClassNotFoundException e) { - LOG.warn("Load class {} failed, use Null.class", className); - return Null.class; - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Config.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Config.java deleted file mode 100644 index 5ad986b6a..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Config.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.TypedOption; - -public interface Config { - - HugeConfig hugeConfig(); - - R get(TypedOption option); - - boolean getBoolean(String key, boolean defaultValue); - - int getInt(String key, int defaultValue); - - long getLong(String key, long defaultValue); - - double getDouble(String key, double defaultValue); - - String getString(String key, String defaultValue); - - T createObject(ConfigOption> clazzOption); - - T createObject(ConfigOption> clazzOption, - boolean requiredNotNull); - - Boolean outputVertexAdjacentEdges(); - - Boolean outputVertexProperties(); - - Boolean outputEdgeProperties(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfig.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfig.java deleted file mode 100644 index 42b3bdf0d..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfig.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import java.util.Map; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.configuration2.MapConfiguration; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.TypedOption; -import org.apache.hugegraph.util.E; - -public final class DefaultConfig implements Config { - - private final HugeConfig allConfig; - private final HotConfig hotConfig; - - public DefaultConfig(Map options) { - this.allConfig = this.parseOptions(options); - this.hotConfig = this.extractHotConfig(this.allConfig); - this.checkOptions(); - } - - private HugeConfig parseOptions(Map options) { - if (!options.keySet().containsAll(ComputerOptions.REQUIRED_OPTIONS)) { - E.checkArgument(false, - "All required options must be setted, " + - "but missing these %s", - CollectionUtils.subtract( - ComputerOptions.REQUIRED_OPTIONS, - options.keySet())); - } - MapConfiguration mapConfig = new MapConfiguration(options); - return new HugeConfig(mapConfig); - } - - private HotConfig extractHotConfig(HugeConfig allConfig) { - // Populate high frequency accessed options into HotConfig - HotConfig hotConfig = new HotConfig(); - - hotConfig.outputVertexAdjacentEdges( - allConfig.get(ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES)); - hotConfig.outputVertexProperties( - allConfig.get(ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES)); - hotConfig.outputEdgeProperties( - allConfig.get(ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES)); - return hotConfig; - } - - private void checkOptions() { - int partitionsCount = this.allConfig.get( - ComputerOptions.JOB_PARTITIONS_COUNT); - int workersCount = this.allConfig.get( - ComputerOptions.JOB_WORKERS_COUNT); - if (partitionsCount < workersCount) { - throw new ComputerException("The partitions count must be >= " + - "workers count, but got %s < %s", - partitionsCount, workersCount); - } - } - - @Override - public HugeConfig hugeConfig() { - return this.allConfig; - } - - @Override - public R get(TypedOption option) { - return this.allConfig.get(option); - } - - @Override - public boolean getBoolean(String key, boolean defaultValue) { - String value = this.allConfig.getString(key); - if (value == null) { - return defaultValue; - } else if (value.equalsIgnoreCase("true")) { - return true; - } else if (value.equalsIgnoreCase("false")) { - return false; - } else { - throw new ComputerException( - "Can't parse boolean value from '%s' for key '%s'", - value, key); - } - } - - @Override - public int getInt(String key, int defaultValue) { - String value = this.allConfig.getString(key); - if (value == null) { - return defaultValue; - } else { - try { - return Integer.parseInt(value); - } catch (Exception e) { - throw new ComputerException( - "Can't parse int value from '%s' for key '%s'", - value, key); - } - } - } - - @Override - public long getLong(String key, long defaultValue) { - String value = this.allConfig.getString(key); - if (value == null) { - return defaultValue; - } else { - try { - return Long.parseLong(value); - } catch (Exception e) { - throw new ComputerException( - "Can't parse long value from '%s' for key '%s'", - value, key); - } - } - } - - @Override - public double getDouble(String key, double defaultValue) { - String value = this.allConfig.getString(key); - if (value == null) { - return defaultValue; - } else { - try { - return Double.parseDouble(value); - } catch (Exception e) { - throw new ComputerException( - "Can't parse double value from '%s' for key '%s'", - value, key); - } - } - } - - @Override - public String getString(String key, String defaultValue) { - return this.allConfig.getString(key, defaultValue); - } - - /** - * Create object by class option. - * It throws ComputerException if failed to create object. - */ - @Override - public T createObject(ConfigOption> clazzOption) { - return this.createObject(clazzOption, true); - } - - @Override - public T createObject(ConfigOption> clazzOption, - boolean requiredNotNull) { - Class clazz = this.get(clazzOption); - if (clazz == Null.class) { - if (requiredNotNull) { - throw new ComputerException( - "Please config required option '%s'", clazzOption.name()); - } - return null; - } - try { - @SuppressWarnings("unchecked") - T instance = (T) clazz.newInstance(); - return instance; - } catch (Exception e) { - throw new ComputerException("Failed to create object for option " + - "'%s', class='%s'", - e, clazzOption.name(), clazz.getName()); - } - } - - @Override - public Boolean outputVertexAdjacentEdges() { - return this.hotConfig.outputVertexAdjacentEdges(); - } - - @Override - public Boolean outputVertexProperties() { - return this.hotConfig.outputVertexProperties(); - } - - @Override - public Boolean outputEdgeProperties() { - return this.hotConfig.outputEdgeProperties(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/EdgeFrequency.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/EdgeFrequency.java deleted file mode 100644 index fb903dd50..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/EdgeFrequency.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -/** - * The frequency of edges can exist between two vertices - */ -public enum EdgeFrequency { - - /** - * Only one edge can exist between two vertices, - * use sourceId + targetId to identify it. - */ - SINGLE, - - /** - * Each edge label can exist one edge between two vertices , - * use sourceId + edgelabel + targetId to identify it. - */ - SINGLE_PER_LABEL, - - /** - * Multiple edge can exist between two vertices, - * use sourceId + edgelabel + sortValues + targetId to identify it. - */ - MULTIPLE -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/HotConfig.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/HotConfig.java deleted file mode 100644 index 25a60cd00..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/HotConfig.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -public final class HotConfig { - - private boolean outputVertexAdjacentEdges; - private boolean outputVertexProperties; - private boolean outputEdgeProperties; - - public boolean outputVertexAdjacentEdges() { - return this.outputVertexAdjacentEdges; - } - - public void outputVertexAdjacentEdges(boolean outputVertexAdjacentEdges) { - this.outputVertexAdjacentEdges = outputVertexAdjacentEdges; - } - - public boolean outputVertexProperties() { - return this.outputVertexProperties; - } - - public void outputVertexProperties(boolean outputVertexProperties) { - this.outputVertexProperties = outputVertexProperties; - } - - public boolean outputEdgeProperties() { - return this.outputEdgeProperties; - } - - public void outputEdgeProperties(boolean outputEdgeProperties) { - this.outputEdgeProperties = outputEdgeProperties; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Null.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Null.java deleted file mode 100644 index f42724d1f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/config/Null.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import org.apache.hugegraph.config.ConfigOption; - -/** - * Null is used in ConfigOption to indicate a null class option. - * The config does not allow the default value null, so this is used as the - * default class value when class option can be null. - * {@link Config#createObject(ConfigOption)} will return null, if the value - * is ${@code Null.class}". - */ -public class Null { -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/GraphFactory.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/GraphFactory.java deleted file mode 100644 index 199f40fe1..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/GraphFactory.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public interface GraphFactory { - - Id createId(); - - Id createId(long id); - - Id createId(String id); - - Id createId(UUID id); - - Vertex createVertex(); - - Vertex createVertex(Id id, V value); - - Vertex createVertex(String label, Id id, V value); - - Edges createEdges(); - - Edges createEdges(int capacity); - - Edge createEdge(); - - Edge createEdge(Id targetId); - - Edge createEdge(String label, Id targetId); - - Edge createEdge(String label, String name, Id targetId); - - Properties createProperties(); - - List createList(); - - List createList(int capacity); - - Set createSet(); - - Set createSet(int size); - - Map createMap(); - - Value createValue(byte code); - - Value createValue(ValueType type); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edge.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edge.java deleted file mode 100644 index b59e681d6..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edge.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.edge; - -import org.apache.hugegraph.computer.core.allocator.Recyclable; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public interface Edge extends Recyclable { - - String label(); - - void label(String label); - - String name(); - - void name(String name); - - Id targetId(); - - void targetId(Id targetId); - - Properties properties(); - - void properties(Properties properties); - - T property(String key); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edges.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edges.java deleted file mode 100644 index 4f73d6502..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/edge/Edges.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.edge; - -public interface Edges extends Iterable { - - int size(); - - void add(Edge edge); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/Id.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/Id.java deleted file mode 100644 index e4f6ac985..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/Id.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; - -public interface Id extends Tvalue { - - IdType idType(); - - int length(); - - Object asObject(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactory.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactory.java deleted file mode 100644 index 106873d6e..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactory.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import static org.apache.hugegraph.computer.algorithm.AlgorithmParams.BYTESID_CLASS_NAME; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; - -public final class IdFactory { - - private static final Constructor BYTES_ID_CONSTRUCTOR; - private static final Method BYTES_ID_LONG_METHOD; - private static final Method BYTES_ID_STRING_METHOD; - private static final Method BYTES_ID_UUID_METHOD; - - private static final UUID EMPTY_UUID = new UUID(0L, 0L); - - static { - try { - Class bytesIdClass = Class.forName(BYTESID_CLASS_NAME); - - BYTES_ID_CONSTRUCTOR = bytesIdClass.getDeclaredConstructor(); - BYTES_ID_CONSTRUCTOR.setAccessible(true); - - BYTES_ID_LONG_METHOD = bytesIdClass.getMethod("of", long.class); - BYTES_ID_LONG_METHOD.setAccessible(false); - - BYTES_ID_STRING_METHOD = bytesIdClass.getMethod("of", String.class); - BYTES_ID_STRING_METHOD.setAccessible(false); - - BYTES_ID_UUID_METHOD = bytesIdClass.getMethod("of", UUID.class); - BYTES_ID_UUID_METHOD.setAccessible(false); - } catch (Throwable e) { - throw new ComputerException("Failed to reflection BytesId method", e); - } - } - - // Maybe can reuse Id - public static Id createId(byte code) { - IdType type = SerialEnum.fromCode(IdType.class, code); - return createId(type); - } - - public static Id createId(IdType type) { - try { - switch (type) { - case LONG: - return (Id) BYTES_ID_LONG_METHOD.invoke(null, 0L); - case UTF8: - return (Id) BYTES_ID_STRING_METHOD.invoke(null, Constants.EMPTY_STR); - case UUID: - return (Id) BYTES_ID_UUID_METHOD.invoke(null, EMPTY_UUID); - default: - throw new ComputerException("Can't create Id for %s", - type.name()); - } - } catch (Exception e) { - throw new ComputerException("Failed to createId", e); - } - } - - public static Id parseId(IdType type, Object value) { - try { - switch (type) { - case LONG: - return (Id) BYTES_ID_LONG_METHOD.invoke(null, value); - case UTF8: - return (Id) BYTES_ID_STRING_METHOD.invoke(null, value); - case UUID: - return (Id) BYTES_ID_UUID_METHOD.invoke(null, value); - default: - throw new ComputerException("Unexpected id type %s", type.name()); - } - } catch (Exception e) { - throw new ComputerException("Failed to parse %s Id: '%s'", e, type, value); - } - } - - public static Id createId() { - try { - return (Id) BYTES_ID_CONSTRUCTOR.newInstance(); - } catch (Exception e) { - throw new ComputerException("Can't create Id for %s"); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/DefaultProperties.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/DefaultProperties.java deleted file mode 100644 index b88a01088..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/DefaultProperties.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.properties; - -import java.io.IOException; -import java.util.Collections; -import java.util.Map; -import java.util.Objects; - -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class DefaultProperties implements Properties { - - private final Map keyValues; - private final GraphFactory graphFactory; - - public DefaultProperties(GraphFactory graphFactory) { - this(graphFactory.createMap(), graphFactory); - } - - public DefaultProperties(Map keyValues, - GraphFactory graphFactory) { - this.keyValues = keyValues; - this.graphFactory = graphFactory; - } - - @Override - public Map get() { - return Collections.unmodifiableMap(this.keyValues); - } - - @Override - @SuppressWarnings("unchecked") - public T get(String key) { - return (T) this.keyValues.get(key); - } - - @Override - public void put(String key, Value value) { - this.keyValues.put(key, value); - } - - @Override - public void putIfAbsent(String key, Value value) { - this.keyValues.putIfAbsent(key, value); - } - - @Override - public void putAll(Map kvs) { - this.keyValues.putAll(kvs); - } - - public int size() { - return this.keyValues.size(); - } - - @Override - public void clear() { - this.keyValues.clear(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.keyValues.clear(); - int size = in.readInt(); - for (int i = 0; i < size; i++) { - String key = in.readUTF(); - ValueType valueType = SerialEnum.fromCode(ValueType.class, - in.readByte()); - Value value = this.graphFactory.createValue(valueType); - value.read(in); - this.keyValues.put(key, value); - } - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.keyValues.size()); - for (Map.Entry entry : this.keyValues.entrySet()) { - out.writeUTF(entry.getKey()); - Value value = entry.getValue(); - out.writeByte(value.valueType().code()); - value.write(out); - } - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof DefaultProperties)) { - return false; - } - DefaultProperties other = (DefaultProperties) obj; - return this.keyValues.equals(other.keyValues); - } - - @Override - public int hashCode() { - return Objects.hash(this.keyValues); - } - - @Override - public String toString() { - return String.format("DefaultProperties{keyValues=%s}", - this.keyValues); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/Properties.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/Properties.java deleted file mode 100644 index d7f12894a..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/properties/Properties.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.properties; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; - -public interface Properties extends Readable, Writable { - - Map get(); - - T get(String key); - - void put(String key, Value value); - - void putIfAbsent(String key, Value value); - - void putAll(Map kvs); - - int size(); - - void clear(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValue.java deleted file mode 100644 index 2e68ea496..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValue.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class BooleanValue implements Tvalue { - - private boolean value; - - public BooleanValue() { - this(false); - } - - public BooleanValue(boolean value) { - this.value = value; - } - - public boolean boolValue() { - return this.value; - } - - @Override - public Boolean value() { - return this.value; - } - - /* - * This method is reserved for performance, otherwise it will create a new - * IntValue object when change it's value. - */ - public void value(boolean value) { - this.value = value; - } - - @Override - public ValueType valueType() { - return ValueType.BOOLEAN; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.value = ((BooleanValue) other).value; - } - - @Override - public BooleanValue copy() { - return new BooleanValue(this.value); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.value = in.readBoolean(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeBoolean(this.value); - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - return Boolean.compare(this.value, ((BooleanValue) obj).value); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof BooleanValue)) { - return false; - } - return ((BooleanValue) obj).value == this.value; - } - - @Override - public int hashCode() { - return Boolean.hashCode(this.value); - } - - @Override - public String toString() { - return String.valueOf(this.value); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValue.java deleted file mode 100644 index f55e19ba4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValue.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class DoubleValue extends Number implements Tvalue { - - private static final long serialVersionUID = -524902178200973565L; - - private double value; - - public DoubleValue() { - this(0.0D); - } - - public DoubleValue(double value) { - this.value = value; - } - - @Override - public int intValue() { - return (int) this.value; - } - - @Override - public long longValue() { - return (long) this.value; - } - - @Override - public float floatValue() { - return (float) this.value; - } - - @Override - public double doubleValue() { - return this.value; - } - - @Override - public Double value() { - return this.value; - } - - /* - * This method is reserved for performance, otherwise it will create a new - * DoubleValue object when change it's value. - */ - public void value(double value) { - this.value = value; - } - - @Override - public ValueType valueType() { - return ValueType.DOUBLE; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.value = ((DoubleValue) other).value; - } - - @Override - public DoubleValue copy() { - return new DoubleValue(this.value); - } - - @Override - public boolean isNumber() { - return true; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.value = in.readDouble(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeDouble(this.value); - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - return Double.compare(this.value, ((DoubleValue) obj).value); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DoubleValue)) { - return false; - } - return ((DoubleValue) obj).value == this.value; - } - - @Override - public int hashCode() { - return Double.hashCode(this.value); - } - - @Override - public String toString() { - return String.valueOf(this.value); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdList.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdList.java deleted file mode 100644 index 16f009bb4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdList.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class IdList extends ListValue { - - public IdList() { - super(ValueType.ID); - } - - @Override - public ValueType valueType() { - return ValueType.ID_LIST; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.read(in, false); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.write(out, false); - } - - @Override - public IdList copy() { - IdList values = new IdList(); - for (Id value : this.values()) { - values.add((Id) value.copy()); - } - return values; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdSet.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdSet.java deleted file mode 100644 index 9e90ad232..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdSet.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; -import java.util.Collection; -import java.util.Collections; -import java.util.Set; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class IdSet implements Value.Tvalue> { - - private final GraphFactory graphFactory; - private Set values; - - public IdSet() { - this.graphFactory = ComputerContext.instance().graphFactory(); - this.values = this.graphFactory.createSet(); - } - - public void add(Id id) { - this.values.add(id); - } - - public void addAll(IdSet other) { - this.values.addAll(other.values); - } - - public void addAll(Collection other) { - this.values.addAll(other); - } - - public boolean contains(Id id) { - return this.values.contains(id); - } - - @Override - public ValueType valueType() { - return ValueType.ID_SET; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.values = ((IdSet) other).value(); - } - - @Override - public IdSet copy() { - IdSet values = new IdSet(); - for (Id value : this.values) { - values.add((Id) value.copy()); - } - return values; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - int size = in.readInt(); - if (size > this.values.size() || size < this.values.size() / 2) { - this.values = this.graphFactory.createSet(size); - } else { - this.values.clear(); - } - - for (int i = 0; i < size; i++) { - Id id = this.graphFactory.createId(); - id.read(in); - this.values.add(id); - } - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.values.size()); - for (Id id : this.values) { - id.write(out); - } - } - - @Override - public Set value() { - return Collections.unmodifiableSet(this.values); - } - - @Override - public int compareTo(Value o) { - throw new UnsupportedOperationException("compareTo"); - } - - public int size() { - return this.values.size(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValue.java deleted file mode 100644 index bab4ba53f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValue.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class IntValue extends Number implements Tvalue { - - private static final long serialVersionUID = -2014388310992178979L; - - private int value; - - public IntValue() { - this(0); - } - - public IntValue(int value) { - this.value = value; - } - - @Override - public int intValue() { - return this.value; - } - - @Override - public long longValue() { - return this.value; - } - - @Override - public float floatValue() { - return this.value; - } - - @Override - public double doubleValue() { - return this.value; - } - - @Override - public Integer value() { - return this.value; - } - - /* - * This method is reserved for performance, otherwise it will create a new - * IntValue object when change it's value. - */ - public void value(int value) { - this.value = value; - } - - @Override - public ValueType valueType() { - return ValueType.INT; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.value = ((IntValue) other).value; - } - - @Override - public IntValue copy() { - return new IntValue(this.value); - } - - @Override - public boolean isNumber() { - return true; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.value = in.readInt(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.value); - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - return Integer.compare(this.value, ((IntValue) obj).value); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof IntValue)) { - return false; - } - return ((IntValue) obj).value == this.value; - } - - @Override - public int hashCode() { - return Integer.hashCode(this.value); - } - - @Override - public String toString() { - return String.valueOf(this.value); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java deleted file mode 100644 index 268929dd4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValue.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.ListUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class ListValue> implements Tvalue> { - - private final GraphFactory graphFactory; - private ValueType elemType; - private List values; - - public ListValue() { - this(ValueType.UNKNOWN); - } - - public ListValue(ValueType elemType) { - this(elemType, new ArrayList<>()); - } - - public ListValue(ValueType elemType, List values) { - this.elemType = elemType; - this.values = values; - // TODO: try to reduce call ComputerContext.instance() directly. - this.graphFactory = ComputerContext.instance().graphFactory(); - } - - public void checkAndSetType(T value) { - E.checkArgument(value != null, - "Can't add null to %s", this.valueType().string()); - if (this.elemType != ValueType.UNKNOWN) { - E.checkArgument(this.elemType == value.valueType(), - "Invalid value '%s' with type %s, " + - "expect element with type %s", - value, value.valueType().string(), - this.elemType.string()); - } else { - this.elemType = value.valueType(); - } - } - - public void add(T value) { - this.checkAndSetType(value); - this.values.add(value); - } - - public void addAll(Collection values) { - if (CollectionUtils.isEmpty(values)) { - return; - } - - Iterator iterator = values.iterator(); - T firstValue = iterator.next(); - this.checkAndSetType(firstValue); - this.values.addAll(values); - } - - public T get(int index) { - return this.values.get(index); - } - - public T getFirst() { - if (this.values.size() == 0) { - throw new NoSuchElementException("The list is empty"); - } - return this.values.get(0); - } - - public T getLast() { - int index = this.values.size() - 1; - if (index < 0) { - throw new NoSuchElementException("The list is empty"); - } - return this.values.get(index); - } - - public boolean contains(T obj) { - return this.values.contains(obj); - } - - public List values() { - return Collections.unmodifiableList(this.values); - } - - public int size() { - return this.values.size(); - } - - public void clear() { - this.values.clear(); - } - - @Override - public List value() { - List list = new ArrayList<>(this.values.size()); - for (T value : this.values) { - list.add(value.value()); - } - return list; - } - - @Override - public ValueType valueType() { - return ValueType.LIST_VALUE; - } - - public ValueType elemType() { - return this.elemType; - } - - @Override - @SuppressWarnings("unchecked") - public void assign(Value other) { - this.checkAssign(other); - ValueType elemType = ((ListValue) other).elemType(); - E.checkArgument(elemType == this.elemType(), - "Can't assign %s<%s> to %s<%s>", - other.valueType().string(), elemType.string(), - this.valueType().string(), this.elemType().string()); - this.values = ((ListValue) other).values(); - } - - @Override - @SuppressWarnings("unchecked") - public ListValue copy() { - List values = this.graphFactory.createList(); - for (T value : this.values) { - values.add((T) value.copy()); - } - return new ListValue<>(this.elemType, values); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.read(in, true); - } - - protected void read(RandomAccessInput in, boolean readElemType) throws IOException { - int size = in.readInt(); - if (readElemType) { - this.elemType = SerialEnum.fromCode(ValueType.class, in.readByte()); - } - if (size > this.values.size() || size < this.values.size() / 2) { - this.values = this.graphFactory.createList(size); - } else { - this.values.clear(); - } - - for (int i = 0; i < size; i++) { - @SuppressWarnings("unchecked") - T value = (T) this.graphFactory.createValue(this.elemType); - value.read(in); - this.values.add(value); - } - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.write(out, true); - } - - protected void write(RandomAccessOutput out, boolean writeElemType) throws IOException { - out.writeInt(this.values.size()); - if (writeElemType) { - out.writeByte(this.elemType.code()); - } - for (T value : this.values) { - value.write(out); - } - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - @SuppressWarnings("unchecked") - ListValue other = (ListValue) obj; - int cmp = this.size() - other.size(); - if (cmp != 0) { - return cmp; - } - for (int i = 0; i < this.size(); i++) { - Tvalue self = this.values.get(i); - cmp = self.compareTo(other.values.get(i)); - if (cmp != 0) { - return cmp; - } - } - return 0; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ListValue)) { - return false; - } - @SuppressWarnings("unchecked") - ListValue other = (ListValue) obj; - if (this.elemType != other.elemType) { - return false; - } - return ListUtils.isEqualList(this.values, other.values); - } - - @Override - public int hashCode() { - return ListUtils.hashCodeForList(this.values); - } - - @Override - public String toString() { - return this.values.toString(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValue.java deleted file mode 100644 index 9ffc01517..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValue.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class LongValue extends Number implements Tvalue { - - private static final long serialVersionUID = 8332327679205404212L; - - private long value; - - public LongValue() { - this(0L); - } - - public LongValue(long value) { - this.value = value; - } - - @Override - public int intValue() { - return (int) this.value; - } - - @Override - public long longValue() { - return this.value; - } - - @Override - public float floatValue() { - return this.value; - } - - @Override - public double doubleValue() { - return this.value; - } - - @Override - public Long value() { - return this.value; - } - - /* - * This method is reserved for performance, otherwise it will create a new - * LongValue object when change it's value. - */ - public void value(long value) { - this.value = value; - } - - @Override - public ValueType valueType() { - return ValueType.LONG; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.value = ((LongValue) other).value; - } - - @Override - public LongValue copy() { - return new LongValue(this.value); - } - - @Override - public boolean isNumber() { - return true; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.value = in.readLong(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeLong(this.value); - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - return Long.compare(this.value, ((LongValue) obj).value); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof LongValue)) { - return false; - } - return ((LongValue) obj).value == this.value; - } - - @Override - public int hashCode() { - return Long.hashCode(this.value); - } - - @Override - public String toString() { - return String.valueOf(this.value); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/MapValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/MapValue.java deleted file mode 100644 index d97847857..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/MapValue.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class MapValue implements Value { - - private final GraphFactory graphFactory; - - private ValueType elemType; - private Map map; - - public MapValue() { - this(ValueType.UNKNOWN); - } - - public MapValue(ValueType elemType) { - this(elemType, new HashMap<>()); - } - - public MapValue(ValueType elemType, Map map) { - this.graphFactory = ComputerContext.instance().graphFactory(); - this.elemType = elemType; - this.map = map; - } - - public void put(Id id, T value) { - E.checkArgument(id != null, "Can't add null key to %s", - this.valueType().string()); - E.checkArgument(value != null, "Can't add null value to %s", - this.valueType().string()); - if (this.elemType != ValueType.UNKNOWN) { - E.checkArgument(this.elemType == value.valueType(), - "Invalid value '%s' with type %s, " + - "expect element with type %s", - value, value.valueType().string(), - this.elemType.string()); - } else { - this.elemType = value.valueType(); - } - this.map.put(id, value); - } - - public T get(Id id) { - return this.map.get(id); - } - - public Set> entrySet() { - return this.map.entrySet(); - } - - @Override - public ValueType valueType() { - return ValueType.MAP_VALUE; - } - - @Override - @SuppressWarnings("unchecked") - public void assign(Value other) { - this.checkAssign(other); - ValueType elemType = ((MapValue) other).elemType(); - E.checkArgument(elemType == this.elemType(), - "Can't assign %s<%s> to %s<%s>", - other.valueType().string(), elemType.string(), - this.valueType().string(), this.elemType().string()); - this.map = ((MapValue) other).map; - } - - public ValueType elemType() { - return this.elemType; - } - - @Override - @SuppressWarnings("unchecked") - public Value copy() { - Map map = new HashMap<>(); - for (Map.Entry entry : this.map.entrySet()) { - map.put(entry.getKey(), (T) entry.getValue().copy()); - } - return new MapValue<>(this.elemType, map); - } - - @Override - public Object value() { - return this.map; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.read(in, true); - } - - protected void read(RandomAccessInput in, boolean readElemType) - throws IOException { - int size = in.readInt(); - if (readElemType) { - this.elemType = SerialEnum.fromCode(ValueType.class, in.readByte()); - } - this.map = this.graphFactory.createMap(); - - for (int i = 0; i < size; i++) { - Id id = this.graphFactory.createId(); - id.read(in); - @SuppressWarnings("unchecked") - T value = (T) this.graphFactory.createValue(this.elemType); - value.read(in); - this.map.put(id, value); - } - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - this.write(out, true); - } - - protected void write(RandomAccessOutput out, boolean writeElemType) - throws IOException { - out.writeInt(this.map.size()); - if (writeElemType) { - out.writeByte(this.elemType.code()); - } - for (Map.Entry entry : this.map.entrySet()) { - Id id = entry.getKey(); - T value = entry.getValue(); - id.write(out); - value.write(out); - } - } - - @Override - public int compareTo(Value obj) { - throw new UnsupportedOperationException("MapValue.compareTo()"); - } - - @Override - public String string() { - return "MapValue{elemType=" + this.elemType + ", map=" + this.map + "}"; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValue.java deleted file mode 100644 index d3eb872d2..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValue.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class NullValue implements Tvalue { - - private static final NullValue INSTANCE = new NullValue(); - - private NullValue() { - } - - /* - * Returns the single instance of this class. - */ - public static NullValue get() { - return INSTANCE; - } - - @Override - public Void value() { - return null; - } - - @Override - public String string() { - return ""; - } - - @Override - public ValueType valueType() { - return ValueType.NULL; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - } - - @Override - public NullValue copy() { - return this; - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - // pass - } - - @Override - public void read(RandomAccessInput in) throws IOException { - // pass - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - assert obj instanceof NullValue; - return 0; - } - - @Override - public boolean equals(Object obj) { - return obj == INSTANCE || obj instanceof NullValue; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public String toString() { - return ""; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValue.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValue.java deleted file mode 100644 index f5049c23f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValue.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.value.Value.Tvalue; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.util.E; - -public class StringValue implements Tvalue { - - private String value; - - public StringValue() { - this.value = Constants.EMPTY_STR; - } - - public StringValue(String value) { - this.value = value; - } - - @Override - public ValueType valueType() { - return ValueType.STRING; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.value = ((StringValue) other).value; - } - - @Override - public StringValue copy() { - return new StringValue(this.value); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.value = in.readUTF(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeUTF(this.value); - } - - @Override - public int compareTo(Value obj) { - E.checkArgumentNotNull(obj, "The compare argument can't be null"); - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - return this.value.compareTo(((StringValue) obj).value); - } - - @Override - public String value() { - return this.value; - } - - public void value(String value) { - this.value = value; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StringValue)) { - return false; - } - return ((StringValue) obj).value.equals(this.value); - } - - @Override - public int hashCode() { - return this.value.hashCode(); - } - - @Override - public String toString() { - return this.value; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/Value.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/Value.java deleted file mode 100644 index 840bf3ff0..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/Value.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.util.E; - -public interface Value extends Writable, Readable, Comparable { - - /** - * @return the value type of this instance - */ - ValueType valueType(); - - /** - * Assign a new value to this object - */ - void assign(Value value); - - /** - * @return copy a value instance of this object - */ - Value copy(); - - /** - * @return value of this object - */ - Object value(); - - /** - * Check whether a value can be assigned to this object - */ - default void checkAssign(Value other) { - if (other == null) { - E.checkArgument(false, "Can't assign null to %s", - this.getClass().getSimpleName()); - } else if (!this.getClass().isAssignableFrom(other.getClass())) { - E.checkArgument(false, "Can't assign '%s'(%s) to %s", - other, other.getClass().getSimpleName(), - this.getClass().getSimpleName()); - } - } - - default boolean isNumber() { - return false; - } - - /** - * @return result string value of this object - */ - default String string() { - return String.valueOf(this.value()); - } - - /** - * Value class with template parameter for simple subclass extension - */ - interface Tvalue extends Value { - - @Override - T value(); - } - - /** - * Value class with template parameter for composite subclass extension, - * A customized Value class of the algorithm may need to extend this class. - */ - interface CustomizeValue extends Tvalue { - - @Override - default ValueType valueType() { - return ValueType.CUSTOMIZE_VALUE; - } - - @Override - default void assign(Value value) { - throw new UnsupportedOperationException("assign"); - } - - @Override - default Value copy() { - throw new UnsupportedOperationException("copy"); - } - - @Override - default int compareTo(Value other) { - throw new UnsupportedOperationException("compareTo"); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueType.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueType.java deleted file mode 100644 index 641486a92..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueType.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import org.apache.hugegraph.computer.core.common.SerialEnum; - -public enum ValueType implements SerialEnum { - - UNKNOWN(-1, -1, "unknown"), - NULL(1, 0, "null"), - BOOLEAN(2, 1, "bool"), - INT(3, 4, "int"), - LONG(4, 8, "long"), - FLOAT(5, 4, "float"), - DOUBLE(6, 8, "double"), - STRING(7, -1, "string"), - ID(20, -1, "id"), - ID_LIST(21, -1, "idList"), - ID_LIST_LIST(22, -1, "idListList"), - ID_SET(23, -1, "idSet"), - LIST_VALUE(30, -1, "list"), - MAP_VALUE(31, -1, "map"), - CUSTOMIZE_VALUE(100, -1, "customize"); - - private final byte code; - // Length in bytes if it's a fixed value type, -1 means not fixed. - private final int byteSize; - // Name of this value type - private final String name; - - static { - SerialEnum.register(ValueType.class); - } - - ValueType(int code, int byteSize, String name) { - assert code >= -128 && code <= 127; - this.code = (byte) code; - this.byteSize = byteSize; - this.name = name; - } - - @Override - public byte code() { - return this.code; - } - - public int byteSize() { - return this.byteSize; - } - - public String string() { - return this.name; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/Vertex.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/Vertex.java deleted file mode 100644 index a655040fc..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/Vertex.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.vertex; - -import org.apache.hugegraph.computer.core.allocator.Recyclable; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public interface Vertex extends Recyclable { - - String label(); - - void label(String label); - - Id id(); - - void id(Id id); - - V value(); - - void value(V value); - - int numEdges(); - - Edges edges(); - - void edges(Edges edges); - - void addEdge(Edge edge); - - Properties properties(); - - void properties(Properties properties); - - T property(String key); - - boolean active(); - - void inactivate(); - - void reactivate(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/input/InputFilter.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/input/InputFilter.java deleted file mode 100644 index bbb174a5f..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/input/InputFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.graph.Vertex; - -/** - * Filter vertices or edges, user can filter vertices, edges and their - * properties that meet the criteria as needed - */ -public interface InputFilter { - - Vertex filter(Vertex vertex); - - Edge filter(Edge edge); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesInput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesInput.java deleted file mode 100644 index 76df3e8eb..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesInput.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -public interface BytesInput extends RandomAccessInput { -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesOutput.java deleted file mode 100644 index a3e4983a4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/BytesOutput.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -public interface BytesOutput extends RandomAccessOutput { - - /** - * Get the internal bytes buffer - * @return buffer - */ - byte[] buffer(); - - /** - * Get the actual bytes buffer that contains value, will make a copy - * @return copied buffer - */ - byte[] toByteArray(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeInput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeInput.java deleted file mode 100644 index 9691b4be7..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeInput.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.commons.lang3.tuple.Pair; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public interface GraphComputeInput extends GraphInput { - - Vertex readVertex() throws IOException; - - Vertex readEdges() throws IOException; - - Pair readMessage() throws IOException; - - Value readValue(RandomAccessInput in) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeOutput.java deleted file mode 100644 index fe994ae60..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphComputeOutput.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public interface GraphComputeOutput extends GraphOutput { - - void writeVertex(Vertex vertex) throws IOException; - - void writeEdges(Vertex vertex) throws IOException; - - void writeMessage(Id id, Value value) throws IOException; - - void writeId(RandomAccessOutput out, Id id) throws IOException; - - void writeValue(RandomAccessOutput out, Value value) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphInput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphInput.java deleted file mode 100644 index 4062097fc..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphInput.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -public interface GraphInput { -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphOutput.java deleted file mode 100644 index e6fd32804..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphOutput.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -public interface GraphOutput { - -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphWritebackOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphWritebackOutput.java deleted file mode 100644 index ca35a080a..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/GraphWritebackOutput.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public interface GraphWritebackOutput extends GraphOutput { - - void writeVertex(Vertex vertex) throws IOException; - - void writeEdges(Edges edges) throws IOException; - - void writeEdge(Edge edge) throws IOException; - - void writeProperties(Properties properties) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessInput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessInput.java deleted file mode 100644 index 0b2e15e86..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessInput.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.Closeable; -import java.io.DataInput; -import java.io.IOException; - -public interface RandomAccessInput extends DataInput, Closeable { - - /** - * @return The current position. - */ - long position(); - - /** - * Set current position to specified position, measured from the beginning - * of input. - * @throws IOException If can't seek to specified position. - */ - void seek(long position) throws IOException; - - /** - * Skip {@code n} bytes. - * @return the position before skip. This is different from {@link - * DataInput#skipBytes} and {@link java.io.InputStream#skip}, which - * return the number of bytes actually skipped. - */ - long skip(long n) throws IOException; - - /** - * @return The total bytes size unread. - * @throws IOException - */ - long available() throws IOException; - - /** - * Creates a new input that shares content like buffer or file, - * but use independent position - */ - RandomAccessInput duplicate() throws IOException; - - /** - * Compare two inputs in the specified range. - */ - int compare(long offset, long length, - RandomAccessInput other, long otherOffset, long otherLength) - throws IOException; - - /** - * @return Read the byte array of size length from the current position - * @throws IOException - */ - default byte[] readBytes(int size) throws IOException { - byte[] bytes = new byte[size]; - this.readFully(bytes); - return bytes; - } - - default int readFixedInt() throws IOException { - return this.readInt(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessOutput.java deleted file mode 100644 index f42eaf5df..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/RandomAccessOutput.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.Closeable; -import java.io.DataOutput; -import java.io.IOException; - -public interface RandomAccessOutput extends DataOutput, Closeable { - - /** - * Get the current write pointer position - * @return the current postion - */ - long position(); - - /** - * Move write pointer to specified position - * @param position the new postion - */ - void seek(long position) throws IOException; - - /** - * Skip {@code n} bytes. - * @return the position before skip. - */ - long skip(long n) throws IOException; - - /** - * Read some bytes from the input in range [offset, offset + length], - * then write the bytes to this output at current position - * @param input the source input - * @param offset the start offset to read from input - * @param length the total length to read from input - */ - void write(RandomAccessInput input, long offset, long length) - throws IOException; - - /** - * At current position, write an int value that fixed in 4 bytes length - * @param v the int value write - */ - void writeFixedInt(int v) throws IOException; - - /** - * Seek to specified position, and write an int value that fixed in 4 - * bytes length, then seek back to old postion - * @param position the new postion to write - * @param v the int value write - */ - void writeFixedInt(long position, int v) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Readable.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Readable.java deleted file mode 100644 index 01c7b4d83..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Readable.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -public interface Readable { - - void read(RandomAccessInput in) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Writable.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Writable.java deleted file mode 100644 index 1908e4847..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/io/Writable.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -public interface Writable { - - void write(RandomAccessOutput out) throws IOException; -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/DefaultMasterComputation.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/DefaultMasterComputation.java deleted file mode 100644 index 87ce65ced..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/DefaultMasterComputation.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.master; - -/** - * The default master-computation, which can be used if there is no - * algorithm-specific master-computation. - */ -public class DefaultMasterComputation implements MasterComputation { - - @Override - public void init(MasterContext context) { - // pass - } - - /** - * Compute until max superstep. - */ - @Override - public boolean compute(MasterComputationContext context) { - return true; - } - - @Override - public void close(MasterContext context) { - // pass - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputation.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputation.java deleted file mode 100644 index 1d0351445..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputation.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.master; - -/** - * Master-computation is computation that can determine whether to continue - * next superstep. It runs on master. It can perform centralized computation - * between supersteps. It runs after every superstep. - * - * The communication between the master and workers is performed via - * aggregators. The value of aggregators are collected by the master before - * {@link #compute(MasterComputationContext)} ()} is called. This means - * aggregator values used by the workers are consistent with aggregator - * values from the master in the same superstep. - */ -public interface MasterComputation { - - /** - * Initialize the master-computation. Register algorithms's aggregators in - * this method. Create resources used in compute. Be called before all - * supersteps start. - */ - void init(MasterContext context); - - /** - * Close the resource created in {@link #init(MasterContext)}. - * Be called after all supersteps. - */ - void close(MasterContext context); - - /** - * The master-algorithm can use aggregators to determine whether to - * continue the next execution or not. Be called at the end of - * a superstep. - * @return true if want to continue the next iteration. - */ - boolean compute(MasterComputationContext context); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputationContext.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputationContext.java deleted file mode 100644 index 8664e61ed..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterComputationContext.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.master; - -/** - * The MasterContext is the interface for the algorithm's master-computation. - * Algorithm's master-computation can get aggregators and get graph - * information such as total vertex count and total edge count. - */ -public interface MasterComputationContext extends MasterContext { - - /** - * @return the total vertex count of the graph. The value may vary from - * superstep to superstep, because the algorithm may add or delete vertices - * during superstep. - */ - long totalVertexCount(); - - /** - * @return the total edge count of the graph. The value may vary from - * superstep to superstep, because the algorithm may add or delete edges - * during superstep. - */ - long totalEdgeCount(); - - /** - * @return the vertex count that is inactive. - */ - long finishedVertexCount(); - - /** - * @return the sent message count at current superstep. - */ - long messageCount(); - - /** - * @return the message sent in bytes at current superstep. - */ - long messageBytes(); - - /** - * @return the current superstep. - */ - int superstep(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterContext.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterContext.java deleted file mode 100644 index 5923c663b..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/master/MasterContext.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.master; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator4Master; -import org.apache.hugegraph.computer.core.config.Config; - -public interface MasterContext extends Aggregator4Master { - - Config config(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/AbstractComputerOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/AbstractComputerOutput.java deleted file mode 100644 index 06881394a..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/AbstractComputerOutput.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public abstract class AbstractComputerOutput implements ComputerOutput { - - private static final Logger LOG = Log.logger(ComputerOutput.class); - - private String name; - private int partition; - - @Override - public void init(Config config, int partition) { - Computation computation = config.createObject( - ComputerOptions.WORKER_COMPUTATION_CLASS); - this.name = computation.name(); - this.partition = partition; - - LOG.info("Start write back partition {} for {}", - this.partition(), this.name()); - } - - @Override - public String name() { - return this.name; - } - - public int partition() { - return this.partition; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/ComputerOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/ComputerOutput.java deleted file mode 100644 index 3522853f9..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/ComputerOutput.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; - -/** - * Computer output is used to output computer results. There is an output object - * for every partition. - */ -public interface ComputerOutput { - - /** - * Initialize the output. Create connection to target output system. - */ - void init(Config config, int partition); - - /** - * For each vertex in partition, this method is called regardless - * vertex's status. - */ - void write(Vertex vertex); - - /** - * Write filter. - * True to commit the computation result, otherwise not to commit. - */ - default boolean filter(Config config, Computation computation, Vertex vertex) { - return true; - } - - /** - * Merge output files of multiple partitions if applicable. - */ - default void mergePartitions(Config config) { - // pass - } - - /** - * Close the connection to target output system. Commit if target output - * required. - */ - void close(); - - /** - * The name of output property. - */ - String name(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphOutput.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphOutput.java deleted file mode 100644 index f5994b128..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphOutput.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.AbstractComputerOutput; -import org.apache.hugegraph.computer.core.output.hg.task.TaskManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.constant.WriteType; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public abstract class HugeGraphOutput extends AbstractComputerOutput { - - private static final Logger LOG = Log.logger(HugeGraphOutput.class); - - private TaskManager taskManager; - private List localVertices; - private int batchSize; - private WriteType writeType; - - @Override - public void init(Config config, int partition) { - super.init(config, partition); - - this.taskManager = new TaskManager(config); - this.batchSize = config.get(ComputerOptions.OUTPUT_BATCH_SIZE); - this.localVertices = new ArrayList<>(this.batchSize); - this.writeType = WriteType.valueOf( - config.get(ComputerOptions.OUTPUT_RESULT_WRITE_TYPE)); - - this.prepareSchema(); - } - - public HugeClient client() { - return this.taskManager.client(); - } - - @Override - public void write(Vertex vertex) { - this.localVertices.add(this.constructHugeVertex(vertex)); - if (this.localVertices.size() >= this.batchSize) { - this.commit(); - } - } - - @Override - public void close() { - if (!this.localVertices.isEmpty()) { - this.commit(); - } - this.taskManager.waitFinished(); - this.taskManager.shutdown(); - LOG.info("End write back partition {}", this.partition()); - } - - protected void commit() { - this.taskManager.submitBatch(this.localVertices); - LOG.info("Write back {} vertices", this.localVertices.size()); - - this.localVertices = new ArrayList<>(this.batchSize); - } - - protected org.apache.hugegraph.structure.graph.Vertex constructHugeVertex( - Vertex vertex) { - org.apache.hugegraph.structure.graph.Vertex hugeVertex = - new org.apache.hugegraph.structure.graph.Vertex(null); - hugeVertex.id(vertex.id().asObject()); - hugeVertex.property(this.name(), this.value(vertex)); - return hugeVertex; - } - - protected T value(Vertex vertex) { - @SuppressWarnings("unchecked") - T value = (T) vertex.value().value(); - return value; - } - - protected WriteType writeType() { - return this.writeType; - } - - protected abstract void prepareSchema(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/exceptions/WriteBackException.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/exceptions/WriteBackException.java deleted file mode 100644 index 4558b2744..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/exceptions/WriteBackException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.exceptions; - -public class WriteBackException extends RuntimeException { - - private static final long serialVersionUID = 5504623124963497613L; - - public WriteBackException(String message) { - super(message); - } - - public WriteBackException(String message, Throwable cause) { - super(message, cause); - } - - public WriteBackException(String message, Object... args) { - super(String.format(message, args)); - } - - public WriteBackException(String message, Throwable cause, Object... args) { - super(String.format(message, args), cause); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadMetrics.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadMetrics.java deleted file mode 100644 index 2a1a559e4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadMetrics.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.metrics; - -import java.util.concurrent.atomic.LongAdder; - -public final class LoadMetrics { - - private final LongAdder insertSuccess; - private final LongAdder insertFailure; - - public LoadMetrics() { - this.insertSuccess = new LongAdder(); - this.insertFailure = new LongAdder(); - } - - public long insertSuccess() { - return this.insertSuccess.longValue(); - } - - public void plusInsertSuccess(long count) { - this.insertSuccess.add(count); - } - - public long insertFailure() { - return this.insertFailure.longValue(); - } - - public void increaseInsertFailure() { - this.insertFailure.increment(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadReport.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadReport.java deleted file mode 100644 index 2fd188108..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadReport.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.metrics; - -public final class LoadReport { - - private long vertexInsertSuccess; - private long vertexInsertFailure; - - public long vertexInsertSuccess() { - return this.vertexInsertSuccess; - } - - public long vertexInsertFailure() { - return this.vertexInsertFailure; - } - - public static LoadReport collect(LoadSummary summary) { - LoadReport report = new LoadReport(); - LoadMetrics metrics = summary.metrics(); - report.vertexInsertSuccess += metrics.insertSuccess(); - report.vertexInsertFailure += metrics.insertFailure(); - return report; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadSummary.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadSummary.java deleted file mode 100644 index 38676098d..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/LoadSummary.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.metrics; - -import java.util.concurrent.atomic.LongAdder; - -import org.apache.commons.lang3.time.StopWatch; - -public final class LoadSummary { - - private final LongAdder vertexLoaded; - private final StopWatch totalTimer; - private final LoadMetrics metrics; - - public LoadSummary() { - this.vertexLoaded = new LongAdder(); - this.totalTimer = new StopWatch(); - this.metrics = new LoadMetrics(); - } - - public LoadMetrics metrics() { - return this.metrics; - } - - public long vertexLoaded() { - return this.vertexLoaded.longValue(); - } - - public void plusLoaded(int count) { - this.vertexLoaded.add(count); - } - - public long totalTime() { - return this.totalTimer.getTime(); - } - - public void startTimer() { - if (!this.totalTimer.isStarted()) { - this.totalTimer.start(); - } - } - - public void stopTimer() { - if (!this.totalTimer.isStopped()) { - this.totalTimer.stop(); - } - } - - public long loadRate() { - long totalTime = this.totalTime(); - if (totalTime == 0) { - return -1; - } - return this.vertexLoaded() * 1000 / totalTime; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/Printer.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/Printer.java deleted file mode 100644 index bc6b258ca..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/metrics/Printer.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.metrics; - -import org.apache.hugegraph.util.Log; -import org.apache.hugegraph.util.TimeUtil; -import org.slf4j.Logger; - -public final class Printer { - - private static final Logger LOG = Log.logger(Printer.class); - - public static void printSummary(LoadSummary summary) { - printCountReport(LoadReport.collect(summary)); - printMeterReport(summary); - } - - private static void printCountReport(LoadReport report) { - log("count metrics"); - log("vertex insert success", report.vertexInsertSuccess()); - log("vertex insert failure", report.vertexInsertFailure()); - } - - private static void printMeterReport(LoadSummary summary) { - log("meter metrics"); - log("total time", TimeUtil.readableTime(summary.totalTime())); - log("vertex load rate(vertices/s)", summary.loadRate()); - } - - private static void log(String message) { - LOG.info(message); - } - - private static void log(String key, long value) { - LOG.info(String.format(" %-30s: %-20d", key, value)); - } - - private static void log(String key, String value) { - LOG.info(String.format(" %-30s: %-20s", key, value)); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/BatchInsertTask.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/BatchInsertTask.java deleted file mode 100644 index 69d99ed1b..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/BatchInsertTask.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.task; - -import java.util.List; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.output.hg.metrics.LoadSummary; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.exception.ServerException; -import org.apache.hugegraph.rest.ClientException; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class BatchInsertTask extends InsertTask { - - private static final Logger LOG = Log.logger(TaskManager.class); - - public BatchInsertTask(Config config, HugeClient client, - List batch, LoadSummary loadSummary) { - super(config, client, batch, loadSummary); - } - - @Override - public void run() { - int retryCount = 0; - int retryTimes = this.config.get(ComputerOptions.OUTPUT_RETRY_TIMES); - do { - try { - this.insertBatch(this.batch); - break; - } catch (ClientException e) { - LOG.debug("client exception: {}", e.getMessage()); - Throwable cause = e.getCause(); - if (cause != null && cause.getMessage() != null) { - if (StringUtils.containsAny(cause.getMessage(), - UNACCEPTABLE_MESSAGES)) { - throw e; - } - } - retryCount = this.waitThenRetry(retryCount, e); - } catch (ServerException e) { - String message = e.getMessage(); - LOG.error("server exception: {}", message); - if (UNACCEPTABLE_EXCEPTIONS.contains(e.exception())) { - throw e; - } - if (StringUtils.containsAny(message, UNACCEPTABLE_MESSAGES)) { - throw e; - } - retryCount = this.waitThenRetry(retryCount, e); - } - } while (retryCount > 0 && retryCount <= retryTimes); - - int count = this.batch.size(); - // This metrics just for current element mapping - this.plusLoadSuccess(count); - } - - private int waitThenRetry(int retryCount, RuntimeException e) { - int retryTimes = this.config.get(ComputerOptions.OUTPUT_RETRY_TIMES); - if (retryTimes <= 0) { - return retryCount; - } - - if (++retryCount > retryTimes) { - LOG.error("Batch insert has been retried more than {} times", - retryTimes); - throw e; - } - - long interval = (1L << retryCount) * - this.config.get(ComputerOptions.OUTPUT_RETRY_INTERVAL); - LOG.debug("Batch insert will sleep {} seconds then do the {}th retry", - interval, retryCount); - try { - Thread.sleep(interval * 1000L); - } catch (InterruptedException ignored) { - // That's fine, just continue. - } - return retryCount; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/InsertTask.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/InsertTask.java deleted file mode 100644 index 251ed4951..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/InsertTask.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.task; - -import java.util.List; -import java.util.Set; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.output.hg.metrics.LoadMetrics; -import org.apache.hugegraph.computer.core.output.hg.metrics.LoadSummary; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.graph.Vertex; - -import com.google.common.collect.ImmutableSet; - -public abstract class InsertTask implements Runnable { - - public static final Set UNACCEPTABLE_EXCEPTIONS = ImmutableSet.of( - "class java.lang.IllegalArgumentException" - ); - - public static final String[] UNACCEPTABLE_MESSAGES = { - // org.apache.http.conn.HttpHostConnectException - "Connection refused", - "The server is being shutting down", - "not allowed to insert, because already exist a vertex " + - "with same id and different label" - }; - - protected Config config; - private HugeClient client; - protected final List batch; - private LoadSummary summary; - - public InsertTask(Config config, HugeClient client, - List batch, LoadSummary loadSummary) { - this.config = config; - this.client = client; - this.batch = batch; - this.summary = loadSummary; - } - - public LoadSummary summary() { - return this.summary; - } - - public LoadMetrics metrics() { - return this.summary().metrics(); - } - - protected void plusLoadSuccess(int count) { - LoadMetrics metrics = this.summary().metrics(); - metrics.plusInsertSuccess(count); - this.summary().plusLoaded(count); - } - - protected void increaseLoadSuccess() { - this.plusLoadSuccess(1); - } - - protected void insertBatch(List vertices) { - this.client.graph().addVertices(vertices); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/SingleInsertTask.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/SingleInsertTask.java deleted file mode 100644 index f823a24d8..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/SingleInsertTask.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.task; - -import java.util.List; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.output.hg.metrics.LoadSummary; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.collect.ImmutableList; - -public class SingleInsertTask extends InsertTask { - - private static final Logger LOG = Log.logger(TaskManager.class); - - public SingleInsertTask(Config config, HugeClient client, - List batch, LoadSummary loadSummary) { - super(config, client, batch, loadSummary); - } - - @Override - public void run() { - for (Vertex vertex : this.batch) { - try { - this.insertSingle(vertex); - this.increaseLoadSuccess(); - } catch (Exception e) { - this.metrics().increaseInsertFailure(); - this.handleInsertFailure(e); - } - } - } - - private void handleInsertFailure(Exception e) { - LOG.error("Single insert error", e); - } - - private void insertSingle(Vertex vertex) { - this.insertBatch(ImmutableList.of(vertex)); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/TaskManager.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/TaskManager.java deleted file mode 100644 index cdeb95ed8..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/output/hg/task/TaskManager.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg.task; - -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.output.hg.exceptions.WriteBackException; -import org.apache.hugegraph.computer.core.output.hg.metrics.LoadSummary; -import org.apache.hugegraph.computer.core.output.hg.metrics.Printer; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.HugeClientBuilder; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public final class TaskManager { - - private static final Logger LOG = Log.logger(TaskManager.class); - - public static final String BATCH_WORKER = "batch-worker-%d"; - public static final String SINGLE_WORKER = "single-worker-%d"; - - private HugeClient client; - private Config config; - - private final Semaphore batchSemaphore; - private final Semaphore singleSemaphore; - private final ExecutorService batchService; - private final ExecutorService singleService; - - private LoadSummary loadSummary; - - public TaskManager(Config config) { - this.config = config; - String url = config.get(ComputerOptions.HUGEGRAPH_URL); - String graph = config.get(ComputerOptions.HUGEGRAPH_GRAPH_NAME); - String username = config.get(ComputerOptions.HUGEGRAPH_USERNAME); - String password = config.get(ComputerOptions.HUGEGRAPH_PASSWORD); - this.client = new HugeClientBuilder(url, graph).configUser(username, password).build(); - // Try to make all batch threads running and don't wait for producer - this.batchSemaphore = new Semaphore(this.batchSemaphoreNum()); - /* - * Let batch threads go forward as far as possible and don't wait for - * single thread pool - */ - this.singleSemaphore = new Semaphore(this.singleSemaphoreNum()); - /* - * In principle, unbounded synchronization queue(which may lead to OOM) - * should not be used, but there the task manager uses semaphores to - * limit the number of tasks added. When there are no idle threads in - * the thread pool, the producer will be blocked, so OOM will not occur. - */ - this.batchService = ExecutorUtil.newFixedThreadPool( - config.get(ComputerOptions.OUTPUT_BATCH_THREADS), - BATCH_WORKER); - this.singleService = ExecutorUtil.newFixedThreadPool( - config.get(ComputerOptions.OUTPUT_SINGLE_THREADS), - SINGLE_WORKER); - - this.loadSummary = new LoadSummary(); - this.loadSummary.startTimer(); - } - - public HugeClient client() { - return this.client; - } - - private int batchSemaphoreNum() { - return 1 + this.config.get(ComputerOptions.OUTPUT_BATCH_THREADS); - } - - private int singleSemaphoreNum() { - return 2 * this.config.get(ComputerOptions.OUTPUT_SINGLE_THREADS); - } - - public void waitFinished() { - LOG.info("Waiting for the insert tasks finished"); - try { - // Wait batch mode task stopped - this.batchSemaphore.acquire(this.batchSemaphoreNum()); - LOG.info("The batch-mode tasks stopped"); - } catch (InterruptedException e) { - LOG.error("Interrupted while waiting batch-mode tasks"); - } finally { - this.batchSemaphore.release(this.batchSemaphoreNum()); - } - - try { - // Wait single mode task stopped - this.singleSemaphore.acquire(this.singleSemaphoreNum()); - LOG.info("The single-mode tasks stopped"); - } catch (InterruptedException e) { - LOG.error("Interrupted while waiting single-mode tasks"); - } finally { - this.singleSemaphore.release(this.singleSemaphoreNum()); - } - } - - public void shutdown() { - long timeout = this.config.get( - ComputerOptions.OUTPUT_THREAD_POOL_SHUTDOWN_TIMEOUT); - try { - this.batchService.shutdown(); - this.batchService.awaitTermination(timeout, TimeUnit.SECONDS); - LOG.info("The batch-mode tasks service executor shutdown"); - } catch (InterruptedException e) { - LOG.error("The batch-mode tasks are interrupted"); - } finally { - if (!this.batchService.isTerminated()) { - LOG.error("The unfinished batch-mode tasks will be cancelled"); - } - this.batchService.shutdownNow(); - } - - try { - this.singleService.shutdown(); - this.singleService.awaitTermination(timeout, TimeUnit.SECONDS); - LOG.info("The single-mode tasks service executor shutdown"); - } catch (InterruptedException e) { - LOG.error("The single-mode tasks are interrupted"); - } finally { - if (!this.singleService.isTerminated()) { - LOG.error("The unfinished single-mode tasks will be cancelled"); - } - this.singleService.shutdownNow(); - } - this.loadSummary.stopTimer(); - Printer.printSummary(this.loadSummary); - - this.client.close(); - } - - public void submitBatch(List batch) { - try { - this.batchSemaphore.acquire(); - } catch (InterruptedException e) { - throw new WriteBackException( - "Interrupted while waiting to submit batch", e); - } - - InsertTask task = new BatchInsertTask(this.config, this.client, - batch, this.loadSummary); - CompletableFuture.runAsync(task, this.batchService).exceptionally(e -> { - LOG.warn("Batch insert error, try single insert", e); - this.submitInSingle(batch); - return null; - }).whenComplete((r, e) -> this.batchSemaphore.release()); - } - - private void submitInSingle(List batch) { - try { - this.singleSemaphore.acquire(); - } catch (InterruptedException e) { - throw new WriteBackException( - "Interrupted while waiting to submit single", e); - } - - InsertTask task = new SingleInsertTask(this.config, this.client, - batch, this.loadSummary); - CompletableFuture.runAsync(task, this.singleService) - .whenComplete((r, e) -> { - this.singleSemaphore.release(); - }); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/BytesUtil.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/BytesUtil.java deleted file mode 100644 index fb07abac2..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/BytesUtil.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import com.google.common.base.Preconditions; - -public class BytesUtil { - - public static byte[] ensureCapacityWithoutCopy(byte[] bytes, int length) { - if (bytes == null || bytes.length < length) { - return new byte[length]; - } else { - return bytes; - } - } - - public static int hashBytes(byte[] bytes, int length) { - return hashBytes(bytes, 0, length); - } - - public static int hashBytes(byte[] bytes, int offset, int length) { - int hash = 1; - for (int i = offset; i < offset + length; i++) { - hash = (31 * hash) + (int) bytes[i]; - } - return hash; - } - - public static int compare(byte[] bytes1, byte[] bytes2) { - return compare(bytes1, bytes1.length, bytes2, bytes2.length); - } - - public static int compare(byte[] bytes1, int length1, - byte[] bytes2, int length2) { - return compare(bytes1, 0, length1, bytes2, 0, length2); - } - - // TODO: use google comparator(unsafe) to improve perf - public static int compare(byte[] bytes1, int offset1, int length1, - byte[] bytes2, int offset2, int length2) { - Preconditions.checkNotNull(bytes1); - Preconditions.checkNotNull(bytes2); - if (bytes1 == bytes2 && offset1 == offset2 && length1 == length2) { - return 0; - } - if (length1 != length2) { - return length1 - length2; - } - - int end1 = offset1 + length1; - int end2 = offset2 + length2; - for (int i = offset1, j = offset2; i < end1 && j < end2; i++, j++) { - int a = (bytes1[i] & 0xff); - int b = (bytes2[j] & 0xff); - if (a != b) { - return a - b; - } - } - return 0; - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/CoderUtil.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/CoderUtil.java deleted file mode 100644 index 03e9295a6..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/CoderUtil.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; - -public class CoderUtil { - - /** - * The byte array returned must be decode by {@link #decode(byte[] bytes)}. - */ - public static byte[] encode(String s) { - // Note that this code is mostly copied from DataOutputStream - int strLen = s.length(); - int utfLen = 0; - char c; - int count = 0; - - // Use charAt instead of copying String to char array - for (int i = 0; i < strLen; i++) { - c = s.charAt(i); - if ((c >= 0x0001) && (c <= 0x007F)) { - utfLen++; - } else if (c > 0x07FF) { - utfLen += 3; - } else { - utfLen += 2; - } - } - - byte[] bytes = new byte[utfLen]; - - int i; - for (i = 0; i < strLen; i++) { - c = s.charAt(i); - if (!((c >= 0x0001) && (c <= 0x007F))) { - break; - } else { - bytes[count++] = (byte) c; - } - } - - for (; i < strLen; i++) { - c = s.charAt(i); - if ((c >= 0x0001) && (c <= 0x007F)) { - bytes[count++] = (byte) c; - } else if (c > 0x07FF) { - bytes[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F)); - bytes[count++] = (byte) (0x80 | ((c >> 6) & 0x3F)); - bytes[count++] = (byte) (0x80 | (c & 0x3F)); - } else { - bytes[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F)); - bytes[count++] = (byte) (0x80 | (c & 0x3F)); - } - } - return bytes; - } - - /** - * Decode the byte array into string. Note that the bytes must be - * generated by {@link #encode(String s)} - */ - public static String decode(byte[] bytes) { - return decode(bytes, 0, bytes.length); - } - - public static String decode(byte[] bytes, int start, int length) { - // Note that this code is mostly copied from DataInputStream - char[] chars = new char[length]; - int c; - int char2; - int char3; - int count = start; - int charIndex = 0; - - while (count < length) { - c = (int) bytes[count] & 0xff; - if (c > 127) { - break; - } - count++; - chars[charIndex++] = (char) c; - } - - while (count < length) { - c = (int) bytes[count] & 0xff; - switch (c >> 4) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - // 0xxxxxxx - count++; - chars[charIndex++] = (char) c; - break; - case 12: - case 13: - // 110x xxxx 10xx xxxx - count += 2; - if (count > length) { - throw new ComputerException( - "Malformed input: partial character at end"); - } - char2 = (int) bytes[count - 1]; - if ((char2 & 0xC0) != 0x80) { - throw new ComputerException( - "Malformed input around byte " + count); - } - chars[charIndex++] = (char) (((c & 0x1F) << 6) | - (char2 & 0x3F)); - break; - case 14: - // 1110 xxxx 10xx xxxx 10xx xxxx - count += 3; - if (count > length) { - throw new ComputerException( - "Malformed input: partial character at end"); - } - char2 = bytes[count - 2]; - char3 = bytes[count - 1]; - if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) { - throw new ComputerException( - "Malformed input around byte " + (count - 1)); - } - chars[charIndex++] = (char) (((c & 0x0F) << 12) | - ((char2 & 0x3F) << 6) | - ((char3 & 0x3F) << 0)); - break; - default: - // 10xx xxxx, 1111 xxxx - throw new ComputerException( - "Malformed input around byte " + count); - } - } - // The number of chars produced may be less than len - return new String(chars, 0, charIndex); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/IdUtil.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/IdUtil.java deleted file mode 100644 index 1963909e4..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/IdUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.util.UUID; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdFactory; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.util.JsonUtil; - -public class IdUtil { - - public static Id parseId(String idStr) { - if (StringUtils.isBlank(idStr)) { - throw new IllegalArgumentException("Can't parse Id for empty string"); - } - - try { - if (idStr.startsWith("U\"")) { - return IdFactory.parseId(IdType.UUID, - UUID.fromString(idStr.substring(1) - .replaceAll("\"", ""))); - } - - Object id = JsonUtil.fromJson(idStr, Object.class); - idStr = idStr.replaceAll("\"", ""); - return id instanceof Number ? - IdFactory.parseId(IdType.LONG, Long.valueOf(idStr)) : - IdFactory.parseId(IdType.UTF8, idStr); - } catch (Exception e) { - throw new IllegalArgumentException(String.format( - "The vertex id must be formatted as Number/String/UUID" + - ", but got '%s'", idStr)); - } - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilExt.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilExt.java deleted file mode 100644 index 3304881e2..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilExt.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.rest.SerializeException; - -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; - -// TODO: move to org.apache.hugegraph.util.JsonUtil later -public class JsonUtilExt { - - private static final ObjectMapper MAPPER = new ObjectMapper(); - - public static List fromJson2List(String json, Class clazz) { - try { - return MAPPER.readValue(json, getCollectionType(List.class, clazz)); - } catch (IOException e) { - throw new SerializeException("Failed to deserialize json '%s'", - e, json); - } - } - - private static JavaType getCollectionType(Class collectionClass, - Class... elementClasses) { - return MAPPER.getTypeFactory().constructParametricType(collectionClass, elementClasses); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ComputationContext.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ComputationContext.java deleted file mode 100644 index 19fbaf1e3..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ComputationContext.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Iterator; -import java.util.function.BiFunction; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -/** - * The ComputationContext is the interface for the algorithm's vertex - * computation. It is passed to algorithm's vertex computation as parameter - * when compute a vertex. It's used by algorithm's vertex computation to send - * messages and get graph information such as total vertex count and total - * edge count. - */ -public interface ComputationContext { - - /** - * Send value to specified target vertex. The specified target vertex - * will receive the value at next superstep. - */ - void sendMessage(Id target, Value value); - - /** - * Send value to all adjacent vertices of specified vertex. The adjacent - * vertices of specified vertex will receive the value at next superstep. - */ - default void sendMessageToAllEdges(Vertex vertex, Value value) { - Iterator edges = vertex.edges().iterator(); - while (edges.hasNext()) { - Edge edge = edges.next(); - this.sendMessage(edge.targetId(), value); - } - } - - /** - * Send all values to filtered adjacent vertices of specified vertex. The - * filtered adjacent vertices of specified vertex will receive the value - * at next superstep. - */ - default void sendMessageToAllEdgesIf( - Vertex vertex, - M value, - BiFunction filter) { - Iterator edges = vertex.edges().iterator(); - while (edges.hasNext()) { - Edge edge = edges.next(); - if (filter.apply(value, edge.targetId())) { - this.sendMessage(edge.targetId(), value); - } - } - } - - /** - * Send all values to all adjacent vertices of specified vertex. The - * adjacent vertices of specified vertex will receive the values at next - * superstep. - */ - default void sendMessagesToAllEdges( - Vertex vertex, - Iterator values) { - while (values.hasNext()) { - M value = values.next(); - this.sendMessageToAllEdges(vertex, value); - } - } - - /** - * Send all values to filtered adjacent vertices of specified vertex. The - * filtered adjacent vertices of specified vertex will receive the values - * at next superstep. - */ - default void sendMessagesToAllEdgesIf( - Vertex vertex, - Iterator values, - BiFunction filter) { - while (values.hasNext()) { - M value = values.next(); - Iterator edges = vertex.edges().iterator(); - while (edges.hasNext()) { - Edge edge = edges.next(); - if (filter.apply(value, edge.targetId())) { - this.sendMessage(edge.targetId(), value); - } - } - } - } - - /** - * @return the total vertex count of the graph. The value may vary from - * superstep to superstep, because the algorithm may add or delete vertices - * during superstep. - */ - long totalVertexCount(); - - /** - * @return the total edge count of the graph. The value may vary from - * superstep to superstep, because the algorithm may add or delete edges - * during superstep. - */ - long totalEdgeCount(); - - /** - * @return the current superstep. - */ - int superstep(); - - /** - * @return The message combiner, or null if there is no message combiner. - * The combiner is used to combine messages for a vertex. - * For {@link ReduceComputation}, there must be a combiner. - */ - Combiner combiner(); -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/FilterComputation.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/FilterComputation.java deleted file mode 100644 index 590f3417e..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/FilterComputation.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Arrays; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.iterator.MapperIterator; - -/** - * FilterComputation is computation that can't combine the messages. When - * messages are received, it can be computed and decided whether to propagate - * along the adjacent vertices. FilterComputation suit for computation like - * ring detection. - * @param Message type - */ -public interface FilterComputation extends Computation { - - /** - * Set vertex's value and return initial message. The message will be - * used to compute the vertex as parameter Iterator messages. - * Be called for every vertex in superstep0. - * {@link #compute0(ComputationContext, Vertex)}. - */ - M initialValue(ComputationContext context, Vertex vertex); - - /** - * Compute with initial message. Be called for every vertex in superstep0. - */ - @Override - default void compute0(ComputationContext context, Vertex vertex) { - M result = this.initialValue(context, vertex); - this.compute(context, vertex, Arrays.asList(result).iterator()); - } - - /** - * Compute a vertex with messages. - * Be called in all supersteps(except superstep0) with messages, - * or in superstep0 with user defined initial message. - * Inactive the vertex after compute by default. - */ - @Override - default void compute(ComputationContext context, - Vertex vertex, - Iterator messages) { - Iterator results = this.computeMessages(context, vertex, messages); - this.sendMessages(context, vertex, results); - this.updateState(vertex); - } - - /** - * Compute vertex with all the messages received and return the results - * as an iterator. Be called for every vertex in a superstep. - * Subclass should override this method if want to compute the vertex when - * no message received. - */ - default Iterator computeMessages(ComputationContext context, - Vertex vertex, - Iterator messages) { - // Streaming iterate messages - return new MapperIterator<>(messages, message -> { - // May return null if don't want to propagate - return this.computeMessage(context, vertex, message); - }); - } - - /** - * Compute vertex with a message. Be called for each message of a vertex - * in a superstep. There may be multiple messages for a vertex, so it may - * be called multiple times for a vertex in a superstep. - * @return The value need to propagate along the edges, or null when - * needn't. - */ - M computeMessage(ComputationContext context, - Vertex vertex, - M message); - - /** - * Subclass should override this method if want to send messages to - * specified adjacent vertices, send to all adjacent vertices by default. - */ - default void sendMessages(ComputationContext context, - Vertex vertex, - Iterator results) { - context.sendMessagesToAllEdges(vertex, results); - } - - /** - * Set vertex's state after computation, set inactive by default. - */ - default void updateState(Vertex vertex) { - vertex.inactivate(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ReduceComputation.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ReduceComputation.java deleted file mode 100644 index dc9882d36..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/ReduceComputation.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Arrays; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -/** - * For algorithm with combiner that combine all the messages, and the - * algorithm can only receive a message for a vertex. If no message received, - * null will be passed. Compute message will return a result that send to - * all adjacent vertices by default. - */ -public interface ReduceComputation - extends Computation { - - /** - * Set vertex's value and return initial message. The message will be - * used to compute the vertex as parameter Iterator messages. - */ - M initialValue(ComputationContext context, Vertex vertex); - - /** - * Compute with initial message. Be called for every vertex in superstep0. - */ - @Override - default void compute0(ComputationContext context, Vertex vertex) { - M result = this.initialValue(context, vertex); - this.compute(context, vertex, Arrays.asList(result).iterator()); - } - - /** - * Compute the specified vertex with messages. - * Be called in all supersteps(except superstep0) with messages, - * or in superstep0 with user defined initial message. - * Update the vertex's state after compute. - */ - @Override - default void compute(ComputationContext context, - Vertex vertex, - Iterator messages) { - Combiner combiner = context.combiner(); - M message = Combiner.combineAll(combiner, messages); - M result = this.computeMessage(context, vertex, message); - if (result != null) { - this.sendMessage(context, vertex, result); - } - this.updateState(vertex); - } - - /** - * Compute the vertex with combined message, or null if no message received. - * The returned message will be sent to adjacent vertices. - * For a vertex, this method can be called only one time in a superstep. - * @param message Combined message, or null if no message received - */ - M computeMessage(ComputationContext context, Vertex vertex, M message); - - /** - * Send result to adjacent vertices of a specified vertex. Send result to - * all adjacent vertices by default. - * Be called when the result is not null. - * The algorithm should override this method if the algorithm doesn't want - * to send the result to all adjacent vertices. - */ - default void sendMessage(ComputationContext context, - Vertex vertex, - M result) { - context.sendMessageToAllEdges(vertex, result); - } - - /** - * Set vertex's state after computation, set inactive by default. - */ - default void updateState(Vertex vertex) { - vertex.inactivate(); - } -} diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerContext.java b/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerContext.java deleted file mode 100644 index 2e5a53198..000000000 --- a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerContext.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator4Worker; -import org.apache.hugegraph.computer.core.config.Config; - -/** - * Algorithm's computation context. Used by algorithm's computation except - * compute a vertex. Algorithm's computation can get(or set) aggregator and - * config from this context. - */ -public interface WorkerContext extends ComputationContext, - Aggregator4Worker { - - /** - * Get config. The config remains immutable during the whole computation - * process. - */ - Config config(); -} diff --git a/computer-core/pom.xml b/computer-core/pom.xml deleted file mode 100644 index ee53458e6..000000000 --- a/computer-core/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-core - - - - org.apache.hugegraph - computer-api - ${revision} - - - org.apache.hugegraph - hugegraph-client - - - - - org.apache.hugegraph - hugegraph-rpc - - - io.netty - netty-all - - - io.etcd - jetcd-core - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - org.apache.hadoop - hadoop-common - - - io.minio - minio - ${minio-version} - - - org.apache.hadoop - hadoop-hdfs-client - - - org.apache.hugegraph - hugegraph-loader - - - org.apache.hugegraph - hugegraph-client - - - diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregators.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregators.java deleted file mode 100644 index 54ca95624..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/Aggregators.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.rpc.AggregateRpcService; -import org.apache.hugegraph.util.E; - -import com.google.common.collect.ImmutableMap; - -public class Aggregators { - - private final Map> aggregators; - - public Aggregators() { - this(ImmutableMap.of()); - } - - public Aggregators(Map> aggrs) { - this.aggregators = new ConcurrentHashMap<>(aggrs); - } - - public Map values() { - Map values = new HashMap<>(); - for (Entry> aggr : - this.aggregators.entrySet()) { - values.put(aggr.getKey(), aggr.getValue().aggregatedValue()); - } - return values; - } - - public Aggregator get(String name, - AggregateRpcService service) { - Aggregator aggregator = this.aggregators.get(name); - if (aggregator == null) { - if (service != null) { - // Try to get the aggregator maybe created dynamic - aggregator = service.getAggregator(name); - if (aggregator != null) { - this.aggregators.put(name, aggregator); - } - } - E.checkArgument(aggregator != null, - "Can't get aggregator '%s'", name); - } - @SuppressWarnings("unchecked") - Aggregator result = (Aggregator) aggregator; - return result; - } - - public void reset(RegisterAggregators register) { - this.aggregators.clear(); - this.aggregators.putAll(register.copyAll()); - } - - public void clear() { - this.aggregators.clear(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/DefaultAggregator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/DefaultAggregator.java deleted file mode 100644 index 0178a1293..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/DefaultAggregator.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.util.E; - -public class DefaultAggregator implements Aggregator { - - private final ValueType type; - private final Class> combinerClass; - - private transient Combiner combiner; - private transient ThreadLocal localValue; - - private V value; - - public DefaultAggregator(ComputerContext context, ValueType type, - Class> combinerClass, - V defaultValue) { - E.checkArgument(type != null, - "The value type of aggregator can't be null"); - E.checkArgument(combinerClass != null, - "The combiner of aggregator can't be null"); - this.type = type; - this.combinerClass = combinerClass; - - if (defaultValue != null) { - this.checkValue(defaultValue); - } - this.value = defaultValue; - - if (context != null) { - this.repair(context); - } - - E.checkArgument(this.value != null, - "Must provide default value for aggregator"); - } - - @Override - public void aggregateValue(V value) { - this.checkValue(value); - this.combiner.combine(value, this.value, this.value); - } - - @Override - public void aggregateValue(int value) { - assert this.type == ValueType.INT; - V localValue = this.localValue.get(); - ((IntValue) localValue).value(value); - this.combineAndSwapIfNeeded(localValue, this.value); - } - - @Override - public void aggregateValue(long value) { - assert this.type == ValueType.LONG; - V localValue = this.localValue.get(); - ((LongValue) localValue).value(value); - this.combineAndSwapIfNeeded(localValue, this.value); - } - - @Override - public void aggregateValue(float value) { - assert this.type == ValueType.FLOAT; - V localValue = this.localValue.get(); - ((FloatValue) localValue).value(value); - this.combineAndSwapIfNeeded(localValue, this.value); - } - - @Override - public void aggregateValue(double value) { - assert this.type == ValueType.DOUBLE; - V localValue = this.localValue.get(); - ((DoubleValue) localValue).value(value); - this.combineAndSwapIfNeeded(localValue, this.value); - } - - private void combineAndSwapIfNeeded(V localValue, V thisValue) { - this.combiner.combine(localValue, thisValue, thisValue); - localValue.assign(thisValue); - } - - @Override - public V aggregatedValue() { - assert this.value != null; - return this.value; - } - - @Override - public void aggregatedValue(V value) { - this.checkValue(value); - this.value = value; - } - - private void checkValue(V value) { - E.checkNotNull(value, "aggregator", "value"); - E.checkArgument(value.valueType() == this.type, - "Can't set %s value '%s' to %s aggregator", - value.valueType().string(), value, this.type.string()); - } - - @Override - public String toString() { - return this.value.toString(); - } - - @Override - public Aggregator copy() { - DefaultAggregator aggregator = new DefaultAggregator<>( - null, this.type, - this.combinerClass, - this.value); - // Ensure deep copy the value - @SuppressWarnings("unchecked") - V deepCopyValue = (V) this.value.copy(); - aggregator.value = deepCopyValue; - aggregator.combiner = this.combiner; - aggregator.localValue = this.localValue; - return aggregator; - } - - @Override - public void repair(ComputerContext context) { - try { - this.combiner = this.combinerClass.newInstance(); - } catch (Exception e) { - throw new ComputerException("Can't new instance from class: %s", - e, this.combinerClass.getName()); - } - - this.localValue = ThreadLocal.withInitial(() -> { - return this.newValue(context); - }); - - if (this.value == null) { - this.value = this.newValue(context); - } - } - - private V newValue(ComputerContext context) { - @SuppressWarnings("unchecked") - V val = (V) context.graphFactory().createValue(this.type); - return val; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/MasterAggrManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/MasterAggrManager.java deleted file mode 100644 index b4a302bfb..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/MasterAggrManager.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.rpc.AggregateRpcService; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -/** - * Aggregator manager manages aggregators in master. - */ -public class MasterAggrManager implements Manager { - - public static final String NAME = "master_aggr"; - - private static final Logger LOG = Log.logger(MasterAggrManager.class); - - private final RegisterAggregators registerAggregators; - private final MasterAggregateHandler aggregatorsHandler; - - public MasterAggrManager() { - this.registerAggregators = new RegisterAggregators(); - this.aggregatorsHandler = new MasterAggregateHandler(); - } - - @Override - public String name() { - return NAME; - } - - @Override - public void inited(Config config) { - /* - * Apply aggregators registerd by master init(), so that workers can - * get aggregators from master. - */ - this.aggregatorsHandler.resetAggregators(this.registerAggregators); - } - - @Override - public void close(Config config) { - // Called when master close() - this.aggregatorsHandler.clearAggregators(); - this.registerAggregators.clear(); - } - - @Override - public void beforeSuperstep(Config config, int superstep) { - /* - * NOTE: rely on worker execute beforeSuperstep() to get all the - * aggregators before this master beforeSuperstep() call. - */ - this.aggregatorsHandler.resetAggregators(this.registerAggregators); - } - - public AggregateRpcService handler() { - return this.aggregatorsHandler; - } - - public void registerAggregator(String name, - Aggregator aggr) { - // Called when master init() - this.registerAggregators.put(name, aggr); - } - - public void aggregatedAggregator(String name, V value) { - // Called when master compute() - E.checkArgument(value != null, - "Can't set value to null for aggregator '%s'", name); - Aggregator aggr = this.aggregatorsHandler.getAggregator(name); - aggr.aggregatedValue(value); - } - - public V aggregatedValue(String name) { - // Called when master compute() - Aggregator aggr = this.aggregatorsHandler.getAggregator(name); - return aggr.aggregatedValue(); - } - - private class MasterAggregateHandler implements AggregateRpcService { - - private final Aggregators aggregators; - - public MasterAggregateHandler() { - this.aggregators = new Aggregators(); - } - - @Override - public RegisterAggregators registeredAggregators() { - return MasterAggrManager.this.registerAggregators; - } - - @Override - public Map listAggregators() { - return this.aggregators.values(); - } - - @Override - public void aggregateAggregators(Map aggregators) { - for (Entry aggr : aggregators.entrySet()) { - this.aggregateAggregator(aggr.getKey(), aggr.getValue()); - } - LOG.info("Master aggregate aggregators: {}", aggregators); - } - - @Override - public Aggregator getAggregator(String name) { - Aggregator aggr = this.aggregators.get(name, null); - assert aggr != null; - @SuppressWarnings("unchecked") - Aggregator aggregator = (Aggregator) aggr; - return aggregator; - } - - @Override - public void aggregateAggregator(String name, - V value) { - Aggregator aggr = this.getAggregator(name); - synchronized (aggr) { - aggr.aggregateValue(value); - } - } - - public void resetAggregators(RegisterAggregators register) { - this.aggregators.reset(register); - } - - public void clearAggregators() { - this.aggregators.clear(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/RegisterAggregators.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/RegisterAggregators.java deleted file mode 100644 index 3b2e943c6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/RegisterAggregators.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.aggregator; - -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public class RegisterAggregators { - - private final Map> aggregators; - - public RegisterAggregators() { - this.aggregators = new ConcurrentHashMap<>(); - } - - public void put(String name, Aggregator aggregator) { - E.checkArgument(name != null, - "The registered aggregator name can't be null"); - E.checkArgument(!name.isEmpty(), - "The registered aggregator name can't be empty"); - E.checkArgument(aggregator != null, - "The registered aggregator can't be null"); - this.aggregators.put(name, aggregator); - } - - public Aggregator copy(String name) { - Aggregator aggregator = this.aggregators.get(name); - E.checkArgument(aggregator != null, - "Can't get unregistered aggregator with name '%s'", - name); - return aggregator.copy(); - } - - public Map> copyAll() { - Map> copy = - new ConcurrentHashMap<>(); - for (Entry> aggr : - this.aggregators.entrySet()) { - copy.put(aggr.getKey(), aggr.getValue().copy()); - } - return copy; - } - - public void clear() { - this.aggregators.clear(); - } - - public void repair(ComputerContext context) { - for (Aggregator aggr : this.aggregators.values()) { - aggr.repair(context); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocator.java deleted file mode 100644 index 362b7789e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocator.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import java.util.function.Supplier; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -import io.netty.util.Recycler; - -public final class DefaultAllocator implements Allocator { - - private final GraphFactory factory; - private final Recycler> vertexRecycler; - private final Recycler> edgeRecycler; - - public DefaultAllocator(Config config, GraphFactory factory) { - this.factory = factory; - - int capacityPerThread = - config.get(ComputerOptions.ALLOCATOR_MAX_VERTICES_PER_THREAD); - this.vertexRecycler = this.newRecycler(capacityPerThread, - this.factory::createVertex); - this.edgeRecycler = this.newRecycler(capacityPerThread, - this.factory::createEdge); - } - - private Recycler> - newRecycler(int capacityPerThread, - Supplier supplier) { - // TODO: Add more params for Recycler - return new Recycler>(capacityPerThread) { - @Override - protected RecyclerReference newObject( - Recycler.Handle> handle) { - T recyclable = supplier.get(); - return new RecyclerReference<>(recyclable, - new RecycleHandler<>(handle)); - } - }; - } - - @Override - public RecyclerReference newVertex() { - return this.vertexRecycler.get(); - } - - @Override - public void freeVertex(RecyclerReference reference) { - reference.close(); - } - - @Override - public RecyclerReference newEdge() { - return this.edgeRecycler.get(); - } - - @Override - public void freeEdge(RecyclerReference reference) { - reference.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/RecycleHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/RecycleHandler.java deleted file mode 100644 index 33250ebd0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/allocator/RecycleHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import io.netty.util.Recycler; - -public class RecycleHandler - implements RecyclerReference.Handle> { - - private Recycler.Handle> handle; - - public RecycleHandler(Recycler.Handle> handle) { - this.handle = handle; - } - - @Override - public void recycle(RecyclerReference object) { - this.handle.recycle(object); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Master.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Master.java deleted file mode 100644 index b19ae5308..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Master.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.SuperstepStat; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.util.SerializeUtil; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class Bsp4Master extends BspBase { - - private static final Logger LOG = Log.logger(Bsp4Master.class); - - public Bsp4Master(Config config) { - super(config); - } - - /** - * Register Master, workers can get master information. - */ - public void masterInitDone(ContainerInfo masterInfo) { - String path = this.constructPath(BspEvent.BSP_MASTER_INIT_DONE); - this.bspClient().put(path, SerializeUtil.toBytes(masterInfo)); - LOG.info("Master set init-done, master info: {}", masterInfo); - } - - /** - * Wait workers registered. - */ - public List waitWorkersInitDone() { - LOG.info("Master is waiting for workers init-done"); - String path = this.constructPath(BspEvent.BSP_WORKER_INIT_DONE); - List serializedContainers = this.waitOnWorkersEvent( - path, this.registerTimeout()); - List containers = new ArrayList<>(this.workerCount()); - for (byte[] serializedContainer : serializedContainers) { - ContainerInfo container = new ContainerInfo(); - SerializeUtil.fromBytes(serializedContainer, container); - containers.add(container); - } - LOG.info("Master waited all workers init-done, workers: {}", - containers); - this.assignIdForWorkers(containers); - this.masterAllInitDone(containers); - return containers; - } - - /** - * The master determines which superstep to start from - */ - public void masterResumeDone(int superstep) { - String path = this.constructPath(BspEvent.BSP_MASTER_RESUME_DONE); - IntValue superstepWritable = new IntValue(superstep); - this.bspClient().put(path, SerializeUtil.toBytes(superstepWritable)); - LOG.info("Master set resume-done({})", superstep); - } - - /** - * Wait all workers read input splits, and send all vertices and - * edges to correspond workers. After this, master call masterInputDone. - */ - public void waitWorkersInputDone() { - LOG.info("Master is waiting for workers input-done"); - String path = this.constructPath(BspEvent.BSP_WORKER_INPUT_DONE); - this.waitOnWorkersEvent(path, this.barrierOnWorkersTimeout()); - LOG.info("Master waited workers input-done"); - } - - /** - * The master signal workers the master input done, the workers can merge - * vertices and edges after receive this signal. - */ - public void masterInputDone() { - LOG.info("Master set input-done"); - String path = this.constructPath(BspEvent.BSP_MASTER_INPUT_DONE); - this.bspClient().put(path, Constants.EMPTY_BYTES); - } - - /** - * Wait workers finish specified superstep. The master receives the - * worker stat from all workers, calls algorithm's master computation, - * check the max iteration count, and then calls masterSuperstepDone to - * synchronize superstep result. - */ - public List waitWorkersStepDone(int superstep) { - LOG.info("Master is waiting for workers superstep-done({})", superstep); - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_DONE, - superstep); - List list = this.waitOnWorkersEvent(path, - this.barrierOnWorkersTimeout()); - List result = new ArrayList<>(this.workerCount()); - for (byte[] bytes : list) { - WorkerStat workerStat = new WorkerStat(); - SerializeUtil.fromBytes(bytes, workerStat); - result.add(workerStat); - } - LOG.info("Master waited workers superstep-done({}), workers stat: {}", - superstep, result); - return result; - } - - /** - * After all workers prepared superstep, master prepare superstep, and - * call masterPrepareSuperstepDone to let the workers know that master is - * prepared done. - */ - public void waitWorkersStepPrepareDone(int superstep) { - LOG.info("Master is waiting for workers superstep-prepare-done({})", - superstep); - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_PREPARE_DONE, - superstep); - this.waitOnWorkersEvent(path, this.barrierOnWorkersTimeout()); - LOG.info("Master waited workers superstep-prepare-done"); - } - - /** - * Master signals the workers that the master superstep prepare-done. - */ - public void masterStepPrepareDone(int superstep) { - LOG.info("Master set superstep-prepare-done({})", superstep); - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_PREPARE_DONE, - superstep); - this.bspClient().put(path, Constants.EMPTY_BYTES); - } - - /** - * Wait all workers finish computation of specified superstep. - */ - public void waitWorkersStepComputeDone(int superstep) { - LOG.info("Master is waiting for workers superstep-compute-done({})", - superstep); - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_COMPUTE_DONE, - superstep); - this.waitOnWorkersEvent(path, this.barrierOnWorkersTimeout()); - LOG.info("Master waited workers superstep-compute-done"); - } - - /** - * Master signals the workers that the all workers compute done. - */ - public void masterStepComputeDone(int superstep) { - LOG.info("Master set superstep-compute-done({})", superstep); - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_COMPUTE_DONE, - superstep); - this.bspClient().put(path, Constants.EMPTY_BYTES); - } - - /** - * Master signals the workers that superstep done. The workers read - * GraphStat and determines whether to continue iteration. - */ - public void masterStepDone(int superstep, SuperstepStat superstepStat) { - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_DONE, - superstep); - this.bspClient().put(path, SerializeUtil.toBytes(superstepStat)); - LOG.info("Master set superstep-done({}), graph stat: {}", - superstep, superstepStat); - } - - /** - * Wait workers output the vertices. - */ - public void waitWorkersOutputDone() { - LOG.info("Master is waiting for workers output-done"); - String path = this.constructPath(BspEvent.BSP_WORKER_OUTPUT_DONE); - this.waitOnWorkersEvent(path, this.barrierOnWorkersTimeout()); - LOG.info("Master waited workers output-done"); - } - - /** - * Wait workers close the managers and exit first. - */ - public void waitWorkersCloseDone() { - LOG.info("Master is waiting for workers close-done"); - String path = this.constructPath(BspEvent.BSP_WORKER_CLOSE_DONE); - this.waitOnWorkersEvent(path, this.barrierOnWorkersTimeout()); - LOG.info("Master waited workers close-done"); - } - - private List waitOnWorkersEvent(String prefix, long timeout) { - return this.bspClient().getChildren(prefix, this.workerCount(), - timeout, this.logInterval()); - } - - private void assignIdForWorkers(List containers) { - // Assign worker id from 1. - for (int i = 0; i < containers.size(); i++) { - containers.get(i).id(i + 1); - } - } - - private void masterAllInitDone(List workers) { - String path = this.constructPath(BspEvent.BSP_MASTER_ALL_INIT_DONE); - this.bspClient().put(path, SerializeUtil.toBytes(workers)); - LOG.info("Master set all-init-done, workers {}", workers); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Worker.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Worker.java deleted file mode 100644 index 99ba70387..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/Bsp4Worker.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.List; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.SuperstepStat; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.util.SerializeUtil; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class Bsp4Worker extends BspBase { - - private static final Logger LOG = Log.logger(Bsp4Worker.class); - - private final ContainerInfo workerInfo; - - public Bsp4Worker(Config config, ContainerInfo workerInfo) { - super(config); - this.workerInfo = workerInfo; - } - - /** - * Wait master registered, get master's information includes hostname - * and port. - */ - public ContainerInfo waitMasterInitDone() { - LOG.info("Worker({}) is waiting for master init-done", - this.workerInfo.uniqueName()); - String path = this.constructPath(BspEvent.BSP_MASTER_INIT_DONE); - byte[] bytes = this.bspClient().get(path, this.registerTimeout(), - this.logInterval()); - ContainerInfo masterInfo = new ContainerInfo(); - SerializeUtil.fromBytes(bytes, masterInfo); - LOG.info("Worker({}) waited master init-done: {}", - this.workerInfo.uniqueName(), masterInfo); - return masterInfo; - } - - /** - * Register this worker, worker's information is passed by constructor. - */ - public void workerInitDone() { - /* - * Can't use workerInfo.id(), because the master does not assign - * worker id yet. The master assigns worker's id by signal - * BspEvent.BSP_MASTER_ALL_INIT_DONE. Worker get it through method - * {@link #waitMasterAllInitDone()}. - */ - String path = this.constructPath(BspEvent.BSP_WORKER_INIT_DONE, - this.workerInfo.uniqueName()); - this.bspClient().put(path, SerializeUtil.toBytes(this.workerInfo)); - LOG.info("Worker set init-done: {}", this.workerInfo.uniqueName()); - } - - /** - * Get all workers information includes hostname and port the workers - * listen on. - */ - public List waitMasterAllInitDone() { - LOG.info("Worker({}) is waiting for master all-init-done", - this.workerInfo.id()); - String path = this.constructPath(BspEvent.BSP_MASTER_ALL_INIT_DONE); - byte[] serializedContainers = this.bspClient().get( - path, - this.registerTimeout(), - this.logInterval()); - List containers = SerializeUtil.fromBytes( - serializedContainers, - ContainerInfo::new); - this.assignThisWorkerId(containers); - LOG.info("Worker({}) waited master all-init-done, workers: {}", - this.workerInfo.id(), containers); - return containers; - } - - /** - * The master set this signal to let workers knows the first superstep to - * start with. - */ - public int waitMasterResumeDone() { - LOG.info("Worker({}) is waiting for master resume-done", - this.workerInfo.id()); - String path = this.constructPath(BspEvent.BSP_MASTER_RESUME_DONE); - byte[] bytes = this.bspClient().get(path, this.barrierOnMasterTimeout(), - this.logInterval()); - IntValue superstep = new IntValue(); - SerializeUtil.fromBytes(bytes, superstep); - LOG.info("Worker({}) waited master resume-done({})", - this.workerInfo.id(), superstep.value()); - return superstep.value(); - } - - /** - * Set read done signal after read input splits, and send all vertices and - * edges to correspond workers. - */ - public void workerInputDone() { - String path = this.constructPath(BspEvent.BSP_WORKER_INPUT_DONE, - this.workerInfo.id()); - this.bspClient().put(path, Constants.EMPTY_BYTES); - LOG.info("Worker({}) set input-done", this.workerInfo.id()); - } - - /** - * Wait master signal that all workers input done. After this, worker - * can merge the vertices and edges. - */ - public void waitMasterInputDone() { - LOG.info("Worker({}) is waiting for master input-done", - this.workerInfo.id()); - String path = this.constructPath(BspEvent.BSP_MASTER_INPUT_DONE); - this.bspClient().get(path, this.barrierOnMasterTimeout(), - this.logInterval()); - LOG.info("Worker({}) waited master input-done", this.workerInfo.id()); - } - - /** - * Worker set this signal to indicate the worker is ready to receive - * messages from other workers. - */ - public void workerStepPrepareDone(int superstep) { - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_PREPARE_DONE, - superstep, this.workerInfo.id()); - this.bspClient().put(path, Constants.EMPTY_BYTES); - LOG.info("Worker({}) set superstep-prepare-done({})", - this.workerInfo.id(), superstep); - } - - /** - * After receive this signal, the worker can execute and send messages - * to other workers. - */ - public void waitMasterStepPrepareDone(int superstep) { - LOG.info("Worker({}) is waiting for master superstep-prepare-done({})", - this.workerInfo.id(), superstep); - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_PREPARE_DONE, - superstep); - this.bspClient().get(path, this.barrierOnMasterTimeout(), - this.logInterval()); - LOG.info("Worker({}) waited master superstep-prepare-done({})", - this.workerInfo.id(), superstep); - } - - /** - * Worker set this signal to indicate the worker has computed the - * vertices for specified superstep. - */ - public void workerStepComputeDone(int superstep) { - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_COMPUTE_DONE, - superstep, this.workerInfo.id()); - this.bspClient().put(path, Constants.EMPTY_BYTES); - LOG.info("Worker({}) set superstep-compute-done({})", - this.workerInfo.id(), superstep); - } - - /** - * After receive this signal, it indicates that all workers have computed - * vertices for the superstep. The worker can calls after-superstep callback - * of managers. - */ - public void waitMasterStepComputeDone(int superstep) { - LOG.info("Worker({}) is waiting for master superstep-compute-done({})", - this.workerInfo.id(), superstep); - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_COMPUTE_DONE, - superstep); - this.bspClient().get(path, this.barrierOnMasterTimeout(), - this.logInterval()); - LOG.info("Worker({}) waited master superstep-compute-done({})", - this.workerInfo.id(), superstep); - } - - /** - * Worker set this signal after sent all messages to corresponding - * workers and sent aggregators to master. - */ - public void workerStepDone(int superstep, WorkerStat workerStat) { - String path = this.constructPath(BspEvent.BSP_WORKER_STEP_DONE, - superstep, this.workerInfo.id()); - this.bspClient().put(path, SerializeUtil.toBytes(workerStat)); - LOG.info("Worker({}) set superstep-done({}), worker stat: {}", - this.workerInfo.id(), superstep, workerStat); - } - - /** - * The master set this signal after all workers signaled superstepDone, - * and master computes MasterComputation, and broadcast all aggregators to - * works. - */ - public SuperstepStat waitMasterStepDone(int superstep) { - LOG.info("Worker({}) is waiting for master superstep-done({})", - this.workerInfo.id(), superstep); - String path = this.constructPath(BspEvent.BSP_MASTER_STEP_DONE, - superstep); - byte[] bytes = this.bspClient().get(path, this.barrierOnMasterTimeout(), - this.logInterval()); - SuperstepStat superstepStat = new SuperstepStat(); - SerializeUtil.fromBytes(bytes, superstepStat); - LOG.info("Worker({}) waited master superstep-done({}), graph stat: {}", - this.workerInfo.id(), superstep, superstepStat); - return superstepStat; - } - - /** - * Worker set this signal to indicate the worker has outputted the result. - */ - public void workerOutputDone() { - String path = this.constructPath(BspEvent.BSP_WORKER_OUTPUT_DONE, - this.workerInfo.id()); - this.bspClient().put(path, Constants.EMPTY_BYTES); - LOG.info("Worker({}) set output-done", this.workerInfo.id()); - } - - /** - * Worker set this signal to indicate the worker has stopped the managers - * and will successfully exit. - */ - public void workerCloseDone() { - String path = this.constructPath(BspEvent.BSP_WORKER_CLOSE_DONE, - this.workerInfo.id()); - this.bspClient().put(path, Constants.EMPTY_BYTES); - LOG.info("Worker({}) set close-done", this.workerInfo.id()); - } - - // Note: The workerInfo in Bsp4Worker is the same object in WorkerService. - private void assignThisWorkerId(List workersFromMaster) { - for (ContainerInfo container : workersFromMaster) { - if (this.workerInfo.uniqueName().equals(container.uniqueName())) { - this.workerInfo.id(container.id()); - LOG.info("Worker({}) assigned id {} from master", - this.workerInfo.uniqueName(), this.workerInfo.id()); - break; - } - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java deleted file mode 100644 index 23d01f4e2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public abstract class BspBase { - - private static final Logger LOG = Log.logger(BspBase.class); - - private final Config config; - - private final String jobId; - private final String jobNamespace; - private final int workerCount; - private final long registerTimeout; - private final long barrierOnMasterTimeout; - private final long barrierOnWorkersTimeout; - private final long logInterval; - - private final BspClient bspClient; - - public BspBase(Config config) { - this.config = config; - - this.jobId = config.get(ComputerOptions.JOB_ID); - this.jobNamespace = config.get(ComputerOptions.JOB_NAMESPACE); - this.workerCount = this.config.get(ComputerOptions.JOB_WORKERS_COUNT); - this.registerTimeout = this.config.get( - ComputerOptions.BSP_REGISTER_TIMEOUT); - this.barrierOnWorkersTimeout = this.config.get( - ComputerOptions.BSP_WAIT_WORKERS_TIMEOUT); - this.barrierOnMasterTimeout = this.config.get( - ComputerOptions.BSP_WAIT_MASTER_TIMEOUT); - this.logInterval = this.config.get(ComputerOptions.BSP_LOG_INTERVAL); - - this.bspClient = this.init(); - } - - /** - * Do initialization operation, like connect to etcd or ZooKeeper cluster. - */ - private BspClient init() { - BspClient bspClient = this.createBspClient(); - String namespace = StringUtils.isEmpty(this.jobNamespace) ? - this.constructPath(null, this.jobId) : - this.constructPath(null, this.jobNamespace, this.jobId); - bspClient.init(namespace); - LOG.info("Init {} BSP connection to '{}' for job '{}'", - bspClient.type(), bspClient.endpoint(), this.jobId); - return bspClient; - } - - /** - * Close the connection to etcd or Zookeeper. Contrary to init. - * Could not do any bsp operation after close is called. - */ - public void close() { - this.bspClient.close(); - LOG.info("Closed {} BSP connection '{}' for job '{}'", - this.bspClient.type(), this.bspClient.endpoint(), this.jobId); - } - - /** - * Cleaned up the BSP data - */ - public void clean() { - try { - this.bspClient().clean(); - } catch (Exception e) { - throw new ComputerException("Failed to clean up the BSP data: %s", - e, this.bspClient().endpoint()); - } - LOG.info("Cleaned up the BSP data: {}", this.bspClient().endpoint()); - } - - private BspClient createBspClient() { - // TODO: create from factory. the type of bsp can be get from config - return new EtcdBspClient(this.config); - } - - protected final BspClient bspClient() { - return this.bspClient; - } - - public final int workerCount() { - return this.workerCount; - } - - public final long registerTimeout() { - return this.registerTimeout; - } - - public final long barrierOnMasterTimeout() { - return this.barrierOnMasterTimeout; - } - - public final long barrierOnWorkersTimeout() { - return this.barrierOnWorkersTimeout; - } - - public final long logInterval() { - return this.logInterval; - } - - /** - * This method is used to generate the key saved in etcd. We can add - * attempt id in the path for further checkpoint based implementation. - */ - protected String constructPath(BspEvent event, Object... paths) { - StringBuilder sb = new StringBuilder(); - if (event != null) { - // TODO: replace event.code() with event.name() - sb.append(event.name()); - } - for (Object path : paths) { - sb.append("/").append(path.toString()); - } - return sb.toString(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspClient.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspClient.java deleted file mode 100644 index 4fb0d2dac..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.List; - -interface BspClient { - - /** - * Return bsp server type, like etcd or zookeeper. - */ - String type(); - - /** - * Get endpoint of the bsp server. - */ - String endpoint(); - - /** - * Do initialization operation, like connect to etcd server. - */ - void init(String namespace); - - /** - * Close connection from bsp server. - * Could not do any bsp operation after close is called. - */ - void close(); - - /** - * Clean the bsp data of the job. - */ - void clean(); - - /** - * Put key & value to the bsp server. - */ - void put(String key, byte[] value); - - /** - * Get value by key from the bsp server. - */ - byte[] get(String key); - - /** - * Get value by key from the bsp server with timout. - */ - byte[] get(String key, long timeout, long logInterval); - - /** - * Get expected count of child values of the key. If - * there is no count of sub keys, wait at most timeout milliseconds. - * @param key the key - * @param count the expected count of values to be get - * @param timeout the max wait time - * @param logInterval the interval in ms to log message - * @return the list of values which key with specified prefix - */ - List getChildren(String key, int count, - long timeout, long logInterval); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEvent.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEvent.java deleted file mode 100644 index 252cd977b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -public enum BspEvent { - - // The WORKER or MASTER after "BSP_" indicates who set the flag. - BSP_MASTER_INIT_DONE(1, "/master/init"), - BSP_WORKER_INIT_DONE(2, "/worker/init"), - BSP_MASTER_ALL_INIT_DONE(3, "/master/all_init"), - BSP_MASTER_RESUME_DONE(4, "/master/resume"), - BSP_WORKER_INPUT_DONE(5, "/worker/input"), - BSP_MASTER_INPUT_DONE(6, "/master/input"), - BSP_WORKER_STEP_PREPARE_DONE(7, "/worker/step_prepare"), - BSP_MASTER_STEP_PREPARE_DONE(8, "/master/step_prepare"), - BSP_WORKER_STEP_COMPUTE_DONE(9, "/worker/step_compute"), - BSP_MASTER_STEP_COMPUTE_DONE(10, "/master/step_compute"), - BSP_WORKER_STEP_DONE(11, "/worker/step_done"), - BSP_MASTER_STEP_DONE(12, "/master/step_done"), - BSP_WORKER_OUTPUT_DONE(13, "/worker/output_done"), - BSP_WORKER_CLOSE_DONE(14, "/worker/close_done"); - - private byte code; - private String key; - - BspEvent(int code, String key) { - assert code >= -128 && code <= 127; - this.code = (byte) code; - this.key = key; - } - - public byte code() { - return this.code; - } - - public String key() { - return this.key; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspClient.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspClient.java deleted file mode 100644 index 59ca489b2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspClient.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.List; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; - -public final class EtcdBspClient implements BspClient { - - private final String endpoints; - - private EtcdClient etcdClient; - - public EtcdBspClient(Config config) { - this.endpoints = config.get(ComputerOptions.BSP_ETCD_ENDPOINTS); - } - - @Override - public String type() { - return "etcd"; - } - - @Override - public String endpoint() { - return this.endpoints; - } - - @Override - public void init(String namespace) { - this.etcdClient = new EtcdClient(this.endpoints, namespace); - } - - @Override - public void close() { - this.etcdClient.close(); - } - - @Override - public void clean() { - this.etcdClient.deleteAllKvsInNamespace(); - } - - @Override - public void put(String key, byte[] value) { - this.etcdClient.put(key, value); - } - - @Override - public byte[] get(String key) { - return this.etcdClient.get(key); - } - - @Override - public byte[] get(String key, long timeout, long logInterval) { - return this.etcdClient.get(key, timeout, logInterval); - } - - @Override - public List getChildren(String prefix, int expectedCount, - long timeout, long logInterval) { - return this.etcdClient.getWithPrefix(prefix, expectedCount, - timeout, logInterval); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClient.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClient.java deleted file mode 100644 index ce97cb48c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClient.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutionException; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.concurrent.BarrierEvent; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.annotations.VisibleForTesting; - -import io.etcd.jetcd.ByteSequence; -import io.etcd.jetcd.Client; -import io.etcd.jetcd.KV; -import io.etcd.jetcd.KeyValue; -import io.etcd.jetcd.Watch; -import io.etcd.jetcd.kv.DeleteResponse; -import io.etcd.jetcd.kv.GetResponse; -import io.etcd.jetcd.options.DeleteOption; -import io.etcd.jetcd.options.GetOption; -import io.etcd.jetcd.options.GetOption.SortOrder; -import io.etcd.jetcd.options.WatchOption; -import io.etcd.jetcd.watch.WatchEvent; -import io.etcd.jetcd.watch.WatchEvent.EventType; -import io.etcd.jetcd.watch.WatchResponse; - - -public class EtcdClient { - - private static final Logger LOG = Log.logger(EtcdClient.class); - private static final Charset ENCODING = StandardCharsets.UTF_8; - - private final Client client; - private final Watch watch; - private final KV kv; - - public EtcdClient(String endpoints, String namespace) { - E.checkArgumentNotNull(endpoints, - "The endpoints can't be null"); - E.checkArgumentNotNull(namespace, - "The namespace can't be null"); - ByteSequence namespaceSeq = ByteSequence.from(namespace.getBytes(ENCODING)); - this.client = Client.builder().endpoints(endpoints) - .namespace(namespaceSeq).build(); - this.watch = this.client.getWatchClient(); - this.kv = this.client.getKVClient(); - } - - /** - * Put the key value mapping to the map, if the map previously contained a - * mapping for the key, the old value is replaced by the specified value. - * @param key key with which the specified value is to be associated - * @param value value to be associated with the specified key - */ - public void put(String key, byte[] value) { - E.checkArgument(key != null, "The key can't be null."); - E.checkArgument(value != null, "The value can't be null."); - try { - this.kv.put(ByteSequence.from(key, ENCODING), ByteSequence.from(value)).get(); - } catch (InterruptedException e) { - throw new ComputerException("Interrupted while putting with key='%s'", e, key); - } catch (ExecutionException e) { - throw new ComputerException("Error while putting with key='%s'", e, key); - } - } - - /** - * Returns the value to which the specified key is mapped. - * @param key The key to be found - * @return the value of specified key, null if not found - */ - public byte[] get(String key) { - return this.get(key, false); - } - - /** - * Returns the value to which the specified key is mapped. - * @param key The key to be found - * @param throwException whether to throw ComputerException if not found. - * @return the value of the specified key, null if not found, - * and throwException is set false - * @throws ComputerException if not found and throwException is set true - */ - public byte[] get(String key, boolean throwException) { - E.checkArgumentNotNull(key, "The key can't be null"); - try { - ByteSequence keySeq = ByteSequence.from(key, ENCODING); - GetResponse response = this.kv.get(keySeq).get(); - if (response.getCount() > 0) { - List kvs = response.getKvs(); - assert kvs.size() == 1; - return kvs.get(0).getValue().getBytes(); - } else if (throwException) { - throw new ComputerException("Can't find value for key='%s'", key); - } else { - return null; - } - } catch (InterruptedException e) { - throw new ComputerException("Interrupted while getting with key='%s'", e, key); - } catch (ExecutionException e) { - throw new ComputerException("Error while getting with key='%s'", e, key); - } - } - - /** - * Returns the value to which the specified key is mapped. If no - * key exists, wait for most time out milliseconds. Or throw ComputerException if timeout - * @param key the key whose associated value is to be returned. - * @param timeout the max time in milliseconds to wait. - * @return the specified value in byte array to which the specified key is - * mapped. - */ - public byte[] get(String key, long timeout, long logInterval) { - E.checkArgumentNotNull(key, "The key can't be null"); - E.checkArgument(timeout > 0L, "The timeout must be > 0, but got: %s", timeout); - E.checkArgument(logInterval > 0L, "The logInterval must be > 0, but got: %s", logInterval); - - ByteSequence keySeq = ByteSequence.from(key, ENCODING); - try { - GetResponse response = this.kv.get(keySeq).get(); - if (response.getCount() > 0) { - List kvs = response.getKvs(); - return kvs.get(0).getValue().getBytes(); - } else { - long revision = response.getHeader().getRevision(); - return this.waitAndGetFromPutEvent(keySeq, revision, timeout, logInterval); - } - } catch (InterruptedException e) { - throw new ComputerException("Interrupted while getting with key='%s'", e, key); - } catch (ExecutionException e) { - throw new ComputerException("Error while getting with key='%s'", e, key); - } - } - - /** - * Wait put event. - * Return the value from event if event triggered in timeout. - * @throws ComputerException if no event triggered in timeout - */ - private byte[] waitAndGetFromPutEvent(ByteSequence keySeq, long revision, - long timeout, long logInterval) - throws InterruptedException { - WaitEvent barrierEvent = new WaitEvent<>(); - - Consumer consumer = watchResponse -> { - List events = watchResponse.getEvents(); - for (WatchEvent event : events) { - if (EventType.PUT.equals(event.getEventType())) { - KeyValue keyValue = event.getKeyValue(); - if (keySeq.equals(keyValue.getKey())) { - byte[] result = event.getKeyValue() - .getValue().getBytes(); - barrierEvent.signalAll(result); - return; - } else { - assert false; - throw new ComputerException( - "Expect event key '%s', found '%s'", - keySeq.toString(ENCODING), - keyValue.getKey().toString(ENCODING)); - } - } else { - assert false; - throw new ComputerException("Unexpected event type '%s'", - event.getEventType()); - } - } - }; - - WatchOption watchOption = WatchOption.newBuilder() - .withRevision(revision) - .withNoDelete(true) - .build(); - try (Watch.Watcher ignored = this.watch.watch(keySeq, watchOption, consumer)) { - return barrierEvent.await(timeout, logInterval, () -> { - LOG.info("Wait for key '{}' with timeout {}ms", - keySeq.toString(ENCODING), timeout); - }); - } - } - - /** - * Get the values of keys with the specified prefix. - * If no key is found, return an empty list. - */ - public List getWithPrefix(String prefix) { - E.checkArgumentNotNull(prefix, "The prefix can't be null"); - try { - ByteSequence prefixSeq = ByteSequence.from(prefix, ENCODING); - GetOption getOption = GetOption.newBuilder().withPrefix(prefixSeq) - .withSortOrder(SortOrder.ASCEND) - .build(); - GetResponse response = this.kv.get(prefixSeq, getOption).get(); - if (response.getCount() > 0) { - return getResponseValues(response); - } else { - return Collections.emptyList(); - } - } catch (InterruptedException e) { - throw new ComputerException( - "Interrupted while getting with prefix='%s'", e, prefix); - } catch (ExecutionException e) { - throw new ComputerException( - "Error while getting with prefix='%s'", e, prefix); - } - } - - /** - * Get the expected count of values of keys with the specified prefix. - * Throws ComputerException if there are no enough objects. - */ - public List getWithPrefix(String prefix, int count) { - E.checkArgumentNotNull(prefix, - "The prefix can't be null"); - E.checkArgument(count >= 0, - "The count must be >= 0, but got: %s", count); - try { - ByteSequence prefixSeq = ByteSequence.from(prefix, ENCODING); - GetOption getOption = GetOption.newBuilder().withPrefix(prefixSeq) - .withLimit(count) - .withSortOrder(SortOrder.ASCEND) - .build(); - GetResponse response = this.kv.get(prefixSeq, getOption).get(); - if (response.getCount() == count) { - return getResponseValues(response); - } else { - throw new ComputerException( - "Expect %s elements, only find %s elements with " + - "prefix='%s'", count, response.getCount(), prefix); - } - } catch (InterruptedException e) { - throw new ComputerException( - "Interrupted while getting with prefix='%s', count=%s", - e, prefix, count); - } catch (ExecutionException e) { - throw new ComputerException( - "Error while getting with prefix='%s', count=%s", - e, prefix, count); - } - } - - /** - * Get the expected count of values with the key prefix with prefix. - * If there is no count of keys, wait at max timeout milliseconds. - * @param prefix the key prefix - * @param count the expected count of values to be got - * @param timeout the max wait time - * @param logInterval the interval in ms to log a message - * @return the list of values which key with specified prefix - */ - public List getWithPrefix(String prefix, int count, - long timeout, long logInterval) { - E.checkArgumentNotNull(prefix, "The prefix can't be null"); - E.checkArgument(count >= 0, - "The count must be >= 0, but got: %s", count); - E.checkArgument(logInterval >= 0, - "The logInterval must be >= 0, but got: %s", - logInterval); - ByteSequence prefixSeq = ByteSequence.from(prefix, ENCODING); - GetOption getOption = GetOption.newBuilder().withPrefix(prefixSeq) - .withSortOrder(SortOrder.ASCEND) - .withLimit(count) - .build(); - try { - GetResponse response = this.kv.get(prefixSeq, getOption).get(); - if (response.getCount() == count) { - return getResponseValues(response); - } else { - long revision = response.getHeader().getRevision(); - return this.waitAndPrefixGetFromPutEvent( - prefixSeq, count, response.getKvs(), - revision, timeout, logInterval); - - } - } catch (InterruptedException e) { - throw new ComputerException( - "Interrupted while getting with prefix='%s', " + - "count=%s, timeout=%s", e, prefix, count, timeout); - } catch (ExecutionException e) { - throw new ComputerException( - "Error while getting with prefix='%s', count=%s, " + - "timeout=%s", e, prefix, count, timeout); - } - } - - /** - * Wait at most expected eventCount events triggered in timeout ms. - * This method waits at most timeout ms regardless of whether expected-eventCount events - * triggered. - * @param existedKeyValues readonly - */ - private List waitAndPrefixGetFromPutEvent( - ByteSequence prefixSeq, int count, - List existedKeyValues, - long revision, long timeout, long logInterval) - throws InterruptedException { - Map keyValues = new ConcurrentHashMap<>(); - for (KeyValue kv : existedKeyValues) { - keyValues.put(kv.getKey(), kv.getValue()); - } - WaitEvent> barrierEvent = new WaitEvent<>(); - Consumer consumer = watchResponse -> { - List events = watchResponse.getEvents(); - for (WatchEvent event : events) { - if (EventType.PUT.equals(event.getEventType())) { - KeyValue keyValue = event.getKeyValue(); - keyValues.put(keyValue.getKey(), keyValue.getValue()); - if (keyValues.size() == count) { - List result = new ArrayList<>(count); - for (ByteSequence byteSequence : keyValues.values()) { - result.add(byteSequence.getBytes()); - } - barrierEvent.signalAll(result); - } - } else if (EventType.DELETE.equals(event.getEventType())) { - keyValues.remove(event.getKeyValue().getKey()); - } else { - throw new ComputerException("Unexpected event type '%s'", - event.getEventType()); - } - } - }; - WatchOption watchOption = WatchOption.newBuilder() - .withPrefix(prefixSeq) - .withRevision(revision) - .build(); - try (Watch.Watcher ignored = this.watch.watch(prefixSeq, watchOption, consumer)) { - return barrierEvent.await(timeout, logInterval, () -> { - LOG.info("Wait for keys with prefix '{}' and timeout {}ms, " + - "expect {} keys but actual got {} keys", - prefixSeq.toString(ENCODING), timeout, count, keyValues.size()); - }); - } - } - - /** - * @return 1 if deleted specified key, 0 if not found specified key - * The deleted data can be got through revision, if revision is compacted, - * throw exception "etcdserver: mvcc: required revision has been compacted". - * @see - * Maintenance - */ - public long delete(String key) { - E.checkArgumentNotNull(key, "The key can't be null"); - ByteSequence keySeq = ByteSequence.from(key, ENCODING); - try { - DeleteResponse response = this.client.getKVClient().delete(keySeq).get(); - return response.getDeleted(); - } catch (InterruptedException e) { - throw new ComputerException("Interrupted while deleting '%s'", e, key); - } catch (ExecutionException e) { - throw new ComputerException("Error while deleting '%s'", e, key); - } - } - - /** - * @return the number of keys deleted - */ - public long deleteWithPrefix(String prefix) { - E.checkArgumentNotNull(prefix, "The prefix can't be null"); - ByteSequence prefixSeq = ByteSequence.from(prefix, ENCODING); - DeleteOption deleteOption = DeleteOption.newBuilder().withPrefix(prefixSeq).build(); - try { - DeleteResponse response = this.client.getKVClient() - .delete(prefixSeq, deleteOption) - .get(); - return response.getDeleted(); - } catch (InterruptedException e) { - throw new ComputerException( - "Interrupted while deleting with prefix '%s'", e, prefix); - } catch (ExecutionException e) { - throw new ComputerException( - "ExecutionException is thrown while deleting with " + - "prefix '%s'", e, prefix); - } - } - - public long deleteAllKvsInNamespace() { - return this.deleteWithPrefix(""); - } - - public void close() { - this.client.close(); - } - - @VisibleForTesting - protected KV getKv() { - return this.kv; - } - - private static List getResponseValues(GetResponse response) { - List values = new ArrayList<>((int) response.getCount()); - for (KeyValue kv : response.getKvs()) { - values.add(kv.getValue().getBytes()); - } - return values; - } - - private static class WaitEvent { - - private final BarrierEvent barrierEvent; - private V result; - - public WaitEvent() { - this.barrierEvent = new BarrierEvent(); - this.result = null; - } - - public void signalAll(V result) { - this.result = result; - this.barrierEvent.signalAll(); - } - - public V await(long timeout, long logInterval, Runnable logFunc) - throws InterruptedException { - long remaining = timeout; - long deadline = timeout + System.currentTimeMillis(); - while (remaining > 0) { - logInterval = Math.min(remaining, logInterval); - if (this.barrierEvent.await(logInterval)) { - assert this.result != null; - return this.result; - } else { - logFunc.run(); - } - remaining = deadline - System.currentTimeMillis(); - } - throw new ComputerException("Timeout(%sms) to wait event", timeout); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/AbstractPointerCombiner.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/AbstractPointerCombiner.java deleted file mode 100644 index 56c606797..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/AbstractPointerCombiner.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import java.util.function.Supplier; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.store.entry.InlinePointer; -import org.apache.hugegraph.computer.core.store.entry.Pointer; - -public abstract class AbstractPointerCombiner - implements PointerCombiner { - - protected T v1; - protected T v2; - protected T result; - protected Combiner combiner; - protected BytesOutput output; - - public AbstractPointerCombiner(Supplier supplier, Combiner combiner) { - this.v1 = supplier.get(); - this.v2 = supplier.get(); - this.result = supplier.get(); - this.combiner = combiner; - this.output = IOFactory.createBytesOutput(Constants.SMALL_BUF_SIZE); - } - - public Pointer combine(Pointer v1, Pointer v2) { - try { - RandomAccessInput input1 = v1.input(); - RandomAccessInput input2 = v2.input(); - input1.seek(v1.offset()); - input2.seek(v2.offset()); - - this.v1.read(input1); - this.v2.read(input2); - this.combiner.combine(this.v1, this.v2, this.result); - - this.output.seek(0L); - this.result.write(this.output); - return new InlinePointer(this.output.buffer(), - this.output.position()); - } catch (Exception e) { - throw new ComputerException( - "Failed to combine pointer1(offset=%s, length=%s) and " + - "pointer2(offset=%s, length=%s)'", - e, v1.offset(), v1.length(), v2.offset(), v2.length()); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/EdgeValueCombiner.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/EdgeValueCombiner.java deleted file mode 100644 index 356cda386..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/EdgeValueCombiner.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.properties.Properties; - -public class EdgeValueCombiner extends AbstractPointerCombiner { - - public EdgeValueCombiner(ComputerContext context) { - super(() -> { - return context.graphFactory().createProperties(); - }, context.config().createObject( - ComputerOptions.WORKER_EDGE_PROPERTIES_COMBINER_CLASS)); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/MessageValueCombiner.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/MessageValueCombiner.java deleted file mode 100644 index 6ed80f90b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/MessageValueCombiner.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public class MessageValueCombiner extends AbstractPointerCombiner { - - public MessageValueCombiner(ComputerContext context) { - super(() -> { - return context.config() - .createObject( - ComputerOptions.ALGORITHM_MESSAGE_CLASS); - }, context.config().createObject( - ComputerOptions.WORKER_COMBINER_CLASS)); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfo.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfo.java deleted file mode 100644 index 643db7aae..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfo.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import java.io.IOException; -import java.net.InetSocketAddress; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.util.JsonUtil; -import org.apache.hugegraph.util.E; - -public class ContainerInfo implements Readable, Writable { - - public static final int MASTER_ID = 0; - - /* - * There is only 1 master, and the id of master is 0. - * The id of workers start from 1. The id is used to identify a worker. - */ - private int id; - private String hostname; - private int rpcPort; - private int dataPort; - - // For reflexion. - public ContainerInfo() { - this(-1, "", -1, -1); - } - - public ContainerInfo(int id, String hostname, int rpcPort) { - this(id, hostname, rpcPort, -1); - } - - public ContainerInfo(String hostname, int rpcPort, int dataPort) { - this(-1, hostname, rpcPort, dataPort); - } - - public ContainerInfo(int id, String hostname, int rpcPort, int dataPort) { - E.checkArgumentNotNull(hostname, "The hostname can't be null"); - this.id = id; - this.hostname = hostname; - this.rpcPort = rpcPort; - this.dataPort = dataPort; - } - - public int id() { - return this.id; - } - - public void id(int id) { - this.id = id; - } - - public String hostname() { - return this.hostname; - } - - public int rpcPort() { - return this.rpcPort; - } - - public int dataPort() { - return this.dataPort; - } - - public String uniqueName() { - StringBuilder sb = new StringBuilder(); - sb.append(this.hostname) - .append(":") - .append(this.dataPort); - return sb.toString(); - } - - public void updateAddress(InetSocketAddress address) { - this.hostname = TransportUtil.host(address); - this.dataPort = address.getPort(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.id = in.readInt(); - this.hostname = in.readUTF(); - this.rpcPort = in.readInt(); - this.dataPort = in.readInt(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.id); - out.writeUTF(this.hostname); - out.writeInt(this.rpcPort); - out.writeInt(this.dataPort); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ContainerInfo)) { - return false; - } - ContainerInfo other = (ContainerInfo) obj; - return this.id == other.id && - this.hostname.equals(other.hostname) && - this.rpcPort == other.rpcPort && - this.dataPort == other.dataPort; - } - - @Override - public int hashCode() { - return Integer.hashCode(this.id); - } - - @Override - public String toString() { - return JsonUtil.toJsonWithClass(this); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/IllegalArgException.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/IllegalArgException.java deleted file mode 100644 index 48f80fdb6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/IllegalArgException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common.exception; - -/** - * A wrapper class for IllegalArgumentException - */ -public class IllegalArgException extends IllegalArgumentException { - - private static final long serialVersionUID = 3031687162799359544L; - - public IllegalArgException(String message) { - super(message); - } - - public IllegalArgException(String message, Throwable cause) { - super(message, cause); - } - - public IllegalArgException(String message, Object... args) { - super(String.format(message, args)); - } - - public IllegalArgException(String message, Throwable cause, - Object... args) { - super(String.format(message, args), cause); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/TransportException.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/TransportException.java deleted file mode 100644 index 85227cd85..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/TransportException.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common.exception; - -import java.io.IOException; - -/** - * The transport network exception - */ -public class TransportException extends IOException { - - private static final long serialVersionUID = -6538118382075299762L; - - public static final int DEFAULT_CODE = 0; - public static final int REMOTE_ERROR_CODE = 1; - - private final int errorCode; - - public TransportException(String message) { - this(DEFAULT_CODE, message); - } - - public TransportException(int errorCode, String message) { - super(message); - this.errorCode = errorCode; - } - - public TransportException(String message, Object... args) { - this(DEFAULT_CODE, message, args); - } - - public TransportException(int errorCode, String message, Object... args) { - super(String.format(message, args)); - this.errorCode = errorCode; - } - - public TransportException(String message, Throwable cause) { - super(message, cause); - this.errorCode = DEFAULT_CODE; - } - - public TransportException(String message, Throwable cause, Object... args) { - super(String.format(message, args), cause); - this.errorCode = DEFAULT_CODE; - } - - public Throwable rootCause() { - return ComputerException.rootCause(this); - } - - public int errorCode() { - return this.errorCode; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/WriteException.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/WriteException.java deleted file mode 100644 index 80b46af60..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/WriteException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common.exception; - -public class WriteException extends ComputerException { - - private static final long serialVersionUID = -1604886592292423750L; - - public WriteException(String message) { - super(message); - } - - public WriteException(String message, Throwable cause) { - super(message, cause); - } - - public WriteException(String message, Object... args) { - super(message, args); - } - - public WriteException(String message, Throwable cause, Object... args) { - super(message, cause, args); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManager.java deleted file mode 100644 index 692073ed8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManager.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.util.Consumers; -import org.apache.hugegraph.computer.core.worker.WorkerContext; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class ComputeManager { - - private static final Logger LOG = Log.logger(ComputeManager.class); - private static final String PREFIX = "partition-compute-executor-%s"; - - private final int workerId; - private final ComputerContext context; - private final Managers managers; - - private final Map partitions; - private final MessageRecvManager recvManager; - private final MessageSendManager sendManager; - private final ExecutorService computeExecutor; - - public ComputeManager(int workerId, ComputerContext context, Managers managers) { - this.workerId = workerId; - this.context = context; - this.managers = managers; - this.partitions = new HashMap<>(); - this.recvManager = this.managers.get(MessageRecvManager.NAME); - this.sendManager = this.managers.get(MessageSendManager.NAME); - - int computeThreadNum = this.partitionComputeThreadNum(context.config()); - this.computeExecutor = ExecutorUtil.newFixedThreadPool( - computeThreadNum, PREFIX); - LOG.info("Created partition compute thread pool, thread num: {}", - computeThreadNum); - } - - private Integer partitionComputeThreadNum(Config config) { - return config.get(ComputerOptions.PARTITIONS_COMPUTE_THREAD_NUMS); - } - - public WorkerStat input() { - WorkerStat workerStat = new WorkerStat(this.workerId); - this.recvManager.waitReceivedAllMessages(); - - Map> vertices = - this.recvManager.vertexPartitions(); - Map> edges = - this.recvManager.edgePartitions(); - - // TODO: parallel input process - for (Map.Entry> entry : - vertices.entrySet()) { - int partition = entry.getKey(); - PeekableIterator vertexIter = entry.getValue(); - PeekableIterator edgesIter = - edges.getOrDefault( - partition, - PeekableIterator.emptyIterator()); - - FileGraphPartition part = new FileGraphPartition(this.context, - this.managers, - partition); - PartitionStat partitionStat = null; - ComputerException inputException = null; - try { - partitionStat = part.input(vertexIter, edgesIter); - } catch (ComputerException e) { - inputException = e; - } finally { - try { - vertexIter.close(); - edgesIter.close(); - } catch (Exception e) { - String message = "Failed to close vertex or edge file " + - "iterator"; - ComputerException closeException = new ComputerException( - message, e); - if (inputException != null) { - inputException.addSuppressed(closeException); - } else { - throw closeException; - } - } - if (inputException != null) { - throw inputException; - } - } - - workerStat.add(partitionStat); - this.partitions.put(partition, part); - } - return workerStat; - } - - /** - * Get compute-messages from MessageRecvManager, then put message to - * corresponding partition. Be called before - * {@link MessageRecvManager#beforeSuperstep} is called. - */ - public void takeRecvedMessages() { - Map> messages = - this.recvManager.messagePartitions(); - for (FileGraphPartition partition : this.partitions.values()) { - partition.messages(messages.get(partition.partition())); - } - } - - public WorkerStat compute(WorkerContext context, int superstep) { - this.sendManager.startSend(MessageType.MSG); - - WorkerStat workerStat = new WorkerStat(this.workerId); - Map stats = new ConcurrentHashMap<>(); - - /* - * Remark: The main thread can perceive the partition compute exception - * only after all partition compute completed, and only record the last - * exception. - */ - Consumers consumers = - new Consumers<>(this.computeExecutor, partition -> { - PartitionStat stat = partition.compute(context, - superstep); - stats.put(stat.partitionId(), stat); - }); - consumers.start("partition-compute"); - - try { - for (FileGraphPartition partition : this.partitions.values()) { - consumers.provide(partition); - } - consumers.await(); - } catch (Throwable t) { - throw new ComputerException("An exception occurred when " + - "partition parallel compute", t); - } - - this.sendManager.finishSend(MessageType.MSG); - - // After compute and send finish signal. - Map recvStats = this.recvManager.messageStats(); - for (Map.Entry entry : stats.entrySet()) { - PartitionStat partStat = entry.getValue(); - int partitionId = partStat.partitionId(); - - MessageStat sendStat = this.sendManager.messageStat(partitionId); - partStat.mergeSendMessageStat(sendStat); - - MessageStat recvStat = recvStats.get(partitionId); - if (recvStat != null) { - partStat.mergeRecvMessageStat(recvStat); - } - - workerStat.add(partStat); - } - return workerStat; - } - - public void output() { - // TODO: Write results back parallel - for (FileGraphPartition partition : this.partitions.values()) { - PartitionStat stat = partition.output(); - LOG.info("Output partition {} complete, stat='{}'", - partition.partition(), stat); - } - } - - public void close() { - this.computeExecutor.shutdown(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/FileGraphPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/FileGraphPartition.java deleted file mode 100644 index a2e61a8a8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/FileGraphPartition.java +++ /dev/null @@ -1,445 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import java.io.File; -import java.io.IOException; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.compute.input.EdgesInput; -import org.apache.hugegraph.computer.core.compute.input.MessageInput; -import org.apache.hugegraph.computer.core.compute.input.VertexInput; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BufferedFileInput; -import org.apache.hugegraph.computer.core.io.BufferedFileOutput; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.output.ComputerOutput; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.FileGenerator; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.apache.hugegraph.computer.core.worker.WorkerContext; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class FileGraphPartition { - - private static final Logger LOG = Log.logger(FileGraphPartition.class); - - private static final String VERTEX = "vertex"; - private static final String EDGE = "edge"; - private static final String STATUS = "status"; - private static final String VALUE = "value"; - - private final ComputerContext context; - private final Computation computation; - private final FileGenerator fileGenerator; - private final int partition; - - private final File vertexFile; - private final File edgeFile; - - private File preStatusFile; - private File curStatusFile; - private File preValueFile; - private File curValueFile; - - private long vertexCount; - private long edgeCount; - - private BufferedFileOutput curStatusOutput; - private BufferedFileOutput curValueOutput; - - private BufferedFileInput preStatusInput; - private BufferedFileInput preValueInput; - - private VertexInput vertexInput; - private EdgesInput edgesInput; - private MessageInput messageInput; - - public FileGraphPartition(ComputerContext context, - Managers managers, - int partition) { - this.context = context; - this.computation = context.config() - .createObject( - ComputerOptions.WORKER_COMPUTATION_CLASS); - this.computation.init(context.config()); - this.fileGenerator = managers.get(FileManager.NAME); - this.partition = partition; - this.vertexFile = new File(this.fileGenerator.randomDirectory(VERTEX)); - this.edgeFile = new File(this.fileGenerator.randomDirectory(EDGE)); - this.vertexCount = 0L; - this.edgeCount = 0L; - } - - protected PartitionStat input(PeekableIterator vertices, - PeekableIterator edges) { - try { - createFile(this.vertexFile); - createFile(this.edgeFile); - BufferedFileOutput vertexOut = new BufferedFileOutput( - this.vertexFile); - BufferedFileOutput edgeOut = new BufferedFileOutput( - this.edgeFile); - while (vertices.hasNext()) { - KvEntry entry = vertices.next(); - Pointer key = entry.key(); - Pointer value = entry.value(); - this.writeVertex(key, value, vertexOut); - this.writeEdges(key, edges, edgeOut); - } - vertexOut.close(); - edgeOut.close(); - } catch (IOException e) { - throw new ComputerException( - "Failed to init FileGraphPartition '%s'", - e, this.partition); - } - - return new PartitionStat(this.partition, this.vertexCount, - this.edgeCount, 0L); - } - - protected PartitionStat compute(WorkerContext context, - int superstep) { - LOG.info("Partition {} begin compute in superstep {}", - this.partition, superstep); - try { - this.beforeCompute(superstep); - } catch (IOException e) { - throw new ComputerException( - "Error occurred when beforeCompute at superstep %s", - e, superstep); - } - - long activeVertexCount; - try { - this.computation.beforeSuperstep(context); - activeVertexCount = superstep == 0 ? - this.compute0(context) : - this.compute1(context); - this.computation.afterSuperstep(context); - } catch (Exception e) { - throw new ComputerException( - "Error occurred when compute at superstep %s", - e, superstep); - } - - try { - this.afterCompute(superstep); - } catch (Exception e) { - throw new ComputerException( - "Error occurred when afterCompute at superstep %s", - e, superstep); - } - - LOG.info("Partition {} finish compute in superstep {}", - this.partition, superstep); - - return new PartitionStat(this.partition, this.vertexCount, - this.edgeCount, - this.vertexCount - activeVertexCount); - } - - - private long compute0(ComputationContext context) { - long activeVertexCount = 0L; - while (this.vertexInput.hasNext()) { - Vertex vertex = this.vertexInput.next(); - vertex.reactivate(); - - Edges edges = this.edgesInput.edges(this.vertexInput.idPointer()); - vertex.edges(edges); - - this.computation.compute0(context, vertex); - - if (vertex.active()) { - activeVertexCount++; - } - - try { - this.saveVertexStatusAndValue(vertex); - } catch (IOException e) { - throw new ComputerException( - "Error occurred when saveVertex: %s", e, vertex); - } - } - return activeVertexCount; - } - - private long compute1(ComputationContext context) { - Value result = this.context.config().createObject( - ComputerOptions.ALGORITHM_RESULT_CLASS); - long activeVertexCount = 0L; - while (this.vertexInput.hasNext()) { - Vertex vertex = this.vertexInput.next(); - this.readVertexStatusAndValue(vertex, result); - - Iterator messageIter = this.messageInput.iterator( - this.vertexInput.idPointer()); - if (messageIter.hasNext()) { - vertex.reactivate(); - } - - /* - * If the vertex is inactive, it's edges will be skipped - * automatically at the next vertex. - */ - if (vertex.active()) { - Edges edges = this.edgesInput.edges( - this.vertexInput.idPointer()); - vertex.edges(edges); - this.computation.compute(context, vertex, messageIter); - } - - // The vertex status may be changed after computation - if (vertex.active()) { - activeVertexCount++; - } - - try { - this.saveVertexStatusAndValue(vertex); - } catch (IOException e) { - throw new ComputerException( - "Error occurred when saveVertex", e); - } - } - return activeVertexCount; - } - - protected PartitionStat output() { - ComputerOutput output = this.context.config().createObject( - ComputerOptions.OUTPUT_CLASS); - output.init(this.context.config(), this.partition); - try { - this.beforeOutput(); - } catch (IOException e) { - throw new ComputerException("Error occurred when beforeOutput", e); - } - - Value result = this.context.config().createObject( - ComputerOptions.ALGORITHM_RESULT_CLASS); - while (this.vertexInput.hasNext()) { - Vertex vertex = this.vertexInput.next(); - this.readVertexStatusAndValue(vertex, result); - - Edges edges = this.edgesInput.edges(this.vertexInput.idPointer()); - vertex.edges(edges); - - if (output.filter(this.context.config(), this.computation, vertex)) { - output.write(vertex); - } - } - - try { - this.afterOutput(); - } catch (IOException e) { - throw new ComputerException("Error occurred when afterOutput", e); - } - output.close(); - return new PartitionStat(this.partition, this.vertexCount, - this.edgeCount, 0L); - } - - /** - * Put the messages sent at previous superstep from MessageRecvManager to - * this partition. The messages is null if no messages sent to this - * partition at previous superstep. - */ - protected void messages(PeekableIterator messages) { - this.messageInput = new MessageInput<>(this.context, messages); - } - - protected int partition() { - return this.partition; - } - - private void readVertexStatusAndValue(Vertex vertex, Value result) { - try { - boolean activate = this.preStatusInput.readBoolean(); - if (activate) { - vertex.reactivate(); - } else { - vertex.inactivate(); - } - } catch (IOException e) { - throw new ComputerException( - "Failed to read status of vertex '%s'", e, vertex); - } - - try { - result.read(this.preValueInput); - vertex.value(result); - } catch (IOException e) { - throw new ComputerException( - "Failed to read value of vertex '%s'", e, vertex); - } - } - - private void saveVertexStatusAndValue(Vertex vertex) throws IOException { - this.curStatusOutput.writeBoolean(vertex.active()); - Value value = vertex.value(); - E.checkNotNull(value, "Vertex's value can't be null"); - value.write(this.curValueOutput); - } - - private void writeVertex(Pointer key, Pointer value, - BufferedFileOutput vertexOut) throws IOException { - byte[] keyBytes = key.bytes(); - vertexOut.writeFixedInt(keyBytes.length); - vertexOut.write(keyBytes); - - byte[] valueBytes = value.bytes(); - vertexOut.writeFixedInt(valueBytes.length); - vertexOut.write(valueBytes); - - this.vertexCount++; - } - - private void writeEdges(Pointer vid, PeekableIterator edges, - BufferedFileOutput edgeOut) throws IOException { - byte[] vidBytes = vid.bytes(); - while (edges.hasNext()) { - KvEntry entry = edges.peek(); - Pointer key = entry.key(); - int matched = vid.compareTo(key); - if (matched < 0) { - return; - } - - edges.next(); - if (matched > 0) { - // Skip stale edges - continue; - } - assert matched == 0; - edgeOut.writeFixedInt(vidBytes.length); - edgeOut.write(vidBytes); - - long valuePosition = edgeOut.position(); - edgeOut.writeFixedInt(0); - - this.edgeCount += entry.numSubEntries(); - edgeOut.writeFixedInt((int) entry.numSubEntries()); - EntryIterator subKvIt = EntriesUtil.subKvIterFromEntry(entry); - while (subKvIt.hasNext()) { - KvEntry subEntry = subKvIt.next(); - // Not write sub-key length - edgeOut.write(subEntry.key().bytes()); - // Not write sub-value length - edgeOut.write(subEntry.value().bytes()); - } - long valueLength = edgeOut.position() - valuePosition - - Constants.INT_LEN; - edgeOut.writeFixedInt(valuePosition, (int) valueLength); - } - } - - private void beforeCompute(int superstep) throws IOException { - this.vertexInput = new VertexInput(this.context, this.vertexFile, - this.vertexCount); - this.edgesInput = new EdgesInput(this.context, this.edgeFile); - // Inputs of vertex, edges, status, and value. - this.vertexInput.init(); - this.edgesInput.init(); - if (superstep != 0) { - this.preStatusFile = this.curStatusFile; - this.preValueFile = this.curValueFile; - this.preStatusInput = new BufferedFileInput(this.preStatusFile); - this.preValueInput = new BufferedFileInput(this.preValueFile); - } - - // Outputs of vertex's status and vertex's value. - String statusPath = this.fileGenerator.randomDirectory( - STATUS, Integer.toString(superstep), - Integer.toString(this.partition)); - String valuePath = this.fileGenerator.randomDirectory( - VALUE, Integer.toString(superstep), - Integer.toString(this.partition)); - this.curStatusFile = new File(statusPath); - this.curValueFile = new File(valuePath); - createFile(this.curStatusFile); - createFile(this.curValueFile); - - this.curStatusOutput = new BufferedFileOutput(this.curStatusFile); - this.curValueOutput = new BufferedFileOutput(this.curValueFile); - } - - private void afterCompute(int superstep) throws Exception { - this.vertexInput.close(); - this.edgesInput.close(); - if (superstep != 0) { - this.messageInput.close(); - this.preStatusInput.close(); - this.preValueInput.close(); - this.preStatusFile.delete(); - this.preValueFile.delete(); - } - this.curStatusOutput.close(); - this.curValueOutput.close(); - } - - private void beforeOutput() throws IOException { - this.vertexInput = new VertexInput(this.context, this.vertexFile, - this.vertexCount); - this.edgesInput = new EdgesInput(this.context, this.edgeFile); - - this.vertexInput.init(); - this.edgesInput.init(); - - this.preStatusFile = this.curStatusFile; - this.preValueFile = this.curValueFile; - this.preStatusInput = new BufferedFileInput(this.preStatusFile); - this.preValueInput = new BufferedFileInput(this.preValueFile); - } - - private void afterOutput() throws IOException { - this.vertexInput.close(); - this.edgesInput.close(); - - this.preStatusInput.close(); - this.preValueInput.close(); - - assert this.preStatusFile == this.curStatusFile; - assert this.preValueFile == this.curValueFile; - this.preStatusFile.delete(); - this.preValueFile.delete(); - - this.vertexFile.delete(); - this.edgeFile.delete(); - } - - private static void createFile(File file) throws IOException { - file.getParentFile().mkdirs(); - E.checkArgument(file.createNewFile(), "Already exists file: %s", file); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInput.java deleted file mode 100644 index 26c32992b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInput.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.IOException; -import java.util.Collections; -import java.util.Iterator; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; - -public class MessageInput { - - private final Config config; - private final PeekableIterator messages; - private final T value; - - public MessageInput(ComputerContext context, - PeekableIterator messages) { - if (messages == null) { - this.messages = PeekableIterator.emptyIterator(); - } else { - this.messages = messages; - } - this.config = context.config(); - - this.value = this.config.createObject( - ComputerOptions.ALGORITHM_MESSAGE_CLASS); - } - - public Iterator iterator(ReusablePointer vidPointer) { - while (this.messages.hasNext()) { - KvEntry entry = this.messages.peek(); - Pointer key = entry.key(); - int status = vidPointer.compareTo(key); - if (status < 0) { - return Collections.emptyIterator(); - } else if (status == 0) { - break; - } else { - this.messages.next(); - } - } - - return new MessageIterator(vidPointer); - } - - public void close() throws Exception { - this.messages.close(); - } - - private class MessageIterator implements Iterator { - - // It indicates whether the value can be returned to client. - private boolean valueValid; - private ReusablePointer vidPointer; - - private MessageIterator(ReusablePointer vidPointer) { - this.vidPointer = vidPointer; - this.valueValid = false; - } - - @Override - public boolean hasNext() { - if (this.valueValid) { - return true; - } - if (MessageInput.this.messages.hasNext()) { - KvEntry entry = MessageInput.this.messages.peek(); - Pointer key = entry.key(); - int status = this.vidPointer.compareTo(key); - if (status == 0) { - MessageInput.this.messages.next(); - this.valueValid = true; - try { - BytesInput in = IOFactory.createBytesInput( - entry.value().bytes()); - MessageInput.this.value.read(in); - } catch (IOException e) { - throw new ComputerException("Can't read value", e); - } - return true; - } else { - return false; - } - } else { - return false; - } - } - - @Override - public T next() { - if (this.valueValid) { - this.valueValid = false; - return MessageInput.this.value; - } else { - throw new NoSuchElementException(); - } - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/ReusablePointer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/ReusablePointer.java deleted file mode 100644 index 3d4a23753..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/ReusablePointer.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.core.util.BytesUtil; - -public class ReusablePointer implements Pointer, Readable { - - private int length; - private byte[] bytes; - private RandomAccessInput input; - - public ReusablePointer() { - this.bytes = Constants.EMPTY_BYTES; - this.length = 0; - this.input = IOFactory.createBytesInput(this.bytes); - } - - public ReusablePointer(byte[] bytes, int length) { - this.bytes = bytes; - this.length = length; - this.input = IOFactory.createBytesInput(this.bytes); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.length = in.readFixedInt(); - if (this.bytes.length < this.length) { - this.bytes = new byte[this.length]; - this.input = IOFactory.createBytesInput(this.bytes); - } - in.readFully(this.bytes, 0, this.length); - } - - @Override - public RandomAccessInput input() { - try { - this.input.seek(0L); - } catch (IOException e) { - throw new ComputerException( - "ResuablePointer can't seek to position 0", e); - } - return this.input; - } - - /** - * Only [0 .. length) of the returned byte array is valid. The extra data - * [length .. bytes.length) is meaningless, may be left by previous pointer. - */ - @Override - public byte[] bytes() { - return this.bytes; - } - - @Override - public void write(RandomAccessOutput output) throws IOException { - output.writeFixedInt(this.length); - output.write(this.bytes(), 0, this.length); - } - - @Override - public long offset() { - return 0L; - } - - @Override - public long length() { - return this.length; - } - - @Override - public int compareTo(Pointer other) { - try { - return BytesUtil.compare(this.bytes(), this.length, - other.bytes(), (int) other.length()); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/VertexInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/VertexInput.java deleted file mode 100644 index 39374a6a5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/VertexInput.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BufferedFileInput; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.StreamGraphInput; - -public class VertexInput { - - private final long vertexCount; - private long readCount; - private RandomAccessInput input; - private final Vertex vertex; - private final ReusablePointer idPointer; - private final ReusablePointer valuePointer; - private final Properties properties; - private final File vertexFile; - - public VertexInput(ComputerContext context, - File vertexFile, - long vertexCount) { - this.vertexFile = vertexFile; - this.vertexCount = vertexCount; - this.readCount = 0L; - this.vertex = context.graphFactory().createVertex(); - this.idPointer = new ReusablePointer(); - this.valuePointer = new ReusablePointer(); - this.properties = context.graphFactory().createProperties(); - this.readCount = 0; - } - - public void init() throws IOException { - this.input = new BufferedFileInput(this.vertexFile); - } - - public void close() throws IOException { - this.input.close(); - } - - public boolean hasNext() { - return this.readCount < this.vertexCount; - } - - public Vertex next() { - this.readCount++; - try { - this.idPointer.read(this.input); - this.valuePointer.read(this.input); - RandomAccessInput valueInput = this.valuePointer.input(); - this.vertex.label(StreamGraphInput.readLabel(valueInput)); - this.properties.read(valueInput); - this.vertex.id(StreamGraphInput.readId(this.idPointer.input())); - this.vertex.properties(this.properties); - } catch (IOException e) { - throw new ComputerException("Can't read vertex from input '%s'", - e, this.vertexFile.getAbsolutePath()); - } - return this.vertex; - } - - public ReusablePointer idPointer() { - return this.idPointer; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactory.java deleted file mode 100644 index 0c52af4a5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactory.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.edge.DefaultEdge; -import org.apache.hugegraph.computer.core.graph.edge.DefaultEdges; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.DefaultProperties; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.IdSet; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.MapValue; -import org.apache.hugegraph.computer.core.graph.value.NullValue; -import org.apache.hugegraph.computer.core.graph.value.StringValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.graph.vertex.DefaultVertex; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public final class BuiltinGraphFactory implements GraphFactory { - - private static final int AVERAGE_DEGREE = 10; - - @Override - public Id createId() { - return new BytesId(); - } - - @Override - public Id createId(long id) { - return BytesId.of(id); - } - - @Override - public Id createId(String id) { - return BytesId.of(id); - } - - @Override - public Id createId(UUID id) { - return BytesId.of(id); - } - - @Override - public Vertex createVertex() { - return new DefaultVertex(this); - } - - @Override - public Vertex createVertex(Id id, V value) { - return new DefaultVertex(this, id, value); - } - - @Override - public Vertex createVertex(String label, Id id, V value) { - return new DefaultVertex(this, label, id, value); - } - - @Override - public Edges createEdges() { - return this.createEdges(AVERAGE_DEGREE); - } - - @Override - public Edges createEdges(int capacity) { - return new DefaultEdges(this, capacity); - } - - @Override - public Edge createEdge() { - return new DefaultEdge(this); - } - - @Override - public Edge createEdge(Id targetId) { - return new DefaultEdge(this, Constants.EMPTY_STR, - Constants.EMPTY_STR, targetId); - } - - @Override - public Edge createEdge(String label, Id targetId) { - return new DefaultEdge(this, label, Constants.EMPTY_STR, targetId); - } - - @Override - public Edge createEdge(String label, String name, Id targetId) { - return new DefaultEdge(this, label, name, targetId); - } - - @Override - public List createList() { - return new ArrayList<>(); - } - - @Override - public List createList(int capacity) { - return new ArrayList<>(capacity); - } - - @Override - public Set createSet() { - return new HashSet<>(); - } - - @Override - public Set createSet(int capacity) { - return new HashSet<>(capacity); - } - - @Override - public Map createMap() { - return new HashMap<>(); - } - - @Override - public Properties createProperties() { - return new DefaultProperties(this); - } - - @Override - public Value createValue(byte code) { - ValueType type = SerialEnum.fromCode(ValueType.class, code); - return createValue(type); - } - - /** - * Create property value by type. - */ - @Override - public Value createValue(ValueType type) { - switch (type) { - case NULL: - return NullValue.get(); - case BOOLEAN: - return new BooleanValue(); - case INT: - return new IntValue(); - case LONG: - return new LongValue(); - case FLOAT: - return new FloatValue(); - case DOUBLE: - return new DoubleValue(); - case ID: - return new BytesId(); - case ID_LIST: - return new IdList(); - case ID_LIST_LIST: - return new IdListList(); - case ID_SET: - return new IdSet(); - case LIST_VALUE: - return new ListValue<>(); - case MAP_VALUE: - return new MapValue<>(); - case STRING: - return new StringValue(); - default: - throw new ComputerException("Can't create Value for %s", - type.name()); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStat.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStat.java deleted file mode 100644 index fa7fb3b59..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStat.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.io.IOException; -import java.util.List; -import java.util.Objects; - -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.util.JsonUtil; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.util.E; - -/** - * It is sent from master to workers. - */ -public class SuperstepStat implements Readable, Writable { - - private long vertexCount; - private long edgeCount; - private long finishedVertexCount; - - private long messageSendCount; - private long messageSendBytes; - - private long messageRecvCount; - private long messageRecvBytes; - - private boolean active; - - public SuperstepStat() { - this.active = true; - } - - public void increase(PartitionStat partitionStat) { - E.checkArgumentNotNull(partitionStat, - "The partitionStat can't be null"); - this.vertexCount += partitionStat.vertexCount(); - this.edgeCount += partitionStat.edgeCount(); - this.finishedVertexCount += partitionStat.finishedVertexCount(); - this.messageSendCount += partitionStat.messageSendCount(); - this.messageSendBytes += partitionStat.messageSendBytes(); - this.messageRecvCount += partitionStat.messageRecvCount(); - this.messageRecvBytes += partitionStat.messageRecvBytes(); - } - - public void increase(WorkerStat workerStat) { - E.checkArgumentNotNull(workerStat, "The workerStat can't be null"); - for (PartitionStat partitionStat : workerStat) { - this.increase(partitionStat); - } - } - - public long vertexCount() { - return this.vertexCount; - } - - public long edgeCount() { - return this.edgeCount; - } - - public long finishedVertexCount() { - return this.finishedVertexCount; - } - - public long messageSendCount() { - return this.messageSendCount; - } - - public long messageSendBytes() { - return this.messageSendBytes; - } - - public long messageRecvCount() { - return this.messageRecvCount; - } - - public long messageRecvBytes() { - return this.messageRecvBytes; - } - - public void inactivate() { - this.active = false; - } - - public boolean active() { - return this.active; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.vertexCount = in.readLong(); - this.edgeCount = in.readLong(); - this.finishedVertexCount = in.readLong(); - this.messageSendCount = in.readLong(); - this.messageSendBytes = in.readLong(); - this.messageRecvCount = in.readLong(); - this.messageRecvBytes = in.readLong(); - this.active = in.readBoolean(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeLong(this.vertexCount); - out.writeLong(this.edgeCount); - out.writeLong(this.finishedVertexCount); - out.writeLong(this.messageSendCount); - out.writeLong(this.messageSendBytes); - out.writeLong(this.messageRecvCount); - out.writeLong(this.messageRecvBytes); - out.writeBoolean(this.active); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SuperstepStat)) { - return false; - } - SuperstepStat other = (SuperstepStat) obj; - return this.vertexCount == other.vertexCount && - this.edgeCount == other.edgeCount && - this.finishedVertexCount == other.finishedVertexCount && - this.messageSendCount == other.messageSendCount && - this.messageSendBytes == other.messageSendBytes && - this.messageRecvCount == other.messageRecvCount && - this.messageRecvBytes == other.messageRecvBytes && - this.active == other.active; - } - - @Override - public int hashCode() { - return Objects.hash(this.vertexCount, this.edgeCount, - this.finishedVertexCount, - this.messageSendCount, this.messageSendBytes, - this.messageRecvCount, this.messageRecvBytes, - this.active); - } - - @Override - public String toString() { - return JsonUtil.toJsonWithClass(this); - } - - public static SuperstepStat from(List workerStats) { - SuperstepStat superstepStat = new SuperstepStat(); - for (WorkerStat workerStat : workerStats) { - superstepStat.increase(workerStat); - } - return superstepStat; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdge.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdge.java deleted file mode 100644 index e074a209e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdge.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.edge; - -import java.util.Objects; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public class DefaultEdge implements Edge { - - private String label; - private String name; - private Id targetId; - private Properties properties; - - public DefaultEdge(GraphFactory graphFactory) { - this(graphFactory, Constants.EMPTY_STR, Constants.EMPTY_STR, null); - } - - public DefaultEdge(GraphFactory graphFactory, String label, - String name, Id targetId) { - this.label = label; - this.name = name; - this.targetId = targetId; - this.properties = graphFactory.createProperties(); - } - - @Override - public String label() { - return this.label; - } - - @Override - public void label(String label) { - this.label = label; - } - - @Override - public String name() { - return this.name; - } - - @Override - public void name(String name) { - this.name = name; - } - - @Override - public Id targetId() { - return this.targetId; - } - - @Override - public void targetId(Id targetId) { - this.targetId = targetId; - } - - @Override - public Properties properties() { - return this.properties; - } - - @Override - public void properties(Properties properties) { - this.properties = properties; - } - - @Override - public T property(String key) { - return this.properties.get(key); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof DefaultEdge)) { - return false; - } - DefaultEdge other = (DefaultEdge) obj; - return Objects.equals(this.label, other.label) && - Objects.equals(this.targetId, other.targetId) && - Objects.equals(this.name, other.name) && - this.properties.equals(other.properties); - } - - @Override - public int hashCode() { - return Objects.hash(this.label, this.name, this.targetId, - this.properties); - } - - @Override - public String toString() { - return String.format("DefaultEdge{label=%s, name=%s, targetId=%s}", - this.label, this.name, this.targetId); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdges.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdges.java deleted file mode 100644 index b691ff818..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/edge/DefaultEdges.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.edge; - -import java.util.Iterator; -import java.util.List; -import java.util.Objects; - -import org.apache.hugegraph.computer.core.graph.GraphFactory; - -public class DefaultEdges implements Edges { - - private final List edges; - - public DefaultEdges(GraphFactory graphFactory, int capacity) { - this.edges = graphFactory.createList(capacity); - } - - @Override - public int size() { - return this.edges.size(); - } - - @Override - public void add(Edge edge) { - this.edges.add(edge); - } - - @Override - public Iterator iterator() { - return this.edges.iterator(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof DefaultEdges)) { - return false; - } - DefaultEdges other = (DefaultEdges) obj; - return this.edges.equals(other.edges); - } - - @Override - public int hashCode() { - return Objects.hash(this.edges); - } - - @Override - public String toString() { - return String.format("DefaultEdges{size=%s}", this.edges.size()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesId.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesId.java deleted file mode 100644 index 7e7342264..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesId.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.util.BytesUtil; -import org.apache.hugegraph.computer.core.util.CoderUtil; -import org.apache.hugegraph.util.E; - -public class BytesId implements Id { - - public static final BytesId EMPTY = BytesId.of(Constants.EMPTY_STR); - - private IdType idType; - private byte[] bytes; - private int length; - - public BytesId() { - this.idType = EMPTY.idType; - this.bytes = EMPTY.bytes; - this.length = EMPTY.length; - } - - public BytesId(IdType idType, byte[] bytes) { - this(idType, bytes, bytes.length); - } - - public BytesId(IdType idType, byte[] bytes, long length) { - E.checkArgument(bytes != null, "The bytes can't be null"); - this.idType = idType; - this.bytes = bytes; - this.length = (int) length; - } - - public static BytesId of(long value) { - BytesOutput output = IOFactory.createBytesOutput(9); - try { - output.writeLong(value); - } catch (IOException e) { - throw new ComputerException("Failed to write Long object to " + - "BytesId"); - } - return new BytesId(IdType.LONG, output.buffer(), output.position()); - } - - public static BytesId of(String value) { - E.checkArgument(value != null, "The value can't be null"); - return new BytesId(IdType.UTF8, CoderUtil.encode(value)); - } - - public static BytesId of(UUID value) { - E.checkArgument(value != null, "The value can't be null"); - long high = value.getMostSignificantBits(); - long low = value.getLeastSignificantBits(); - BytesOutput output = IOFactory.createBytesOutput(16); - try { - output.writeLong(high); - output.writeLong(low); - } catch (IOException e) { - throw new ComputerException("Failed to write UUID object to " + - "BytesId"); - } - return new BytesId(IdType.UUID, output.buffer(), output.position()); - } - - @Override - public ValueType valueType() { - return ValueType.ID; - } - - @Override - public IdType idType() { - return this.idType; - } - - @Override - public void assign(Value other) { - this.checkAssign(other); - this.idType = ((BytesId) other).idType; - this.bytes = ((BytesId) other).bytes; - this.length = ((BytesId) other).length; - } - - @Override - public Id copy() { - byte[] copyBytes = Arrays.copyOf(this.bytes, this.length); - return new BytesId(this.idType, copyBytes, this.length); - } - - @Override - public int length() { - return this.length; - } - - @Override - public Object value() { - return this.asObject(); - } - - @Override - public Object asObject() { - switch (this.idType) { - case LONG: - BytesInput input = IOFactory.createBytesInput(this.bytes, 0, - this.length); - try { - return input.readLong(); - } catch (IOException e) { - throw new ComputerException("Failed to read BytesId to " + - "Long object"); - } - case UTF8: - return CoderUtil.decode(this.bytes, 0, this.length); - case UUID: - input = IOFactory.createBytesInput(this.bytes, 0, this.length); - try { - long high = input.readLong(); - long low = input.readLong(); - return new UUID(high, low); - } catch (IOException e) { - throw new ComputerException("Failed to read BytesId to " + - "UUID object"); - } - default: - throw new ComputerException("Unexpected IdType %s", - this.idType); - } - } - - @Override - public void read(RandomAccessInput in) throws IOException { - assert this != EMPTY : "can't read to EMPTY id"; - this.idType = SerialEnum.fromCode(IdType.class, in.readByte()); - int len = in.readInt(); - this.bytes = BytesUtil.ensureCapacityWithoutCopy(this.bytes, len); - in.readFully(this.bytes, 0, len); - this.length = len; - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeByte(this.idType.code()); - out.writeInt(this.length); - out.write(this.bytes, 0, this.length); - } - - @Override - public int compareTo(Value obj) { - int typeDiff = this.valueType().compareTo(obj.valueType()); - if (typeDiff != 0) { - return typeDiff; - } - typeDiff = this.idType().code() - ((Id) obj).idType().code(); - if (typeDiff != 0) { - return typeDiff; - } - BytesId other = (BytesId) obj; - return BytesUtil.compare(this.bytes, this.length, - other.bytes, other.length); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof BytesId)) { - return false; - } - BytesId other = (BytesId) obj; - if (this.idType != other.idType) { - return false; - } - return BytesUtil.compare(this.bytes, this.length, - other.bytes, other.length) == 0; - } - - @Override - public int hashCode() { - return BytesUtil.hashBytes(this.bytes, this.length); - } - - @Override - public String toString() { - return this.asObject().toString(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitioner.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitioner.java deleted file mode 100644 index 1b54310a8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitioner.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.partition; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; - -public final class HashPartitioner implements Partitioner { - - private int partitionCount; - private int workerCount; - - public HashPartitioner() { - this.partitionCount = -1; - this.workerCount = -1; - } - - @Override - public void init(Config config) { - this.partitionCount = config.get(ComputerOptions.JOB_PARTITIONS_COUNT); - this.workerCount = config.get(ComputerOptions.JOB_WORKERS_COUNT); - } - - @Override - public int partitionId(Id vertexId) { - int hashCode = vertexId.hashCode() & Integer.MAX_VALUE; - return hashCode % this.partitionCount; - } - - @Override - public int workerId(int partitionId) { - // Note: workerId start from 1 - return (partitionId % this.workerCount) + 1; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStat.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStat.java deleted file mode 100644 index a47e4d8c7..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStat.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.partition; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.core.util.JsonUtil; - -public class PartitionStat implements Readable, Writable { - - private int partitionId; - - private long vertexCount; - private long edgeCount; - private long finishedVertexCount; - - private long messageSendCount; - private long messageSendBytes; - - private long messageRecvCount; - private long messageRecvBytes; - - public PartitionStat() { - // For reflexion - this(0, 0L, 0L, 0L); - } - - public PartitionStat(int partitionId, long vertexCount, long edgeCount, - long finishedVertexCount) { - this.partitionId = partitionId; - this.vertexCount = vertexCount; - this.edgeCount = edgeCount; - this.finishedVertexCount = finishedVertexCount; - this.messageSendCount = 0L; - this.messageSendBytes = 0L; - this.messageRecvCount = 0L; - this.messageRecvBytes = 0L; - } - - public int partitionId() { - return this.partitionId; - } - - public long vertexCount() { - return this.vertexCount; - } - - public long edgeCount() { - return this.edgeCount; - } - - public long finishedVertexCount() { - return this.finishedVertexCount; - } - - public long messageSendCount() { - return this.messageSendCount; - } - - public long messageSendBytes() { - return this.messageSendBytes; - } - - public long messageRecvCount() { - return this.messageRecvCount; - } - - public long messageRecvBytes() { - return this.messageRecvBytes; - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.partitionId = in.readInt(); - this.vertexCount = in.readLong(); - this.edgeCount = in.readLong(); - this.finishedVertexCount = in.readLong(); - this.messageSendCount = in.readLong(); - this.messageSendBytes = in.readLong(); - this.messageRecvCount = in.readLong(); - this.messageRecvBytes = in.readLong(); - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.partitionId); - out.writeLong(this.vertexCount); - out.writeLong(this.edgeCount); - out.writeLong(this.finishedVertexCount); - out.writeLong(this.messageSendCount); - out.writeLong(this.messageSendBytes); - out.writeLong(this.messageRecvCount); - out.writeLong(this.messageRecvBytes); - } - - public void mergeSendMessageStat(MessageStat messageStat) { - this.messageSendCount += messageStat.messageCount(); - this.messageSendBytes += messageStat.messageBytes(); - } - - public void mergeRecvMessageStat(MessageStat messageStat) { - this.messageRecvCount += messageStat.messageCount(); - this.messageRecvBytes += messageStat.messageBytes(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PartitionStat)) { - return false; - } - PartitionStat other = (PartitionStat) obj; - return this.partitionId == other.partitionId && - this.vertexCount == other.vertexCount && - this.finishedVertexCount == other.finishedVertexCount && - this.edgeCount == other.edgeCount && - this.messageSendCount == other.messageSendCount && - this.messageSendBytes == other.messageSendBytes && - this.messageRecvCount == other.messageRecvCount && - this.messageRecvBytes == other.messageRecvBytes; - } - - @Override - public int hashCode() { - return Integer.hashCode(this.partitionId); - } - - @Override - public String toString() { - return JsonUtil.toJsonWithClass(this); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/Partitioner.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/Partitioner.java deleted file mode 100644 index 504c76be7..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/partition/Partitioner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.partition; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; - -public interface Partitioner { - - /** - * Initialize the partitioner with config. - */ - void init(Config config); - - /** - * Get the partition id by specified vertex id. - */ - int partitionId(Id vertexId); - - /** - * Get the worker id by specified partition id. - */ - int workerId(int partitionId); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/DefaultVertex.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/DefaultVertex.java deleted file mode 100644 index e2f31f7a0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/graph/vertex/DefaultVertex.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.vertex; - -import java.util.Objects; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public class DefaultVertex implements Vertex { - - private String label; - private Id id; - private Value value; - private Edges edges; - private Properties properties; - private boolean active; - - public DefaultVertex(GraphFactory graphFactory) { - this(graphFactory, null, null); - } - - public DefaultVertex(GraphFactory graphFactory, Id id, Value value) { - this(graphFactory, Constants.EMPTY_STR, id, value); - } - - public DefaultVertex(GraphFactory graphFactory, String label, Id id, - Value value) { - this.label = label; - this.id = id; - this.value = value; - this.edges = graphFactory.createEdges(); - this.properties = graphFactory.createProperties(); - this.active = true; - } - - @Override - public String label() { - return this.label; - } - - @Override - public void label(String label) { - this.label = label; - } - - @Override - public Id id() { - return this.id; - } - - @Override - public void id(Id id) { - this.id = id; - } - - @Override - @SuppressWarnings("unchecked") - public V value() { - return (V) this.value; - } - - @Override - public void value(V value) { - this.value = value; - } - - @Override - public int numEdges() { - return this.edges.size(); - } - - @Override - public Edges edges() { - return this.edges; - } - - @Override - public void edges(Edges edges) { - this.edges = edges; - } - - @Override - public void addEdge(Edge edge) { - this.edges.add(edge); - } - - @Override - public Properties properties() { - return this.properties; - } - - @Override - public void properties(Properties properties) { - this.properties = properties; - } - - @Override - public T property(String key) { - return this.properties.get(key); - } - - @Override - public boolean active() { - return this.active; - } - - @Override - public void inactivate() { - this.active = false; - } - - @Override - public void reactivate() { - this.active = true; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof DefaultVertex)) { - return false; - } - DefaultVertex other = (DefaultVertex) obj; - return this.active == other.active && - Objects.equals(this.id, other.id) && - Objects.equals(this.value, other.value) && - Objects.equals(this.edges, other.edges) && - Objects.equals(this.properties, other.properties); - } - - @Override - public int hashCode() { - return Objects.hash(this.id, this.value, this.edges, - this.properties, this.active); - } - - @Override - public String toString() { - return String.format("DefaultVertex{id=%s, value=%s, edges.size=%s, " + - "active=%s}", this.id, this.value, - this.edges.size(), this.active); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/EdgeFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/EdgeFetcher.java deleted file mode 100644 index 7bde2b60b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/EdgeFetcher.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.structure.graph.Edge; - -/** - * Streamed read the data of each input split, and return one HugeEdge object - * at each iteration - */ -public interface EdgeFetcher extends ElementFetcher { - - void close(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/ElementFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/ElementFetcher.java deleted file mode 100644 index eade29d9a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/ElementFetcher.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.Iterator; - -public interface ElementFetcher extends Iterator { - - /** - * Set the current input split meta information to be loaded - * @param split current input split meta - */ - void prepareLoadInputSplit(InputSplit split); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/GraphFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/GraphFetcher.java deleted file mode 100644 index 28328950a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/GraphFetcher.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -public interface GraphFetcher { - - InputSplit nextVertexInputSplit(); - - InputSplit nextEdgeInputSplit(); - - VertexFetcher vertexFetcher(); - - EdgeFetcher edgeFetcher(); - - void close(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverter.java deleted file mode 100644 index dd94dabc5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverter.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.Collection; -import java.util.Map; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.NullValue; -import org.apache.hugegraph.computer.core.graph.value.StringValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.util.E; - -public final class HugeConverter { - - private static final GraphFactory GRAPH_FACTORY = - ComputerContext.instance().graphFactory(); - - public static Id convertId(Object rawId) { - E.checkArgumentNotNull(rawId, "The rawId can't be null"); - if (rawId instanceof Number) { - return BytesId.of(((Number) rawId).longValue()); - } else if (rawId instanceof String) { - return BytesId.of((String) rawId); - } else if (rawId instanceof UUID) { - return BytesId.of((UUID) rawId); - } else { - throw new ComputerException("Can't convert to Id from '%s'(%s)", - rawId, rawId.getClass()); - } - } - - public static Value.Tvalue convertValue(Object rawValue) { - if (rawValue == null) { - return NullValue.get(); - } else if (rawValue instanceof Boolean) { - return new BooleanValue((boolean) rawValue); - } else if (rawValue instanceof Integer) { - return new IntValue((int) rawValue); - } else if (rawValue instanceof Long) { - return new LongValue((long) rawValue); - } else if (rawValue instanceof Float) { - return new FloatValue((float) rawValue); - } else if (rawValue instanceof Double) { - return new DoubleValue((double) rawValue); - } else if (rawValue instanceof String) { - return new StringValue((String) rawValue); - } else if (rawValue instanceof Collection) { - @SuppressWarnings("unchecked") - Collection collection = (Collection) rawValue; - ListValue> listValue = new ListValue<>(); - for (Object nestedRawValue : collection) { - listValue.add(convertValue(nestedRawValue)); - } - return listValue; - } else { - throw new ComputerException("Can't convert to Value from '%s'(%s)", - rawValue, rawValue.getClass()); - } - } - - public static Properties convertProperties( - Map rawProperties) { - Properties properties = GRAPH_FACTORY.createProperties(); - for (Map.Entry entry : rawProperties.entrySet()) { - String key = entry.getKey(); - Value value = convertValue(entry.getValue()); - properties.put(key, value); - } - return properties; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/IdUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/IdUtil.java deleted file mode 100644 index 6e3b83da5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/IdUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.schema.EdgeLabel; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.SplicingIdGenerator; - -import com.google.common.collect.ImmutableList; - -public class IdUtil { - - public static final String NUMBER_ID_PREFIX = "L"; - public static final String STRING_ID_PREFIX = "S"; - - private static String writeString(Object rawId) { - Id id = HugeConverter.convertId(rawId); - String idString = id.toString(); - return (id.idType() == IdType.LONG ? - NUMBER_ID_PREFIX : STRING_ID_PREFIX).concat(idString); - } - - private static List sortValues(Edge edge, EdgeLabel edgeLabel) { - List sortKeys = edgeLabel.sortKeys(); - if (sortKeys.isEmpty()) { - return ImmutableList.of(); - } - List propValues = new ArrayList<>(sortKeys.size()); - for (String sk : sortKeys) { - Object property = edge.property(sk); - E.checkState(property != null, - "The value of sort key '%s' can't be null", sk); - propValues.add(property); - } - return propValues; - } - - public static String assignEdgeId(Edge edge, EdgeLabel edgeLabel) { - return SplicingIdGenerator.concat( - writeString(edge.sourceId()), - String.valueOf(edgeLabel.id()), - SplicingIdGenerator.concatValues(sortValues(edge, edgeLabel)), - writeString(edge.targetId())); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSourceFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSourceFactory.java deleted file mode 100644 index f53ce3877..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSourceFactory.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.hg.HugeGraphFetcher; -import org.apache.hugegraph.computer.core.input.hg.HugeInputSplitFetcher; -import org.apache.hugegraph.computer.core.input.loader.LoaderFileInputSplitFetcher; -import org.apache.hugegraph.computer.core.input.loader.LoaderGraphFetcher; -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; - -public class InputSourceFactory { - - public static InputSplitFetcher createInputSplitFetcher(Config config) { - String type = config.get(ComputerOptions.INPUT_SOURCE_TYPE); - switch (type) { - case "hugegraph-server": - return new HugeInputSplitFetcher(config); - case "hugegraph-loader": - return new LoaderFileInputSplitFetcher(config); - default: - throw new ComputerException("Unexpected source type %s", type); - } - } - - public static GraphFetcher createGraphFetcher(Config config, - InputSplitRpcService srv) { - String type = config.get(ComputerOptions.INPUT_SOURCE_TYPE); - switch (type) { - case "hugegraph-server": - return new HugeGraphFetcher(config, srv); - case "hugegraph-loader": - return new LoaderGraphFetcher(config, srv); - default: - throw new ComputerException("Unexpected source type %s", type); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitFetcher.java deleted file mode 100644 index 831412543..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitFetcher.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.List; - -public interface InputSplitFetcher { - - /** - * Close the resources used in the input split fetch - */ - void close(); - - /** - * Fetch all vertex input splits just once - * @return all vertex input splits - */ - List fetchVertexInputSplits(); - - /** - * Fetch all edge input splits just once - * @return all edge input splits - */ - List fetchEdgeInputSplits(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputHandler.java deleted file mode 100644 index b6c479668..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.List; -import java.util.Queue; -import java.util.concurrent.LinkedBlockingQueue; - -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; - -public class MasterInputHandler implements InputSplitRpcService { - - private final InputSplitFetcher fetcher; - private final Queue vertexSplits; - private final Queue edgeSplits; - - public MasterInputHandler(InputSplitFetcher fetcher) { - this.fetcher = fetcher; - this.vertexSplits = new LinkedBlockingQueue<>(); - this.edgeSplits = new LinkedBlockingQueue<>(); - } - - public int createVertexInputSplits() { - List splits = this.fetcher.fetchVertexInputSplits(); - for (InputSplit split : splits) { - this.vertexSplits.offer(split); - } - return this.vertexSplits.size(); - } - - public int createEdgeInputSplits() { - List splits = this.fetcher.fetchEdgeInputSplits(); - for (InputSplit split : splits) { - this.edgeSplits.offer(split); - } - return this.edgeSplits.size(); - } - - @Override - public InputSplit nextVertexInputSplit() { - InputSplit split = this.vertexSplits.poll(); - return split != null ? split : InputSplit.END_SPLIT; - } - - @Override - public InputSplit nextEdgeInputSplit() { - InputSplit split = this.edgeSplits.poll(); - return split != null ? split : InputSplit.END_SPLIT; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputManager.java deleted file mode 100644 index 4b1017401..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/MasterInputManager.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class MasterInputManager implements Manager { - - private static final Logger LOG = Log.logger(MasterInputManager.class); - - public static final String NAME = "master_input"; - - private InputSplitFetcher fetcher; - private MasterInputHandler handler; - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - this.fetcher = InputSourceFactory.createInputSplitFetcher(config); - this.handler = new MasterInputHandler(this.fetcher); - int vertexSplitSize = this.handler.createVertexInputSplits(); - int edgeSplitSize = this.handler.createEdgeInputSplits(); - LOG.info("Master create {} vertex splits, {} edge splits", - vertexSplitSize, edgeSplitSize); - } - - @Override - public void close(Config config) { - // Maybe fetcher=null if not successfully initialized - if (this.fetcher != null) { - this.fetcher.close(); - } - } - - public MasterInputHandler handler() { - E.checkNotNull(this.handler, "handler"); - return this.handler; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/VertexFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/VertexFetcher.java deleted file mode 100644 index f9dbd37b0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/VertexFetcher.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.structure.graph.Vertex; - -/** - * Streamed read the data of each input split, and return one HugeVertex object - * at each iteration - */ -public interface VertexFetcher extends ElementFetcher { - - void close(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/WorkerInputManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/WorkerInputManager.java deleted file mode 100644 index 1a3cd2c86..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/WorkerInputManager.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.function.Consumer; -import java.util.function.Supplier; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.worker.load.LoadService; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class WorkerInputManager implements Manager { - - private static final Logger LOG = Log.logger(WorkerInputManager.class); - private static final String PREFIX = "input-send-executor-%s"; - - public static final String NAME = "worker_input"; - - /* - * Fetch vertices and edges from the data source and convert them - * to computer-vertices and computer-edges - */ - private final LoadService loadService; - - private final ExecutorService sendExecutor; - private final int sendThreadNum; - - /* - * Send vertex/edge or message to target worker - */ - private final MessageSendManager sendManager; - - private final SnapshotManager snapshotManager; - - public WorkerInputManager(ComputerContext context, - MessageSendManager sendManager, - SnapshotManager snapshotManager) { - this.sendManager = sendManager; - this.snapshotManager = snapshotManager; - - this.sendThreadNum = this.inputSendThreadNum(context.config()); - this.sendExecutor = ExecutorUtil.newFixedThreadPool(this.sendThreadNum, PREFIX); - LOG.info("Created parallel sending thread pool, thread num: {}", - sendThreadNum); - - this.loadService = new LoadService(context); - } - - private Integer inputSendThreadNum(Config config) { - return config.get(ComputerOptions.INPUT_SEND_THREAD_NUMS); - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - this.loadService.init(); - this.sendManager.init(config); - } - - @Override - public void close(Config config) { - this.loadService.close(); - this.sendManager.close(config); - this.sendExecutor.shutdown(); - } - - public void service(InputSplitRpcService rpcService) { - this.loadService.rpcService(rpcService); - } - - /** - * When this method finish, it means that all vertices and edges are sent, - * but there is no guarantee that all of them has been received. - */ - public void loadGraph() { - if (this.snapshotManager.loadSnapshot()) { - this.snapshotManager.load(); - return; - } - - List> futures = new ArrayList<>(); - CompletableFuture future; - this.sendManager.startSend(MessageType.VERTEX); - for (int i = 0; i < this.sendThreadNum; i++) { - future = this.send(this.sendManager::sendVertex, - this.loadService::createIteratorFromVertex); - futures.add(future); - } - CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).exceptionally(e -> { - throw new ComputerException("An exception occurred during parallel " + - "sending vertices", e); - }).join(); - this.sendManager.finishSend(MessageType.VERTEX); - - this.sendManager.startSend(MessageType.EDGE); - futures.clear(); - for (int i = 0; i < this.sendThreadNum; i++) { - future = this.send(this.sendManager::sendEdge, - this.loadService::createIteratorFromEdge); - futures.add(future); - } - CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).exceptionally(e -> { - throw new ComputerException("An exception occurred during parallel " + - "sending edges", e); - }).join(); - this.sendManager.finishSend(MessageType.EDGE); - this.sendManager.clearBuffer(); - } - - private CompletableFuture send(Consumer sendConsumer, - Supplier> iteratorSupplier) { - return CompletableFuture.runAsync(() -> { - Iterator iterator = iteratorSupplier.get(); - while (iterator.hasNext()) { - Vertex vertex = iterator.next(); - sendConsumer.accept(vertex); - } - }, this.sendExecutor); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/DefaultInputFilter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/DefaultInputFilter.java deleted file mode 100644 index b0ad6496d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/DefaultInputFilter.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.filter; - -import org.apache.hugegraph.computer.core.input.InputFilter; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.graph.Vertex; - -public class DefaultInputFilter implements InputFilter { - - @Override - public Vertex filter(Vertex vertex) { - vertex.properties().clear(); - return vertex; - } - - @Override - public Edge filter(Edge edge) { - edge.properties().clear(); - return edge; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/ExtractAllPropertyInputFilter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/ExtractAllPropertyInputFilter.java deleted file mode 100644 index 201dd2bae..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/filter/ExtractAllPropertyInputFilter.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.filter; - -import org.apache.hugegraph.computer.core.input.InputFilter; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.graph.Vertex; - -public class ExtractAllPropertyInputFilter implements InputFilter { - - @Override - public Vertex filter(Vertex vertex) { - return vertex; - } - - @Override - public Edge filter(Edge edge) { - return edge; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeEdgeFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeEdgeFetcher.java deleted file mode 100644 index 2cb024f6a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeEdgeFetcher.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.hg; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.EdgeFetcher; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.graph.Shard; - -public class HugeEdgeFetcher extends HugeElementFetcher - implements EdgeFetcher { - - public HugeEdgeFetcher(Config config, HugeClient client) { - super(config, client); - } - - @Override - public Iterator fetch(InputSplit split) { - Shard shard = toShard(split); - return this.client().traverser().iteratorEdges(shard, this.pageSize()); - } - - @Override - public void close() { - // HugeClient was closed in HugeGraphFetcher - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeElementFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeElementFetcher.java deleted file mode 100644 index b14ed39ce..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeElementFetcher.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.hg; - -import java.util.Iterator; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.ElementFetcher; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.graph.Shard; - -public abstract class HugeElementFetcher implements ElementFetcher { - - private final Config config; - private final HugeClient client; - private Iterator localBatch; - private T next; - - public HugeElementFetcher(Config config, HugeClient client) { - this.config = config; - this.client = client; - } - - protected Config config() { - return this.config; - } - - protected HugeClient client() { - return this.client; - } - - protected int pageSize() { - return this.config.get(ComputerOptions.INPUT_SPLIT_PAGE_SIZE); - } - - @Override - public void prepareLoadInputSplit(InputSplit split) { - this.localBatch = this.fetch(split); - } - - @Override - public boolean hasNext() { - if (this.next != null) { - return true; - } - if (this.localBatch != null && this.localBatch.hasNext()) { - this.next = this.localBatch.next(); - return true; - } else { - this.localBatch = null; - return false; - } - } - - @Override - public T next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - T current = this.next; - this.next = null; - return current; - } - - public abstract Iterator fetch(InputSplit split); - - public static Shard toShard(InputSplit split) { - return new Shard(split.start(), split.end(), 0); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeGraphFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeGraphFetcher.java deleted file mode 100644 index 813fd007c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeGraphFetcher.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.hg; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.EdgeFetcher; -import org.apache.hugegraph.computer.core.input.GraphFetcher; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.VertexFetcher; -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.HugeClientBuilder; - -public class HugeGraphFetcher implements GraphFetcher { - - private final HugeClient client; - private final VertexFetcher vertexFetcher; - private final EdgeFetcher edgeFetcher; - private final InputSplitRpcService rpcService; - - public HugeGraphFetcher(Config config, InputSplitRpcService rpcService) { - String url = config.get(ComputerOptions.HUGEGRAPH_URL); - String graph = config.get(ComputerOptions.HUGEGRAPH_GRAPH_NAME); - String username = config.get(ComputerOptions.HUGEGRAPH_USERNAME); - String password = config.get(ComputerOptions.HUGEGRAPH_PASSWORD); - this.client = new HugeClientBuilder(url, graph).configUser(username, password).build(); - this.vertexFetcher = new HugeVertexFetcher(config, this.client); - this.edgeFetcher = new HugeEdgeFetcher(config, this.client); - this.rpcService = rpcService; - } - - @Override - public void close() { - this.client.close(); - } - - @Override - public VertexFetcher vertexFetcher() { - return this.vertexFetcher; - } - - @Override - public EdgeFetcher edgeFetcher() { - return this.edgeFetcher; - } - - @Override - public InputSplit nextVertexInputSplit() { - return this.rpcService.nextVertexInputSplit(); - } - - @Override - public InputSplit nextEdgeInputSplit() { - return this.rpcService.nextEdgeInputSplit(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeInputSplitFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeInputSplitFetcher.java deleted file mode 100644 index cd1654c93..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeInputSplitFetcher.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.hg; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.InputSplitFetcher; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.HugeClientBuilder; -import org.apache.hugegraph.structure.graph.Shard; -import org.apache.hugegraph.util.E; - -public class HugeInputSplitFetcher implements InputSplitFetcher { - - private final Config config; - private final HugeClient client; - - public HugeInputSplitFetcher(Config config) { - this.config = config; - String url = config.get(ComputerOptions.HUGEGRAPH_URL); - String graph = config.get(ComputerOptions.HUGEGRAPH_GRAPH_NAME); - String username = config.get(ComputerOptions.HUGEGRAPH_USERNAME); - String password = config.get(ComputerOptions.HUGEGRAPH_PASSWORD); - int timeout = config.get(ComputerOptions.INPUT_SPLIT_FETCH_TIMEOUT); - this.client = new HugeClientBuilder(url, graph).configUser(username, password) - .configTimeout(timeout) - .build(); - } - - @Override - public void close() { - this.client.close(); - } - - @Override - public List fetchVertexInputSplits() { - long splitSize = this.config.get(ComputerOptions.INPUT_SPLITS_SIZE); - int maxSplits = this.config.get(ComputerOptions.INPUT_MAX_SPLITS); - List shards = this.client.traverser().vertexShards(splitSize); - E.checkArgument(shards.size() <= maxSplits, - "Too many shards due to too small splitSize"); - List splits = new ArrayList<>(); - for (Shard shard : shards) { - InputSplit split = new InputSplit(shard.start(), shard.end()); - splits.add(split); - } - return splits; - } - - @Override - public List fetchEdgeInputSplits() { - long splitSize = this.config.get(ComputerOptions.INPUT_SPLITS_SIZE); - int maxSplits = this.config.get(ComputerOptions.INPUT_MAX_SPLITS); - List shards = this.client.traverser().edgeShards(splitSize); - E.checkArgument(shards.size() <= maxSplits, - "Too many shards due to too small splitSize"); - List splits = new ArrayList<>(); - for (Shard shard : shards) { - InputSplit split = new InputSplit(shard.start(), shard.end()); - splits.add(split); - } - return splits; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeVertexFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeVertexFetcher.java deleted file mode 100644 index cc6a65f9a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/hg/HugeVertexFetcher.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.hg; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.VertexFetcher; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.structure.graph.Shard; -import org.apache.hugegraph.structure.graph.Vertex; - -public class HugeVertexFetcher extends HugeElementFetcher - implements VertexFetcher { - - public HugeVertexFetcher(Config config, HugeClient client) { - super(config, client); - } - - @Override - public Iterator fetch(InputSplit split) { - Shard shard = toShard(split); - return this.client().traverser().iteratorVertices(shard, - this.pageSize()); - } - - @Override - public void close() { - // HugeClient was closed in HugeGraphFetcher - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileEdgeFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileEdgeFetcher.java deleted file mode 100644 index ce003b558..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileEdgeFetcher.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.loader; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.EdgeFetcher; -import org.apache.hugegraph.computer.core.input.IdUtil; -import org.apache.hugegraph.loader.builder.EdgeBuilder; -import org.apache.hugegraph.loader.builder.ElementBuilder; -import org.apache.hugegraph.loader.executor.LoadContext; -import org.apache.hugegraph.loader.mapping.EdgeMapping; -import org.apache.hugegraph.loader.mapping.InputStruct; -import org.apache.hugegraph.loader.reader.line.Line; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.schema.EdgeLabel; - -public class FileEdgeFetcher extends FileElementFetcher - implements EdgeFetcher { - - public FileEdgeFetcher(Config config) { - super(config); - } - - @Override - protected List> elementBuilders(LoadContext context, - InputStruct struct) { - List> builders = new ArrayList<>(); - for (EdgeMapping mapping : struct.edges()) { - if (mapping.skip()) { - continue; - } - builders.add(new EdgeBuilder(context, struct, mapping)); - } - return builders; - } - - @Override - protected List buildElement(Line line, ElementBuilder builder) { - List edges = super.buildElement(line, builder); - for (Edge edge : edges) { - // generate edgeId - EdgeLabel edgeLabel = (EdgeLabel) builder.schemaLabel(); - String edgeId = IdUtil.assignEdgeId(edge, edgeLabel); - edge.id(edgeId); - } - return edges; - } - - @Override - public void close() { - super.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileElementFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileElementFetcher.java deleted file mode 100644 index eaa87bfb5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileElementFetcher.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.loader; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.ElementFetcher; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.iterator.FlatMapperIterator; -import org.apache.hugegraph.loader.builder.ElementBuilder; -import org.apache.hugegraph.loader.builder.SchemaCache; -import org.apache.hugegraph.loader.constant.Constants; -import org.apache.hugegraph.loader.executor.ComputerLoadOptions; -import org.apache.hugegraph.loader.executor.LoadContext; -import org.apache.hugegraph.loader.mapping.InputStruct; -import org.apache.hugegraph.loader.reader.InputReader; -import org.apache.hugegraph.loader.reader.file.FileReader; -import org.apache.hugegraph.loader.reader.line.Line; -import org.apache.hugegraph.loader.source.file.FileSource; -import org.apache.hugegraph.loader.util.JsonUtil; -import org.apache.hugegraph.structure.GraphElement; - -public abstract class FileElementFetcher - implements ElementFetcher { - - private final LoadContext context; - private List> builders; - private InputReader inputReader; - private FlatMapperIterator localBatch; - private T next; - - public FileElementFetcher(Config config) { - String schemaPath = config.get( - ComputerOptions.INPUT_LOADER_SCHEMA_PATH); - SchemaCache schemaCache; - try { - String json = FileUtils.readFileToString(new File(schemaPath), - Constants.CHARSET); - schemaCache = JsonUtil.fromJson(json, SchemaCache.class); - } catch (IOException exception) { - throw new ComputerException("Failed to load schema from file, " + - "path:%s", schemaPath); - } - - ComputerLoadOptions options = new ComputerLoadOptions(schemaCache); - this.context = new LoadContext(options); - } - - @Override - public void prepareLoadInputSplit(InputSplit split) { - if (this.inputReader != null) { - this.inputReader.close(); - } - - FileInputSplit fileInputSplit = (FileInputSplit) split; - this.builders = this.elementBuilders(this.context, - fileInputSplit.struct()); - this.inputReader = this.createReader(fileInputSplit); - this.localBatch = new FlatMapperIterator<>(this.inputReader, line -> { - List allElements = new ArrayList<>(); - for (ElementBuilder builder : this.builders) { - List elements = this.buildElement(line, builder); - allElements.addAll(elements); - } - return allElements.iterator(); - }); - } - - @Override - public boolean hasNext() { - if (this.next != null) { - return true; - } - - if (this.localBatch != null && this.localBatch.hasNext()) { - this.next = this.localBatch.next(); - return true; - } - - this.localBatch = null; - return false; - } - - @Override - public T next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - T current = this.next; - this.next = null; - return current; - } - - private InputReader createReader(FileInputSplit split) { - InputStruct struct = split.struct(); - FileSource source = (FileSource) struct.input(); - source.path(split.path()); - FileReader reader = (FileReader) InputReader.create(struct.input()); - reader.init(this.context, struct); - return reader; - } - - protected List buildElement(Line line, ElementBuilder builder) { - return builder.build(line.names(), line.values()); - } - - protected abstract List> elementBuilders( - LoadContext context, - InputStruct struct); - - public void close() { - if (this.inputReader != null) { - this.inputReader.close(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileInputSplit.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileInputSplit.java deleted file mode 100644 index e5c02f296..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileInputSplit.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.loader; - - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.loader.constant.ElemType; -import org.apache.hugegraph.loader.mapping.InputStruct; - -import com.google.common.base.Objects; - -public class FileInputSplit extends InputSplit { - - private final ElemType type; - private final String path; - private final InputStruct struct; - - public FileInputSplit(ElemType type, InputStruct struct, String path) { - super(StringUtils.EMPTY, StringUtils.EMPTY); - this.type = type; - this.struct = struct; - this.path = path; - } - - public ElemType type() { - return this.type; - } - - public String path() { - return this.path; - } - - public InputStruct struct() { - return this.struct; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || this.getClass() != o.getClass()) { - return false; - } - if (!super.equals(o)) { - return false; - } - FileInputSplit other = (FileInputSplit) o; - return this.type == other.type && - Objects.equal(this.path, other.path) && - Objects.equal(this.struct, other.struct); - } - - @Override - public int hashCode() { - return Objects.hashCode(super.hashCode(), this.type, - this.path, this.struct); - } - - @Override - public String toString() { - return new ToStringBuilder(this).append("type", this.type) - .append("path", this.path) - .append("struct", this.struct) - .toString(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderFileInputSplitFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderFileInputSplitFetcher.java deleted file mode 100644 index 40e9bf5ab..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderFileInputSplitFetcher.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.loader; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.FileUtils; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileStatus; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.FileUtil; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.security.UserGroupInformation; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.InputSplitFetcher; -import org.apache.hugegraph.loader.constant.ElemType; -import org.apache.hugegraph.loader.exception.LoadException; -import org.apache.hugegraph.loader.mapping.InputStruct; -import org.apache.hugegraph.loader.mapping.LoadMapping; -import org.apache.hugegraph.loader.source.SourceType; -import org.apache.hugegraph.loader.source.file.FileFilter; -import org.apache.hugegraph.loader.source.file.FileSource; -import org.apache.hugegraph.loader.source.hdfs.HDFSSource; -import org.apache.hugegraph.loader.source.hdfs.KerberosConfig; - -public class LoaderFileInputSplitFetcher implements InputSplitFetcher { - - private final Config config; - private final List vertexInputStructs; - private final List edgeInputStructs; - - public LoaderFileInputSplitFetcher(Config config) { - this.config = config; - String inputStructFile = this.config.get( - ComputerOptions.INPUT_LOADER_STRUCT_PATH); - LoadMapping mapping = LoadMapping.of(inputStructFile); - this.vertexInputStructs = new ArrayList<>(); - this.edgeInputStructs = new ArrayList<>(); - this.splitStructs(mapping.structs()); - } - - @Override - public List fetchVertexInputSplits() { - List splits = new ArrayList<>(); - for (InputStruct vertexInputStruct : this.vertexInputStructs) { - FileSource source = (FileSource) vertexInputStruct.input(); - List paths = this.scanPaths(source); - if (CollectionUtils.isNotEmpty(paths)) { - for (String path : paths) { - FileInputSplit split = new FileInputSplit(ElemType.VERTEX, - vertexInputStruct, - path); - splits.add(split); - } - } - } - return splits; - } - - @Override - public List fetchEdgeInputSplits() { - List splits = new ArrayList<>(); - for (InputStruct edgeInputStruct : this.edgeInputStructs) { - FileSource source = (FileSource) edgeInputStruct.input(); - List paths = this.scanPaths(source); - if (CollectionUtils.isNotEmpty(paths)) { - for (String path : paths) { - FileInputSplit split = new FileInputSplit(ElemType.EDGE, - edgeInputStruct, - path); - splits.add(split); - } - } - } - return splits; - } - - private void splitStructs(List structs) { - for (InputStruct struct : structs) { - InputStruct result = struct.extractVertexStruct(); - if (result != InputStruct.EMPTY) { - this.vertexInputStructs.add(result); - } - } - for (InputStruct struct : structs) { - InputStruct result = struct.extractEdgeStruct(); - if (result != InputStruct.EMPTY) { - this.edgeInputStructs.add(result); - } - } - } - - private List scanPaths(FileSource source) { - if (source.type() == SourceType.HDFS) { - return this.scanHdfsPaths((HDFSSource) source); - } else { - return this.scanLocalPaths(source); - } - } - - private List scanLocalPaths(FileSource source) { - List paths = new ArrayList<>(); - File file = FileUtils.getFile(source.path()); - FileFilter filter = source.filter(); - if (file.isFile()) { - if (!filter.reserved(file.getName())) { - throw new LoadException( - "Please check file name and extensions, ensure " + - "that at least one file is available for reading"); - } - paths.add(file.getAbsolutePath()); - } else { - assert file.isDirectory(); - File[] subFiles = file.listFiles(); - if (subFiles == null) { - throw new LoadException("Error while listing the files of " + - "path '%s'", file); - } - for (File subFile : subFiles) { - if (filter.reserved(subFile.getName())) { - paths.add(subFile.getAbsolutePath()); - } - } - } - return paths; - } - - private List scanHdfsPaths(HDFSSource hdfsSource) { - List paths = new ArrayList<>(); - try { - Configuration configuration = this.loadConfiguration(hdfsSource); - this.enableKerberos(hdfsSource, configuration); - try (FileSystem hdfs = FileSystem.get(configuration)) { - Path path = new Path(hdfsSource.path()); - FileFilter filter = hdfsSource.filter(); - if (hdfs.getFileStatus(path).isFile()) { - if (!filter.reserved(path.getName())) { - throw new ComputerException( - "Please check path name and extensions, ensure " + - "that at least one path is available for reading"); - } - paths.add(path.toString()); - } else { - assert hdfs.getFileStatus(path).isDirectory(); - FileStatus[] statuses = hdfs.listStatus(path); - Path[] subPaths = FileUtil.stat2Paths(statuses); - for (Path subPath : subPaths) { - if (filter.reserved(subPath.getName())) { - paths.add(subPath.toString()); - } - } - } - } - } catch (Throwable throwable) { - throw new ComputerException("Failed to scanPaths", throwable); - } - return paths; - } - - private Configuration loadConfiguration(HDFSSource source) { - Configuration conf = new Configuration(); - conf.addResource(new Path(source.coreSitePath())); - if (source.hdfsSitePath() != null) { - conf.addResource(new Path(source.hdfsSitePath())); - } - return conf; - } - - private void enableKerberos(HDFSSource source, - Configuration conf) throws IOException { - KerberosConfig kerberosConfig = source.kerberosConfig(); - if (kerberosConfig != null && kerberosConfig.enable()) { - System.setProperty("java.security.krb5.conf", - kerberosConfig.krb5Conf()); - UserGroupInformation.setConfiguration(conf); - UserGroupInformation.loginUserFromKeytab(kerberosConfig.principal(), - kerberosConfig.keyTab()); - } - } - - @Override - public void close() { - // pass - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderGraphFetcher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderGraphFetcher.java deleted file mode 100644 index 310cdd8dc..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/LoaderGraphFetcher.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input.loader; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.input.EdgeFetcher; -import org.apache.hugegraph.computer.core.input.GraphFetcher; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.VertexFetcher; -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; - -public class LoaderGraphFetcher implements GraphFetcher { - - private final InputSplitRpcService rpcService; - private final VertexFetcher vertexFetcher; - private final EdgeFetcher edgeFetcher; - - public LoaderGraphFetcher(Config config, InputSplitRpcService rpcService) { - this.vertexFetcher = new FileVertxFetcher(config); - this.edgeFetcher = new FileEdgeFetcher(config); - this.rpcService = rpcService; - } - - @Override - public InputSplit nextVertexInputSplit() { - return this.rpcService.nextVertexInputSplit(); - } - - @Override - public InputSplit nextEdgeInputSplit() { - return this.rpcService.nextEdgeInputSplit(); - } - - @Override - public VertexFetcher vertexFetcher() { - return this.vertexFetcher; - } - - @Override - public EdgeFetcher edgeFetcher() { - return this.edgeFetcher; - } - - @Override - public void close() { - this.vertexFetcher.close(); - this.edgeFetcher.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileInput.java deleted file mode 100644 index 2c2775f18..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileInput.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.util.BytesUtil; -import org.apache.hugegraph.util.E; - -public abstract class AbstractBufferedFileInput extends UnsafeBytesInput { - - private final int bufferCapacity; - private final long fileLength; - - protected long fileOffset; - - public AbstractBufferedFileInput(int bufferCapacity, long fileLength) { - super(new byte[bufferCapacity], 0, 0); - - this.bufferCapacity = bufferCapacity; - this.fileLength = fileLength; - } - - @Override - public long position() { - return this.fileOffset - super.remaining(); - } - - @Override - public void readFully(byte[] b) throws IOException { - this.readFully(b, 0, b.length); - } - - @Override - public long skip(long bytesToSkip) throws IOException { - E.checkArgument(bytesToSkip >= 0, - "The parameter bytesToSkip must be >= 0, but got %s", - bytesToSkip); - E.checkArgument(this.available() >= bytesToSkip, - "Failed to skip '%s' bytes, because don't have " + - "enough data"); - - long positionBeforeSkip = this.position(); - this.seek(this.position() + bytesToSkip); - return positionBeforeSkip; - } - - @Override - protected void require(int size) throws IOException { - if (this.remaining() >= size) { - return; - } - if (this.bufferCapacity >= size) { - this.shiftAndFillBuffer(); - } - /* - * The buffer capacity must be >= 8, read primitive data like int, - * long, float, double can be read from buffer. Only read bytes may - * exceed the limit, and read bytes using readFully is overrode - * in this class. In conclusion, the required data can be - * supplied after shiftAndFillBuffer. - */ - if (size > this.limit()) { - throw new IOException(String.format( - "Reading %s bytes from position %s overflows " + - "buffer length %s", - size, this.position(), this.limit())); - } - } - - @Override - public long available() throws IOException { - return this.fileLength - this.position(); - } - - protected void shiftAndFillBuffer() throws IOException { - this.shiftBuffer(); - this.fillBuffer(); - } - - protected abstract void fillBuffer() throws IOException; - - @Override - public int compare(long offset, long length, RandomAccessInput other, - long otherOffset, long otherLength) throws IOException { - byte[] bytes1, bytes2; - int compareOffset1, compareOffset2; - - /* - * Set the compare information of the current object. - * Ture: The compare range of the current object is within the buffer. - */ - if (rangeInBuffer(this, offset, length)) { - bytes1 = this.buffer(); - compareOffset1 = (int) (offset - bufferStartPosition(this)); - } else { - long oldPosition = this.position(); - this.seek(offset); - bytes1 = this.readBytes((int) length); - compareOffset1 = 0; - this.seek(oldPosition); - } - - /* - * Set the compare information of the compared object. - * Ture: The compare range of the compared object is within the buffer - * and compared object instance of AbstractBufferedFileInput. - */ - AbstractBufferedFileInput otherInput; - if (other instanceof AbstractBufferedFileInput && - rangeInBuffer(otherInput = (AbstractBufferedFileInput) other, - otherOffset, otherLength)) { - bytes2 = otherInput.buffer(); - long otherBufferStart = bufferStartPosition(otherInput); - compareOffset2 = (int) (otherOffset - otherBufferStart); - } else { - long oldPosition = other.position(); - other.seek(otherOffset); - bytes2 = other.readBytes((int) otherLength); - compareOffset2 = 0; - other.seek(oldPosition); - } - - return BytesUtil.compare(bytes1, compareOffset1, (int) length, - bytes2, compareOffset2, (int) otherLength); - } - - private static long bufferStartPosition(AbstractBufferedFileInput input) { - return input.fileOffset - input.limit(); - } - - private static boolean rangeInBuffer(AbstractBufferedFileInput input, - long offset, long length) { - long bufferStart = bufferStartPosition(input); - return bufferStart <= offset && offset <= input.fileOffset && - input.limit() >= length; - } - - protected int bufferCapacity() { - return this.bufferCapacity; - } - - protected long fileLength() { - return this.fileLength; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileOutput.java deleted file mode 100644 index 04673133a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/AbstractBufferedFileOutput.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.util.E; - -public abstract class AbstractBufferedFileOutput extends UnsafeBytesOutput { - - private final int bufferCapacity; - - protected long fileOffset; - - public AbstractBufferedFileOutput(int bufferCapacity) { - super(bufferCapacity); - - this.bufferCapacity = bufferCapacity; - this.fileOffset = 0L; - } - - @Override - public void writeFixedInt(long position, int v) throws IOException { - if (this.fileOffset <= position && - position <= this.position() - Constants.INT_LEN) { - super.writeFixedInt(position - this.fileOffset, v); - return; - } - - long latestPosition = this.position(); - this.seek(position); - super.writeInt(v); - this.seek(latestPosition); - } - - @Override - public long position() { - return this.fileOffset + super.position(); - } - - @Override - public long skip(long bytesToSkip) throws IOException { - E.checkArgument(bytesToSkip >= 0, - "The parameter bytesToSkip must be >= 0, but got %s", - bytesToSkip); - long positionBeforeSkip = this.position(); - this.seek(positionBeforeSkip + bytesToSkip); - return positionBeforeSkip; - } - - @Override - protected void require(int size) throws IOException { - E.checkArgument(size <= this.bufferCapacity, - "The parameter size must be <= %s", - this.bufferCapacity); - if (size <= this.bufferAvailable()) { - return; - } - this.flushBuffer(); - /* - * The buffer capacity must be >= 8, write primitive data like int, - * long, float, double can be write to buffer after flush buffer. - * Only write bytes may exceed the limit, and write bytes using - * write(byte[] b) is overrode in this class. In conclusion, the - * required size can be supplied after flushBuffer. - */ - if (size > this.bufferAvailable()) { - throw new IOException(String.format( - "Write %s bytes to position %s overflows buffer %s", - size, this.position(), this.bufferCapacity)); - } - } - - protected int bufferSize() { - return (int) super.position(); - } - - protected int bufferAvailable() { - return this.bufferCapacity - (int) super.position(); - } - - protected int bufferCapacity() { - return this.bufferCapacity; - } - - protected abstract void flushBuffer() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileInput.java deleted file mode 100644 index 98d5763dc..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileInput.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.EOFException; -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.E; - -public class BufferedFileInput extends AbstractBufferedFileInput { - - private final int bufferCapacity; - private final RandomAccessFile file; - - public BufferedFileInput(File file) throws IOException { - this(new RandomAccessFile(file, Constants.FILE_MODE_READ), - Constants.BIG_BUF_SIZE); - } - - public BufferedFileInput(RandomAccessFile file, int bufferCapacity) - throws IOException { - super(bufferCapacity, file.length()); - E.checkArgument(bufferCapacity >= 8, - "The parameter bufferSize must be >= 8"); - this.file = file; - this.bufferCapacity = bufferCapacity; - this.fillBuffer(); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOException { - int remaining = super.remaining(); - if (len <= remaining) { - super.readFully(b, off, len); - } else if (len <= this.bufferCapacity) { - this.shiftAndFillBuffer(); - super.readFully(b, off, len); - } else { - super.readFully(b, off, remaining); - len -= remaining; - this.file.readFully(b, off + remaining, len); - this.fileOffset += len; - } - } - - @Override - public void seek(long position) throws IOException { - if (position == this.position()) { - return; - } - long bufferStart = this.fileOffset - this.limit(); - if (position >= bufferStart && position < this.fileOffset) { - super.seek(position - bufferStart); - return; - } - if (position > this.fileLength()) { - throw new EOFException(String.format( - "Can't seek to %s, reach the end of file", - position)); - } else { - this.file.seek(position); - super.seek(0L); - this.limit(0); - this.fileOffset = position; - this.fillBuffer(); - } - } - - @Override - public void close() throws IOException { - this.file.close(); - } - - @Override - protected void fillBuffer() throws IOException { - int readLen = (int) Math.min(this.bufferCapacity - this.limit(), - this.fileLength() - this.fileOffset); - this.fileOffset += readLen; - this.file.readFully(this.buffer(), this.limit(), readLen); - this.limit(this.limit() + readLen); - } - - @Override - public BufferedFileInput duplicate() throws IOException { - String path = Whitebox.getInternalState(this.file, "path"); - BufferedFileInput input = new BufferedFileInput(new File(path)); - input.seek(this.position()); - return input; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileOutput.java deleted file mode 100644 index 3136c3d40..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileOutput.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.util.E; - -/** - * This class acted as new DataOutputStream(new BufferedOutputStream(new File - * (file))). It has two functions. The first is buffer the content until the - * buffer is full. The second is unsafe data output. - * This class is not thread safe. - */ -public class BufferedFileOutput extends AbstractBufferedFileOutput { - - private final int bufferCapacity; - private final RandomAccessFile file; - - public BufferedFileOutput(File file) throws IOException { - this(new RandomAccessFile(file, Constants.FILE_MODE_WRITE), - Constants.BIG_BUF_SIZE); - } - - public BufferedFileOutput(RandomAccessFile file, int bufferCapacity) { - super(bufferCapacity); - E.checkArgument(bufferCapacity >= 8, - "The parameter bufferSize must be >= 8"); - this.bufferCapacity = bufferCapacity; - this.file = file; - } - - @Override - public void write(byte[] b) throws IOException { - this.write(b, 0, b.length); - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - if (len <= this.bufferAvailable()) { - super.write(b, off, len); - return; - } - this.flushBuffer(); - if (len <= this.bufferCapacity) { - super.write(b, off, len); - } else { - // The len > buffer size, write out directly - this.file.write(b, off, len); - this.fileOffset += len; - } - } - - @Override - public void seek(long position) throws IOException { - if (this.fileOffset <= position && position <= this.position()) { - super.seek(position - this.fileOffset); - return; - } - this.flushBuffer(); - this.file.seek(position); - this.fileOffset = position; - } - - @Override - protected void flushBuffer() throws IOException { - int bufferSize = super.bufferSize(); - if (bufferSize == 0) { - return; - } - this.file.write(this.buffer(), 0, bufferSize); - this.fileOffset += bufferSize; - super.seek(0); - } - - @Override - public void close() throws IOException { - this.flushBuffer(); - this.file.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamInput.java deleted file mode 100644 index e4382d955..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamInput.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.io.InputStream; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.util.E; - -public class BufferedStreamInput extends UnsafeBytesInput { - - private final int bufferCapacity; - private final InputStream input; - private long inputOffset; - - public BufferedStreamInput(InputStream input) throws IOException { - this(input, Constants.BIG_BUF_SIZE); - } - - public BufferedStreamInput(InputStream input, int bufferCapacity) - throws IOException { - super(new byte[bufferCapacity], 0); - E.checkArgument(bufferCapacity >= 8, - "The parameter bufferSize must be >= 8"); - this.input = input; - this.bufferCapacity = bufferCapacity; - this.shiftAndFillBuffer(); - } - - @Override - public long position() { - return this.inputOffset - super.remaining(); - } - - @Override - public void readFully(byte[] b) throws IOException { - this.readFully(b, 0, b.length); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOException { - if (len <= super.remaining()) { - super.readFully(b, off, len); - } else if (len <= this.bufferCapacity) { - this.shiftAndFillBuffer(); - super.readFully(b, off, len); - } else { - int remaining = super.remaining(); - super.readFully(b, off, remaining); - int expectedLen = len - remaining; - while (expectedLen > 0) { - int readLen = this.input.read(b, off + remaining, expectedLen); - if (readLen == -1) { - throw new IOException("There is no enough data in input " + - "stream"); - } - expectedLen -= readLen; - } - this.inputOffset += len; - } - } - - @Override - public void seek(long position) throws IOException { - long bufferStart = this.inputOffset - this.limit(); - if (position >= bufferStart && position < this.inputOffset) { - super.seek(position - bufferStart); - return; - } - /* - * The reason for seeking beyond the current buffer location is that - * the user may need to skip unread data and know the offset of the - * required data. - */ - if (position >= this.inputOffset) { - int skipLen = (int) (position - this.inputOffset); - this.inputOffset += skipLen; - byte[] buffer = this.buffer(); - while (skipLen > 0) { - int expectLen = Math.min(skipLen, this.bufferCapacity); - int readLen = this.input.read(buffer, 0, expectLen); - if (readLen == -1) { - throw new IOException(String.format( - "Can't seek at position %s, reach the end of " + - "input stream", - position)); - } - skipLen -= expectLen; - } - super.seek(0); - super.limit(0); - this.fillBuffer(); - } else { - throw new IOException(String.format( - "The seek position %s underflows the start position " + - "%s of the buffer", - position, this.inputOffset - this.limit())); - } - } - - @Override - public long skip(long bytesToSkip) throws IOException { - E.checkArgument(bytesToSkip >= 0L, - "The parameter bytesToSkip must be >= 0, but got %s", - bytesToSkip); - long positionBeforeSkip = this.position(); - if (bytesToSkip <= this.remaining()) { - super.skip(bytesToSkip); - return positionBeforeSkip; - } else { - bytesToSkip -= this.remaining(); - long position = this.inputOffset + bytesToSkip; - this.seek(position); - return positionBeforeSkip; - } - } - - @Override - public void close() throws IOException { - this.input.close(); - } - - @Override - protected void require(int size) throws IOException { - if (this.remaining() >= size) { - return; - } - this.shiftAndFillBuffer(); - /* - * The buffer capacity must be >= 8, read primitive data like int, - * long, float, double can be read from buffer. Only read bytes may - * exceed the limit, and read bytes using readFully is overrode - * in this class. In conclusion, the required data can be - * supplied after shiftAndFillBuffer. - */ - if (size > this.limit()) { - throw new IOException(String.format( - "Read %s bytes from position %s overflows buffer %s", - size, this.position(), this.limit())); - } - } - - /** - * The stream has no limit. - */ - @Override - public long available() throws IOException { - return Long.MAX_VALUE; - } - - private void shiftAndFillBuffer() throws IOException { - this.shiftBuffer(); - this.fillBuffer(); - } - - private void fillBuffer() throws IOException { - int expectLen = this.bufferCapacity - this.limit(); - int readLen = this.input.read(this.buffer(), this.limit(), expectLen); - if (readLen > 0) { - this.limit(this.limit() + readLen); - this.inputOffset += readLen; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamOutput.java deleted file mode 100644 index f2f7598ed..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamOutput.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.io.OutputStream; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.util.E; - -/** - * This is used to buffer and output the buffer to output stream when buffer - * is full. - */ -public class BufferedStreamOutput extends UnsafeBytesOutput { - - private final int bufferCapacity; - private final OutputStream output; - private long outputOffset; - - public BufferedStreamOutput(OutputStream output) { - this(output, Constants.BIG_BUF_SIZE); - } - - public BufferedStreamOutput(OutputStream output, int bufferCapacity) { - super(bufferCapacity); - E.checkArgument(bufferCapacity >= 8, - "The parameter bufferSize must be >= 8"); - this.bufferCapacity = bufferCapacity; - this.output = output; - this.outputOffset = 0L; - } - - @Override - public void write(byte[] b) throws IOException { - this.write(b, 0, b.length); - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - if (this.bufferAvailable() >= len) { - super.write(b, off, len); - return; - } - this.flushBuffer(); - if (this.bufferCapacity >= len) { - super.write(b, off, len); - } else { - // The len > the buffer size, write out directly - this.output.write(b, off, len); - this.outputOffset += len; - } - } - - @Override - public long position() { - return this.outputOffset + super.position(); - } - - /** - * The valid range of position is [the output position correspond to buffer - * start, the output position correspond to the current position], it - * can't seek to the position before the buffer or after - * the current position. - */ - @Override - public void seek(long position) throws IOException { - /* - * It can seek the end of buffer. If the buffer size is 128, you can - * seek the position 128, the buffer will be write out while write data. - */ - if (this.outputOffset <= position && - position <= this.position()) { - super.seek(position - this.outputOffset); - } else { - throw new IOException(String.format( - "The position %s is out of range [%s, %s]", - position, this.outputOffset, - this.position())); - } - } - - @Override - public long skip(long bytesToSkip) throws IOException { - E.checkArgument(bytesToSkip >= 0L, - "The parameter bytesToSkip must be >= 0, but got %s", - bytesToSkip); - long positionBeforeSkip = this.outputOffset + super.position(); - if (this.bufferAvailable() >= bytesToSkip) { - super.skip(bytesToSkip); - return positionBeforeSkip; - } - - this.flushBuffer(); - if (bytesToSkip <= this.bufferCapacity) { - super.skip(bytesToSkip); - } else { - this.outputOffset += bytesToSkip; - byte[] buffer = super.buffer(); - int writeSize = (int) bytesToSkip; - while (writeSize > 0) { - int len = Math.min(buffer.length, writeSize); - this.output.write(buffer, 0, len); - writeSize -= len; - } - } - return positionBeforeSkip; - } - - /** - * The valid range of position is [the output position correspond to buffer - * start, the output position correspond to - * the current position - Constants.INT_LEN], it can't write data to the - * position before the buffer or after - * the current position. - */ - @Override - public void writeFixedInt(long position, int v) throws IOException { - if (position >= this.outputOffset && - position <= this.position() - Constants.INT_LEN) { - super.writeFixedInt(position - this.outputOffset, v); - } else if (position < this.outputOffset) { - throw new IOException(String.format( - "Write int to position %s underflows the " + - "start position %s of the buffer", - position, this.outputOffset)); - } else { - throw new IOException(String.format( - "Write int to position %s overflows the write " + - "position %s", position, this.position())); - } - } - - @Override - protected void require(int size) throws IOException { - E.checkArgument(size <= this.bufferCapacity, - "The parameter size must be <= %s", - this.bufferCapacity); - if (this.bufferAvailable() >= size) { - return; - } - this.flushBuffer(); - /* - * The buffer capacity must be >= 8, write primitive data like int, - * long, float, double can be write to buffer after flush buffer. - * Only write bytes may exceed the limit, and write bytes using - * write(byte[] b) is overrode in this class. In conclusion, the - * required size can be supplied after flushBuffer. - */ - if (size > this.bufferAvailable()) { - throw new IOException(String.format( - "Write %s bytes to position %s overflows buffer %s", - size, this.position(), this.bufferCapacity)); - } - } - - @Override - public void close() throws IOException { - this.flushBuffer(); - this.output.close(); - } - - private void flushBuffer() throws IOException { - int bufferPosition = (int) super.position(); - if (bufferPosition == 0) { - return; - } - this.output.write(this.buffer(), 0, bufferPosition); - this.outputOffset += bufferPosition; - super.seek(0); - } - - private final int bufferAvailable() { - return this.bufferCapacity - (int) super.position(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutput.java deleted file mode 100644 index 9863dec9f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutput.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public class CsvStructGraphOutput extends StructGraphOutput { - - public CsvStructGraphOutput(ComputerContext context, - StructRandomAccessOutput out) { - super(context, out); - } - - @Override - public void writeVertex(Vertex vertex) throws IOException { - this.writeLineStart(); - - this.writeId(vertex.id()); - this.writeSplitter(); - - this.writeValue(vertex.value()); - - if (this.config.outputVertexAdjacentEdges()) { - this.writeSplitter(); - this.writeEdges(vertex.edges()); - } - if (this.config.outputVertexProperties()) { - this.writeSplitter(); - this.writeProperties(vertex.properties()); - } - this.writeLineEnd(); - } - - @Override - public void writeEdges(Edges edges) throws IOException { - this.writeArrayStart(); - int size = edges.size(); - int i = 0; - for (Edge edge : edges) { - this.writeEdge(edge); - if (++i < size) { - this.writeSplitter(); - } - } - this.writeArrayEnd(); - } - - @Override - public void writeEdge(Edge edge) throws IOException { - this.writeObjectStart(); - - this.writeId(edge.targetId()); - this.writeSplitter(); - - this.out.writeString(edge.label()); - this.writeSplitter(); - - this.out.writeString(edge.name()); - - if (this.config.outputEdgeProperties()) { - this.writeSplitter(); - this.writeProperties(edge.properties()); - } - this.writeObjectEnd(); - } - - @Override - public void writeProperties(Properties properties) throws IOException { - this.writeObjectStart(); - int size = properties.get().size(); - int i = 0; - for (Map.Entry entry : properties.get().entrySet()) { - this.writeValue(entry.getValue()); - if (++i < size) { - this.writeSplitter(); - } - } - this.writeObjectEnd(); - } - - @Override - public void writeObjectStart() throws IOException { - this.out.writeRawString("{"); - } - - @Override - public void writeObjectEnd() throws IOException { - this.out.writeRawString("}"); - } - - @Override - public void writeArrayStart() throws IOException { - this.out.writeRawString("["); - } - - @Override - public void writeArrayEnd() throws IOException { - this.out.writeRawString("]"); - } - - @Override - public void writeKey(String key) throws IOException { - // pass - } - - @Override - public void writeJoiner() throws IOException { - // pass - } - - @Override - public void writeSplitter() throws IOException { - this.out.writeRawString(","); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/IOFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/IOFactory.java deleted file mode 100644 index 6c50cac49..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/IOFactory.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; - -public final class IOFactory { - - public static BytesOutput createBytesOutput(int size) { - return new OptimizedBytesOutput(size); - } - - public static BytesInput createBytesInput(byte[] buffer) { - return new OptimizedBytesInput(buffer); - } - - public static BytesInput createBytesInput(byte[] buffer, int limit) { - return new OptimizedBytesInput(buffer, limit); - } - - public static BytesInput createBytesInput(byte[] buffer, int position, - int limit) { - return new OptimizedBytesInput(buffer, position, limit); - } - - public static RandomAccessOutput createFileOutput(File file) - throws IOException { - return new OptimizedBytesOutput(new BufferedFileOutput(file)); - } - - public static RandomAccessInput createFileInput(File file) - throws IOException { - return new OptimizedBytesInput(new BufferedFileInput(file)); - } - - public static RandomAccessOutput createStreamOutput(OutputStream stream) - throws IOException { - return new OptimizedBytesOutput(new BufferedStreamOutput(stream)); - } - - public static RandomAccessInput createStreamInput(InputStream stream) - throws IOException { - return new OptimizedBytesInput(new BufferedStreamInput(stream)); - } - - public static GraphOutput createGraphOutput(ComputerContext context, - OutputFormat format, - RandomAccessOutput out) { - switch (format) { - case BIN: - EntryOutput entryOutput = new EntryOutputImpl(out); - return new StreamGraphOutput(context, entryOutput); - case CSV: - StructRandomAccessOutput srao; - srao = new StructRandomAccessOutput(out); - return new CsvStructGraphOutput(context, srao); - case JSON: - srao = new StructRandomAccessOutput(out); - return new JsonStructGraphOutput(context, srao); - default: - throw new ComputerException("Can't create GraphOutput for %s", - format); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutput.java deleted file mode 100644 index db1722ac1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutput.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public class JsonStructGraphOutput extends StructGraphOutput { - - private final String valueName; - private final boolean outputEdges; - private final boolean outputVertexProperties; - private final boolean outputEdgeProperties; - - public JsonStructGraphOutput(ComputerContext context, - StructRandomAccessOutput out) { - super(context, out); - this.valueName = this.config.get(ComputerOptions.OUTPUT_RESULT_NAME); - this.outputEdges = this.config.outputVertexAdjacentEdges(); - this.outputVertexProperties = this.config.outputVertexProperties(); - this.outputEdgeProperties = this.config.outputEdgeProperties(); - } - - @Override - public void writeVertex(Vertex vertex) throws IOException { - this.writeLineStart(); - this.writeObjectStart(); - - this.writeKey("id"); - this.writeJoiner(); - this.writeId(vertex.id()); - this.writeSplitter(); - - this.writeKey(this.valueName); - this.writeJoiner(); - this.writeValue(vertex.value()); - - if (this.outputEdges) { - this.writeSplitter(); - this.writeKey("adjacent_edges"); - this.writeJoiner(); - this.writeEdges(vertex.edges()); - } - if (this.outputVertexProperties) { - this.writeSplitter(); - this.writeKey("properties"); - this.writeJoiner(); - this.writeProperties(vertex.properties()); - } - this.writeObjectEnd(); - this.writeLineEnd(); - } - - @Override - public void writeEdges(Edges edges) throws IOException { - this.writeArrayStart(); - int size = edges.size(); - int i = 0; - for (Edge edge : edges) { - this.writeEdge(edge); - if (++i < size) { - this.writeSplitter(); - } - } - this.writeArrayEnd(); - } - - @Override - public void writeEdge(Edge edge) throws IOException { - this.writeObjectStart(); - - this.writeKey("target_id"); - this.writeJoiner(); - this.writeId(edge.targetId()); - this.writeSplitter(); - - this.writeKey("label"); - this.writeJoiner(); - this.out.writeString(edge.label()); - this.writeSplitter(); - - this.writeKey("name"); - this.writeJoiner(); - this.out.writeString(edge.name()); - - if (this.outputEdgeProperties) { - this.writeSplitter(); - this.writeKey("properties"); - this.writeJoiner(); - this.writeProperties(edge.properties()); - } - this.writeObjectEnd(); - } - - @Override - public void writeProperties(Properties properties) throws IOException { - this.writeObjectStart(); - int size = properties.get().size(); - int i = 0; - for (Map.Entry entry : properties.get().entrySet()) { - this.writeKey(entry.getKey()); - this.writeJoiner(); - this.writeValue(entry.getValue()); - if (++i < size) { - this.writeSplitter(); - } - } - this.writeObjectEnd(); - } - - @Override - public void writeObjectStart() throws IOException { - this.out.writeRawString("{"); - } - - @Override - public void writeObjectEnd() throws IOException { - this.out.writeRawString("}"); - } - - @Override - public void writeArrayStart() throws IOException { - this.out.writeRawString("["); - } - - @Override - public void writeArrayEnd() throws IOException { - this.out.writeRawString("]"); - } - - @Override - public void writeKey(String key) throws IOException { - this.out.writeString(key); - } - - @Override - public void writeJoiner() throws IOException { - this.out.writeRawString(":"); - } - - @Override - public void writeSplitter() throws IOException { - this.out.writeRawString(","); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesInput.java deleted file mode 100644 index 17f03828d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesInput.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.util.CoderUtil; -import org.apache.hugegraph.util.Bytes; -import org.apache.hugegraph.util.E; - -public class OptimizedBytesInput implements BytesInput { - - private final UnsafeBytesInput in; - - public OptimizedBytesInput(byte[] buffer) { - this(buffer, buffer.length); - } - - public OptimizedBytesInput(byte[] buffer, int limit) { - this(buffer, 0, limit); - } - - public OptimizedBytesInput(byte[] buffer, int position, int limit) { - this(new UnsafeBytesInput(buffer, position, limit)); - } - - public OptimizedBytesInput(UnsafeBytesInput in) { - this.in = in; - } - - @Override - public long position() { - return this.in.position(); - } - - @Override - public void seek(long position) throws IOException { - this.in.seek(position); - } - - @Override - public long skip(long n) throws IOException { - return this.in.skip(n); - } - - @Override - public long available() throws IOException { - return this.in.available(); - } - - @Override - public OptimizedBytesInput duplicate() throws IOException { - return new OptimizedBytesInput(this.in.duplicate()); - } - - @Override - public int compare(long offset, long length, RandomAccessInput other, - long otherOffset, long otherLength) throws IOException { - return this.in.compare(offset, length, other, otherOffset, otherLength); - } - - @Override - public void close() throws IOException { - this.in.close(); - } - - @Override - public void readFully(byte[] b) throws IOException { - this.in.readFully(b); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOException { - this.in.readFully(b, off, len); - } - - @Override - public int skipBytes(int n) throws IOException { - return this.in.skipBytes(n); - } - - @Override - public boolean readBoolean() throws IOException { - return this.in.readBoolean(); - } - - @Override - public byte readByte() throws IOException { - return this.in.readByte(); - } - - @Override - public int readUnsignedByte() throws IOException { - return this.in.readUnsignedByte(); - } - - @Override - public short readShort() throws IOException { - return this.in.readShort(); - } - - @Override - public int readUnsignedShort() throws IOException { - return this.in.readUnsignedShort(); - } - - @Override - public char readChar() throws IOException { - return this.in.readChar(); - } - - @Override - public int readInt() throws IOException { - return this.readVInt(); - } - - @Override - public long readLong() throws IOException { - return this.readVLong(); - } - - @Override - public float readFloat() throws IOException { - return this.in.readFloat(); - } - - @Override - public double readDouble() throws IOException { - return this.in.readDouble(); - } - - @Override - public String readLine() throws IOException { - return this.in.readLine(); - } - - @Override - public String readUTF() throws IOException { - return this.readString(); - } - - @Override - public int readFixedInt() throws IOException { - return this.in.readFixedInt(); - } - - private int readVInt() throws IOException { - byte leading = this.readByte(); - E.checkArgument(leading != 0x80, - "Unexpected varint with leading byte '0x%s'", - Bytes.toHex(leading)); - int value = leading & 0x7f; - if (leading >= 0) { - assert (leading & 0x80) == 0; - return value; - } - - int i = 1; - for (; i < 5; i++) { - byte b = this.readByte(); - if (b >= 0) { - value = b | (value << 7); - break; - } else { - value = (b & 0x7f) | (value << 7); - } - } - - E.checkArgument(i < 5, - "Unexpected varint %s with too many bytes(%s)", - value, i + 1); - E.checkArgument(i < 4 || (leading & 0x70) == 0, - "Unexpected varint %s with leading byte '0x%s'", - value, Bytes.toHex(leading)); - return value; - } - - private long readVLong() throws IOException { - byte leading = this.readByte(); - E.checkArgument(leading != 0x80, - "Unexpected varlong with leading byte '0x%s'", - Bytes.toHex(leading)); - long value = leading & 0x7fL; - if (leading >= 0) { - assert (leading & 0x80) == 0; - return value; - } - - int i = 1; - for (; i < 10; i++) { - byte b = this.readByte(); - if (b >= 0) { - value = b | (value << 7); - break; - } else { - value = (b & 0x7f) | (value << 7); - } - } - - E.checkArgument(i < 10, - "Unexpected varlong %s with too many bytes(%s)", - value, i + 1); - E.checkArgument(i < 9 || (leading & 0x7e) == 0, - "Unexpected varlong %s with leading byte '0x%s'", - value, Bytes.toHex(leading)); - return value; - } - - private String readString() throws IOException { - return CoderUtil.decode(this.readBytes()); - } - - private byte[] readBytes() throws IOException { - int length = this.readVInt(); - assert length >= 0; - byte[] bytes = new byte[length]; - this.readFully(bytes, 0, length); - return bytes; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesOutput.java deleted file mode 100644 index f08d731ae..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesOutput.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.util.CoderUtil; -import org.apache.hugegraph.util.E; - -public class OptimizedBytesOutput implements BytesOutput { - - private final UnsafeBytesOutput out; - - public OptimizedBytesOutput(int size) { - this(new UnsafeBytesOutput(size)); - } - - public OptimizedBytesOutput(UnsafeBytesOutput out) { - this.out = out; - } - - @Override - public void write(int b) throws IOException { - this.out.write(b); - } - - @Override - public void write(byte[] b) throws IOException { - this.out.write(b); - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - this.out.write(b, off, len); - } - - @Override - public void writeBoolean(boolean v) throws IOException { - this.out.writeBoolean(v); - } - - @Override - public void writeByte(int v) throws IOException { - this.out.writeByte(v); - } - - @Override - public void writeShort(int v) throws IOException { - this.out.writeShort(v); - } - - @Override - public void writeChar(int v) throws IOException { - this.out.writeChar(v); - } - - @Override - public void writeInt(int v) throws IOException { - this.writeVInt(v); - } - - @Override - public void writeLong(long v) throws IOException { - this.writeVLong(v); - } - - @Override - public void writeFloat(float v) throws IOException { - this.out.writeFloat(v); - } - - @Override - public void writeDouble(double v) throws IOException { - this.out.writeDouble(v); - } - - @Override - public void writeBytes(String s) throws IOException { - this.out.writeBytes(s); - } - - @Override - public void writeChars(String s) throws IOException { - this.out.writeChars(s); - } - - @Override - public void writeUTF(String s) throws IOException { - this.writeString(s); - } - - @Override - public long position() { - return this.out.position(); - } - - @Override - public void seek(long position) throws IOException { - this.out.seek(position); - } - - @Override - public long skip(long n) throws IOException { - return this.out.skip(n); - } - - @Override - public void write(RandomAccessInput input, long offset, long length) - throws IOException { - this.out.write(input, offset, length); - } - - @Override - public void close() throws IOException { - this.out.close(); - } - - @Override - public void writeFixedInt(int v) throws IOException { - this.out.writeFixedInt(v); - } - - @Override - public void writeFixedInt(long position, int v) throws IOException { - this.out.writeFixedInt(position, v); - } - - @Override - public byte[] buffer() { - return this.out.buffer(); - } - - @Override - public byte[] toByteArray() { - return this.out.toByteArray(); - } - - private void writeVInt(int value) throws IOException { - // NOTE: negative numbers are not compressed - if (value > 0x0fffffff || value < 0) { - this.writeByte(0x80 | ((value >>> 28) & 0x7f)); - } - if (value > 0x1fffff || value < 0) { - this.writeByte(0x80 | ((value >>> 21) & 0x7f)); - } - if (value > 0x3fff || value < 0) { - this.writeByte(0x80 | ((value >>> 14) & 0x7f)); - } - if (value > 0x7f || value < 0) { - this.writeByte(0x80 | ((value >>> 7) & 0x7f)); - } - this.writeByte(value & 0x7f); - } - - private void writeVLong(long value) throws IOException { - if (value < 0) { - this.writeByte((byte) 0x81); - } - if (value > 0xffffffffffffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 56) & 0x7f)); - } - if (value > 0x1ffffffffffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 49) & 0x7f)); - } - if (value > 0x3ffffffffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 42) & 0x7f)); - } - if (value > 0x7ffffffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 35) & 0x7f)); - } - if (value > 0xfffffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 28) & 0x7f)); - } - if (value > 0x1fffffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 21) & 0x7f)); - } - if (value > 0x3fffL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 14) & 0x7f)); - } - if (value > 0x7fL || value < 0L) { - this.writeByte(0x80 | ((int) (value >>> 7) & 0x7f)); - } - this.write((int) value & 0x7f); - } - - private void writeString(String val) throws IOException { - this.writeBytes(CoderUtil.encode(val)); - } - - private void writeBytes(byte[] bytes) throws IOException { - E.checkArgument(bytes.length <= Constants.UINT16_MAX, - "The max length of bytes is %s, but got %s", - Constants.UINT16_MAX, bytes.length); - this.writeVInt(bytes.length); - this.write(bytes); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OutputFormat.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OutputFormat.java deleted file mode 100644 index 1e57c7da2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OutputFormat.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -public enum OutputFormat { - - BIN, - - CSV, - - JSON; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphInput.java deleted file mode 100644 index 7cd04d180..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphInput.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.commons.lang3.tuple.MutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.store.entry.EntryInput; -import org.apache.hugegraph.computer.core.store.entry.KvEntryReader; - -public class StreamGraphInput implements GraphComputeInput { - - private final GraphFactory graphFactory; - private final Config config; - private final EdgeFrequency frequency; - private final EntryInput in; - - public StreamGraphInput(ComputerContext context, EntryInput in) { - this.graphFactory = context.graphFactory(); - this.config = context.config(); - this.frequency = context.config().get(ComputerOptions.INPUT_EDGE_FREQ); - this.in = in; - } - - @Override - public Vertex readVertex() throws IOException { - Vertex vertex = this.graphFactory.createVertex(); - this.in.readEntry(in -> { - vertex.id(readId(in)); - }, in -> { - vertex.label(readLabel(in)); - vertex.properties(readProperties(in)); - }); - return vertex; - } - - @Override - public Vertex readEdges() throws IOException { - Vertex vertex = this.graphFactory.createVertex(); - KvEntryReader reader = this.in.readEntry(in -> { - // Read id - vertex.id(readId(in)); - }); - if (this.frequency == EdgeFrequency.SINGLE) { - while (reader.hasRemaining()) { - Edge edge = this.graphFactory.createEdge(); - // Only use targetId as subKey, use properties as subValue - reader.readSubKv(in -> { - edge.targetId(readId(in)); - }, in -> { - edge.properties(readProperties(in)); - }); - vertex.addEdge(edge); - } - } else if (this.frequency == EdgeFrequency.SINGLE_PER_LABEL) { - while (reader.hasRemaining()) { - Edge edge = this.graphFactory.createEdge(); - // Use label + targetId as subKey, use properties as subValue - reader.readSubKv(in -> { - edge.label(readLabel(in)); - edge.targetId(readId(in)); - }, in -> { - edge.properties(readProperties(in)); - }); - vertex.addEdge(edge); - } - } else { - assert this.frequency == EdgeFrequency.MULTIPLE; - while (reader.hasRemaining()) { - Edge edge = this.graphFactory.createEdge(); - /* - * Use label + sortValues + targetId as subKey, - * use properties as subValue - */ - reader.readSubKv(in -> { - edge.label(readLabel(in)); - edge.name(readLabel(in)); - edge.targetId(readId(in)); - }, in -> { - edge.properties(this.readProperties(in)); - }); - vertex.addEdge(edge); - } - } - return vertex; - } - - @Override - public Pair readMessage() throws IOException { - MutablePair pair = MutablePair.of(null, null); - this.in.readEntry(in -> { - // Read id - pair.setLeft(readId(in)); - }, in -> { - pair.setRight(this.readMessage(in)); - }); - return pair; - } - - private Value readMessage(RandomAccessInput in) throws IOException { - Value value = this.config.createObject( - ComputerOptions.ALGORITHM_MESSAGE_CLASS); - value.read(in); - return value; - } - - @Override - public Value readValue(RandomAccessInput in) throws IOException { - byte code = in.readByte(); - Value value = this.graphFactory.createValue(code); - value.read(in); - return value; - } - - private Properties readProperties(RandomAccessInput in) throws IOException { - Properties properties = this.graphFactory.createProperties(); - int size = in.readInt(); - for (int i = 0; i < size; i++) { - String key = in.readUTF(); - Value value = this.readValue(in); - properties.put(key, value); - } - return properties; - } - - public static Id readId(RandomAccessInput in) throws IOException { - Id id = new BytesId(); - id.read(in); - return id; - } - - public static String readLabel(RandomAccessInput in) throws IOException { - return in.readUTF(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutput.java deleted file mode 100644 index 0ca08e02c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutput.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntryWriter; - -public class StreamGraphOutput implements GraphComputeOutput { - - private final EntryOutput out; - private final EdgeFrequency frequency; - - public StreamGraphOutput(ComputerContext context, EntryOutput out) { - this.out = out; - this.frequency = context.config().get(ComputerOptions.INPUT_EDGE_FREQ); - } - - @Override - public void writeVertex(Vertex vertex) throws IOException { - this.out.writeEntry(out -> { - // Write id - this.writeId(out, vertex.id()); - }, out -> { - // Write label - this.writeLabel(out, vertex.label()); - // Write properties - this.writeProperties(out, vertex.properties()); - }); - } - - @Override - public void writeEdges(Vertex vertex) throws IOException { - KvEntryWriter writer = this.out.writeEntry(out -> { - // Write id - this.writeId(out, vertex.id()); - }); - if (this.frequency == EdgeFrequency.SINGLE) { - for (Edge edge : vertex.edges()) { - // Only use targetId as subKey, use properties as subValue - writer.writeSubKv(out -> { - this.writeId(out, edge.targetId()); - }, out -> { - this.writeProperties(out, edge.properties()); - }); - } - } else if (this.frequency == EdgeFrequency.SINGLE_PER_LABEL) { - for (Edge edge : vertex.edges()) { - // Use label + targetId as subKey, use properties as subValue - writer.writeSubKv(out -> { - this.writeLabel(out, edge.label()); - this.writeId(out, edge.targetId()); - }, out -> { - this.writeProperties(out, edge.properties()); - }); - } - } else { - assert this.frequency == EdgeFrequency.MULTIPLE; - for (Edge edge : vertex.edges()) { - /* - * Use label + sortValues + targetId as subKey, - * use properties as subValue - */ - writer.writeSubKv(out -> { - this.writeLabel(out, edge.label()); - this.writeLabel(out, edge.name()); - this.writeId(out, edge.targetId()); - }, out -> { - this.writeProperties(out, edge.properties()); - }); - } - } - writer.writeFinish(); - } - - @Override - public void writeMessage(Id id, Value value) throws IOException { - this.out.writeEntry(out -> { - // Write id - this.writeId(out, id); - }, out -> { - this.writeMessage(out, value); - }); - } - - @Override - public void writeId(RandomAccessOutput out, Id id) throws IOException { - id.write(out); - } - - @Override - public void writeValue(RandomAccessOutput out, Value value) - throws IOException { - out.writeByte(value.valueType().code()); - value.write(out); - } - - private void writeMessage(RandomAccessOutput out, Value value) - throws IOException { - value.write(out); - } - - private void writeProperties(RandomAccessOutput out, Properties properties) - throws IOException { - Map keyValues = properties.get(); - out.writeInt(keyValues.size()); - for (Map.Entry entry : keyValues.entrySet()) { - out.writeUTF(entry.getKey()); - this.writeValue(out, entry.getValue()); - } - } - - private void writeLabel(RandomAccessOutput output, String label) - throws IOException { - output.writeUTF(label); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructGraphOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructGraphOutput.java deleted file mode 100644 index 4b79d35d0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructGraphOutput.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public abstract class StructGraphOutput implements GraphWritebackOutput { - - protected final Config config; - protected final StructRandomAccessOutput out; - - public StructGraphOutput(ComputerContext context, - StructRandomAccessOutput out) { - this.config = context.config(); - this.out = out; - } - - public abstract void writeObjectStart() throws IOException; - - public abstract void writeObjectEnd() throws IOException; - - public abstract void writeArrayStart() throws IOException; - - public abstract void writeArrayEnd() throws IOException; - - public abstract void writeKey(String key) throws IOException; - - public abstract void writeJoiner() throws IOException; - - public abstract void writeSplitter() throws IOException; - - public void writeLineStart() throws IOException { - // pass - } - - public void writeLineEnd() throws IOException { - this.out.writeRawString(System.lineSeparator()); - } - - public void writeId(Id id) throws IOException { - Object rawId = id.asObject(); - if (rawId instanceof Number) { - this.out.writeNumber((Number) rawId); - } else { - this.out.writeString(rawId.toString()); - } - } - - public void writeValue(Value value) throws IOException { - switch (value.valueType()) { - case ID: - this.writeIdValue((Id) value); - break; - case ID_LIST: - case ID_LIST_LIST: - case LIST_VALUE: - this.writeListValue((ListValue) value); - break; - case NULL: - case BOOLEAN: - case INT: - case LONG: - case FLOAT: - case DOUBLE: - case STRING: - value.write(this.out); - break; - default: - throw new ComputerException("Unexpected value type %s", - value.valueType()); - } - } - - private void writeIdValue(Id idValue) throws IOException { - /* - * The idValue is shown as bytes in computation, - * but it's as id when output - */ - this.writeId(idValue); - } - - private void writeListValue(ListValue values) throws IOException { - this.writeArrayStart(); - int size = values.size(); - int i = 0; - for (Value value : values.values()) { - this.writeValue(value); - if (++i < size) { - this.writeSplitter(); - } - } - this.writeArrayEnd(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutput.java deleted file mode 100644 index 16d83ccfe..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutput.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; - -import org.apache.commons.lang3.StringEscapeUtils; -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.testutil.Whitebox; - -@SuppressWarnings("deprecation") // StringEscapeUtils -public class StructRandomAccessOutput implements RandomAccessOutput { - - private final RandomAccessOutput output; - - public StructRandomAccessOutput(RandomAccessOutput output) { - this.output = output; - } - - @Override - public long position() { - return this.output.position(); - } - - @Override - public void seek(long position) throws IOException { - this.output.seek(position); - } - - @Override - public long skip(long n) throws IOException { - return this.output.skip(n); - } - - @Override - public void write(RandomAccessInput input, long offset, long length) - throws IOException { - if (UnsafeBytesInput.class == input.getClass()) { - byte[] buffer = Whitebox.getInternalState(input, "buffer"); - this.write(buffer, (int) offset, (int) length); - } else { - input.seek(offset); - byte[] bytes = input.readBytes((int) length); - this.write(bytes); - } - } - - @Override - public void write(int b) throws IOException { - this.writeNumber(b); - } - - @Override - public void write(byte[] b) throws IOException { - this.writeString(StringEncodeUtil.encodeBase64(b)); - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - byte[] dest = new byte[len]; - System.arraycopy(b, off, dest, 0, len); - this.writeString(StringEncodeUtil.encodeBase64(dest)); - } - - @Override - public void writeBoolean(boolean v) throws IOException { - this.writeRawString(v ? "true" : "false"); - } - - @Override - public void writeByte(int v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeShort(int v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeChar(int v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeInt(int v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeLong(long v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeFloat(float v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeDouble(double v) throws IOException { - this.writeNumber(v); - } - - @Override - public void writeBytes(String s) throws IOException { - this.writeString(s); - } - - @Override - public void writeChars(String s) throws IOException { - this.writeString(s); - } - - @Override - public void writeUTF(String s) throws IOException { - this.writeString(s); - } - - @Override - public void writeFixedInt(int v) throws IOException { - this.writeInt(v); - } - - @Override - public void writeFixedInt(long position, int v) throws IOException { - long oldPosition = this.position(); - this.seek(position); - this.writeInt(v); - this.seek(oldPosition); - } - - @Override - public void close() throws IOException { - this.output.close(); - } - - protected void writeNumber(Number number) throws IOException { - this.output.writeBytes(number.toString()); - } - - protected void writeRawString(String s) throws IOException { - this.output.writeBytes(s); - } - - protected void writeString(String s) throws IOException { - this.output.writeBytes("\""); - this.output.writeBytes(StringEscapeUtils.escapeJson(s)); - this.output.writeBytes("\""); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesInput.java deleted file mode 100644 index aa548f272..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesInput.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.lang.reflect.Field; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.util.BytesUtil; -import org.apache.hugegraph.computer.core.util.CoderUtil; -import org.apache.hugegraph.util.E; - -import sun.misc.Unsafe; - -@SuppressWarnings("deprecation") // Unsafe.getXx -public class UnsafeBytesInput implements BytesInput { - - private static final sun.misc.Unsafe UNSAFE; - - private final byte[] buffer; - private int limit; - private int position; - - static { - try { - Field field = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); - field.setAccessible(true); - UNSAFE = (sun.misc.Unsafe) field.get(null); - } catch (Exception e) { - throw new ComputerException("Failed to get unsafe", e); - } - } - - public UnsafeBytesInput(byte[] buffer) { - this(buffer, buffer.length); - } - - public UnsafeBytesInput(byte[] buffer, int limit) { - this(buffer, 0, limit); - } - - public UnsafeBytesInput(byte[] buffer, int position, int limit) { - E.checkArgumentNotNull(buffer, "The buffer can't be null"); - this.buffer = buffer; - this.limit = limit; - this.position = position; - } - - @Override - public void readFully(byte[] b) throws IOException { - this.readFully(b, 0, b.length); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOException { - this.require(len); - System.arraycopy(this.buffer, this.position, b, off, len); - this.position += len; - } - - @Override - public int skipBytes(int n) { - int remaining = this.remaining(); - if (remaining >= n) { - this.position += n; - return n; - } else { - this.position += remaining; - return remaining; - } - } - - @Override - public boolean readBoolean() throws IOException { - this.require(Constants.BOOLEAN_LEN); - boolean value = UNSAFE.getBoolean(this.buffer, this.offset()); - this.position += Constants.BOOLEAN_LEN; - return value; - } - - @Override - public byte readByte() throws IOException { - this.require(Constants.BYTE_LEN); - byte value = this.buffer[this.position]; - this.position += Constants.BYTE_LEN; - return value; - } - - @Override - public int readUnsignedByte() throws IOException { - this.require(Constants.BYTE_LEN); - int value = this.buffer[this.position] & 0xFF; - this.position += Constants.BYTE_LEN; - return value; - } - - @Override - public short readShort() throws IOException { - this.require(Constants.SHORT_LEN); - short value = UNSAFE.getShort(this.buffer, this.offset()); - this.position += Constants.SHORT_LEN; - return value; - } - - @Override - public int readUnsignedShort() throws IOException { - this.require(Constants.SHORT_LEN); - int value = UNSAFE.getShort(this.buffer, this.offset()) & 0xFFFF; - this.position += Constants.SHORT_LEN; - return value; - } - - @Override - public char readChar() throws IOException { - this.require(Constants.CHAR_LEN); - char value = UNSAFE.getChar(this.buffer, this.offset()); - this.position += Constants.CHAR_LEN; - return value; - } - - @Override - public int readInt() throws IOException { - this.require(Constants.INT_LEN); - int value = UNSAFE.getInt(this.buffer, this.offset()); - this.position += Constants.INT_LEN; - return value; - } - - @Override - public long readLong() throws IOException { - this.require(Constants.LONG_LEN); - long value = UNSAFE.getLong(this.buffer, this.offset()); - this.position += Constants.LONG_LEN; - return value; - } - - @Override - public float readFloat() throws IOException { - this.require(Constants.FLOAT_LEN); - float value = UNSAFE.getFloat(this.buffer, this.offset()); - this.position += Constants.FLOAT_LEN; - return value; - } - - @Override - public double readDouble() throws IOException { - this.require(Constants.DOUBLE_LEN); - double value = UNSAFE.getDouble(this.buffer, this.offset()); - this.position += Constants.DOUBLE_LEN; - return value; - } - - @Override - public String readLine() { - throw new ComputerException("Not implemented yet"); - } - - @Override - public String readUTF() throws IOException { - int len = this.readUnsignedShort(); - byte[] bytes = new byte[len]; - this.readFully(bytes, 0, len); - return CoderUtil.decode(bytes); - } - - @Override - public long position() { - return this.position; - } - - @Override - public void seek(long position) throws IOException { - this.position = (int) position; - } - - @Override - public long skip(long bytesToSkip) throws IOException { - int positionBeforeSkip = this.position; - this.require((int) bytesToSkip); - this.position += bytesToSkip; - return positionBeforeSkip; - } - - @Override - public long available() throws IOException { - return this.limit - this.position; - } - - protected int remaining() { - return this.limit - this.position; - } - - @Override - public void close() throws IOException { - // pass - } - - @Override - public UnsafeBytesInput duplicate() throws IOException { - return new UnsafeBytesInput(this.buffer, this.position, this.limit); - } - - @Override - public int compare(long offset, long length, RandomAccessInput other, - long otherOffset, long otherLength) throws IOException { - E.checkArgument(offset < this.buffer.length, - "Invalid offset parameter %s, expect < %s", - offset, this.buffer.length); - E.checkArgument(length <= (this.buffer.length - offset), - "Invalid length parameter %s, expect <= %s", - length, this.buffer.length - offset); - - if (other.getClass() == UnsafeBytesInput.class) { - return BytesUtil.compare(this.buffer, (int) offset, (int) length, - ((UnsafeBytesInput) other).buffer, - (int) otherOffset, (int) otherLength); - } else { - long otherPosition = other.position(); - other.seek(otherOffset); - byte[] bytes = other.readBytes((int) otherLength); - other.seek(otherPosition); - - return BytesUtil.compare(this.buffer, (int) offset, (int) length, - bytes, 0, bytes.length); - } - } - - protected void require(int size) throws IOException { - if (this.position + size > this.limit) { - throw new ComputerException( - "Only %s bytes available, trying to read %s bytes", - this.limit - this.position, size); - } - } - - protected byte[] buffer() { - return this.buffer; - } - - /** - * Cut the content from 0 to position and copy the content from position - * to the end to 0. - */ - protected void shiftBuffer() { - int remaining = this.remaining(); - if (remaining > 0) { - System.arraycopy(this.buffer, this.position, - this.buffer, 0, remaining); - } - this.position = 0; - this.limit = remaining; - } - - protected void limit(int limit) { - E.checkArgument(limit <= this.buffer.length, - "The limit must be >= buffer length %s", - this.buffer.length); - this.limit = limit; - } - - public int limit() { - return this.limit; - } - - private int offset() { - return Unsafe.ARRAY_BYTE_BASE_OFFSET + this.position; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesOutput.java deleted file mode 100644 index 830162e60..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesOutput.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.io.UTFDataFormatException; -import java.lang.reflect.Field; -import java.util.Arrays; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.util.CoderUtil; -import org.apache.hugegraph.util.E; - -import sun.misc.Unsafe; - -/** - * Use unsafe method to write the value to the buffer to improve the write - * performance. The buffer is auto extendable. - */ -public class UnsafeBytesOutput implements BytesOutput { - - private static final sun.misc.Unsafe UNSAFE; - - private byte[] buffer; - private int position; - - static { - try { - Field field = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); - field.setAccessible(true); - UNSAFE = (sun.misc.Unsafe) field.get(null); - } catch (Exception e) { - throw new ComputerException("Failed to get unsafe", e); - } - } - - public UnsafeBytesOutput(int size) { - this.buffer = new byte[size]; - this.position = 0; - } - - @Override - public void write(int b) throws IOException { - this.require(Constants.BYTE_LEN); - this.buffer[this.position] = (byte) b; - this.position += Constants.BYTE_LEN; - } - - @Override - public void write(byte[] b) throws IOException { - this.require(b.length); - System.arraycopy(b, 0, this.buffer, this.position, b.length); - this.position += b.length; - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - this.require(len); - System.arraycopy(b, off, this.buffer, this.position, len); - this.position += len; - } - - @Override - public void writeBoolean(boolean v) throws IOException { - this.require(Constants.BOOLEAN_LEN); - UNSAFE.putBoolean(this.buffer, this.offset(), v); - this.position += Constants.BOOLEAN_LEN; - } - - @Override - public void writeByte(int v) throws IOException { - this.require(Constants.BYTE_LEN); - this.buffer[this.position] = (byte) v; - this.position += Constants.BYTE_LEN; - } - - @Override - public void writeShort(int v) throws IOException { - this.require(Constants.SHORT_LEN); - UNSAFE.putShort(this.buffer, this.offset(), (short) v); - this.position += Constants.SHORT_LEN; - } - - @Override - public void writeChar(int v) throws IOException { - this.require(Constants.CHAR_LEN); - UNSAFE.putChar(this.buffer, this.offset(), (char) v); - this.position += Constants.CHAR_LEN; - } - - @Override - public void writeInt(int v) throws IOException { - this.require(Constants.INT_LEN); - UNSAFE.putInt(this.buffer, this.offset(), v); - this.position += Constants.INT_LEN; - } - - @Override - public void writeLong(long v) throws IOException { - this.require(Constants.LONG_LEN); - UNSAFE.putLong(this.buffer, this.offset(), v); - this.position += Constants.LONG_LEN; - } - - @Override - public void writeFloat(float v) throws IOException { - this.require(Constants.FLOAT_LEN); - UNSAFE.putFloat(this.buffer, this.offset(), v); - this.position += Constants.FLOAT_LEN; - } - - @Override - public void writeDouble(double v) throws IOException { - this.require(Constants.DOUBLE_LEN); - UNSAFE.putDouble(this.buffer, this.offset(), v); - this.position += Constants.DOUBLE_LEN; - } - - @Override - public void writeBytes(String s) throws IOException { - int len = s.length(); - this.require(len); - for (int i = 0; i < len; i++) { - this.buffer[this.position] = (byte) s.charAt(i); - this.position++; - } - } - - @Override - public void writeChars(String s) throws IOException { - int len = s.length(); - this.require(len * Constants.CHAR_LEN); - for (int i = 0; i < len; i++) { - char v = s.charAt(i); - UNSAFE.putChar(this.buffer, this.offset(), v); - this.position += Constants.CHAR_LEN; - } - } - - @Override - public void writeUTF(String s) throws IOException { - byte[] bytes = CoderUtil.encode(s); - if (bytes.length > 65535) { - throw new UTFDataFormatException( - "Encoded string too long: " + bytes.length + " bytes"); - } - this.writeShort(bytes.length); - this.write(bytes); - } - - @Override - public long position() { - return this.position; - } - - @Override - public void seek(long position) throws IOException { - this.position = (int) position; - } - - /** - * If you write some thing, and you need to write the serialized byte size - * first. If the byte size is unknown when write, you can skip 4 bytes - * (size of int)first, after write out the content, get the serialized - * byte size and calls writeInt(int position, int v) to write the int at - * skipped position. The serialized byte size can be get by - * the difference of {@link #position()} before and after write the content. - * @return the position before skip. - */ - @Override - public long skip(long bytesToSkip) throws IOException { - E.checkArgument(bytesToSkip >= 0L, - "The parameter bytesToSkip must be >= 0, but got %s", - bytesToSkip); - this.require((int) bytesToSkip); - long positionBeforeSkip = this.position; - this.position += bytesToSkip; - return positionBeforeSkip; - } - - @Override - public void write(RandomAccessInput input, long offset, long length) - throws IOException { - if (UnsafeBytesInput.class == input.getClass()) { - byte[] buffer = ((UnsafeBytesInput) input).buffer(); - this.write(buffer, (int) offset, (int) length); - } else { - input.seek(offset); - byte[] bytes = input.readBytes((int) length); - this.write(bytes); - } - } - - @Override - public void writeFixedInt(int v) throws IOException { - this.require(Constants.INT_LEN); - UNSAFE.putInt(this.buffer, this.offset(), v); - this.position += Constants.INT_LEN; - } - - @Override - public void writeFixedInt(long position, int v) throws IOException { - // The position is not changed after write - this.require(position, Constants.INT_LEN); - UNSAFE.putInt(this.buffer, this.offset(position), v); - } - - /** - * @return the internal byte array, can't modify the returned byte array - */ - @Override - public byte[] buffer() { - return this.buffer; - } - - /** - * @return Copied byte array. - */ - public byte[] toByteArray() { - return Arrays.copyOf(this.buffer, this.position); - } - - protected void require(int size) throws IOException { - if (this.position + size > this.buffer.length) { - byte[] newBuf = new byte[(this.buffer.length + size) << 1]; - System.arraycopy(this.buffer, 0, newBuf, 0, this.position); - this.buffer = newBuf; - } - } - - protected void require(long position, int size) throws IOException { - if (position + size > this.buffer.length) { - throw new ComputerException( - "Unable to write %s bytes at position %s", - size, position); - } - } - - private long offset() { - return Unsafe.ARRAY_BYTE_BASE_OFFSET + this.position; - } - - private long offset(long position) { - return Unsafe.ARRAY_BYTE_BASE_OFFSET + position; - } - - @Override - public void close() throws IOException { - // pass - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Manager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Manager.java deleted file mode 100644 index c2806faa1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Manager.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.manager; - -import org.apache.hugegraph.computer.core.config.Config; - -/** - * Manager is used to manage a specified resource, like AggregatorManager and - * CommunicationManager. A manager is created and initialized - * by {@link #init(Config)}} before all supersteps start, and destroyed by - * {@link #close} after all supersteps ended. - */ -public interface Manager { - - /** - * The unique identify name. - */ - String name(); - - /** - * Used to add the resources needed by the computation. - * Be called only one time before all supersteps start. - */ - default void init(Config config) { - // pass - } - - /** - * Used to notify all managers that master or worker is inited. - * Be called only one time before all supersteps start. - */ - default void inited(Config config) { - // pass - } - - /** - * Close the resources used in the computation. - * Be called only one time after all supersteps ended. - */ - default void close(Config config) { - // pass - } - - /** - * Do some initialization for a superstep. - * Be called before a superstep. Subclass should override this method - * if wants to do something before a superstep. - */ - default void beforeSuperstep(Config config, int superstep) { - // pass - } - - /** - * Do some clean up for a superstep. - * Be called after a superstep. Subclass should override this method - * if wants to do something after a superstep. - */ - default void afterSuperstep(Config config, int superstep) { - // pass - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Managers.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Managers.java deleted file mode 100644 index 3acd6dc13..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/manager/Managers.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.manager; - -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.InsertionOrderUtil; - -public class Managers implements Iterable { - - private final Map managers; - - public Managers() { - this.managers = InsertionOrderUtil.newMap(); - } - - public T get(String name) { - Manager manager = this.managers.get(name); - E.checkArgumentNotNull(manager, "Not found manager '%s'", name); - @SuppressWarnings("unchecked") - T subManager = (T) manager; - return subManager; - } - - public void add(Manager manager) { - this.managers.put(manager.name(), manager); - } - - public Collection all() { - return this.managers.values(); - } - - @Override - public Iterator iterator() { - return this.managers.values().iterator(); - } - - public void initAll(Config config) { - for (Manager manager : this.all()) { - manager.init(config); - } - } - - public void initedAll(Config config) { - for (Manager manager : this.all()) { - manager.inited(config); - } - } - - public void closeAll(Config config) { - for (Manager manager : this.all()) { - manager.close(config); - } - } - - public void beforeSuperstep(Config config, int superstep) { - for (Manager manager : this.all()) { - manager.beforeSuperstep(config, superstep); - } - } - - public void afterSuperstep(Config config, int superstep) { - for (Manager manager : this.all()) { - manager.afterSuperstep(config, superstep); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java deleted file mode 100644 index da01fa7b2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/master/MasterService.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.master; - -import java.io.Closeable; -import java.net.InetSocketAddress; -import java.util.List; - -import org.apache.commons.lang3.time.StopWatch; -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.aggregator.DefaultAggregator; -import org.apache.hugegraph.computer.core.aggregator.MasterAggrManager; -import org.apache.hugegraph.computer.core.bsp.Bsp4Master; -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.SuperstepStat; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.input.MasterInputManager; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.output.ComputerOutput; -import org.apache.hugegraph.computer.core.rpc.MasterRpcManager; -import org.apache.hugegraph.computer.core.util.ShutdownHook; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.apache.hugegraph.util.TimeUtil; -import org.slf4j.Logger; - -/** - * Master service is job's controller. It controls the superstep iteration of - * the job. Master service assembles the managers used by master. For example, - * aggregator manager, input manager and so on. - */ -public class MasterService implements Closeable { - - private static final Logger LOG = Log.logger(MasterService.class); - - private final ComputerContext context; - private final Managers managers; - - private volatile boolean inited; - private volatile boolean failed; - private volatile boolean closed; - private Config config; - private volatile Bsp4Master bsp4Master; - private ContainerInfo masterInfo; - private int maxSuperStep; - private MasterComputation masterComputation; - - private final ShutdownHook shutdownHook; - private volatile Thread serviceThread; - - public MasterService() { - this.context = ComputerContext.instance(); - this.managers = new Managers(); - this.closed = false; - this.shutdownHook = new ShutdownHook(); - } - - /** - * Init master service, create the managers used by master. - */ - public void init(Config config) { - E.checkArgument(!this.inited, "The %s has been initialized", this); - LOG.info("{} Start to initialize master", this); - - this.serviceThread = Thread.currentThread(); - this.registerShutdownHook(); - - this.config = config; - - this.maxSuperStep = this.config.get(ComputerOptions.BSP_MAX_SUPER_STEP); - - InetSocketAddress rpcAddress = this.initManagers(); - - this.masterInfo = new ContainerInfo(ContainerInfo.MASTER_ID, - TransportUtil.host(rpcAddress), - rpcAddress.getPort()); - /* - * Connect to BSP server and clean the old data may be left by the - * previous job with the same job id. - */ - this.bsp4Master = new Bsp4Master(this.config); - this.bsp4Master.clean(); - - this.masterComputation = this.config.createObject( - ComputerOptions.MASTER_COMPUTATION_CLASS); - this.masterComputation.init(new DefaultMasterContext()); - this.managers.initedAll(config); - - LOG.info("{} register MasterService", this); - this.bsp4Master.masterInitDone(this.masterInfo); - - List workers = this.bsp4Master.waitWorkersInitDone(); - LOG.info("{} waited all workers registered, workers count: {}", - this, workers.size()); - - LOG.info("{} MasterService initialized", this); - this.inited = true; - } - - private void stopServiceThread() { - if (this.serviceThread == null) { - return; - } - - try { - this.serviceThread.interrupt(); - } catch (Throwable ignore) { - } - } - - private void registerShutdownHook() { - this.shutdownHook.hook(() -> { - this.stopServiceThread(); - this.cleanAndCloseBsp(); - }); - } - - /** - * Stop the master service. Stop the managers created in {@link #init(Config)}. - */ - @Override - public synchronized void close() { - // TODO: check the logic of close carefully later - //this.checkInited(); - if (this.closed) { - LOG.info("{} MasterService had closed before", this); - return; - } - - try { - if (this.masterComputation != null) { - this.masterComputation.close(new DefaultMasterContext()); - } - } catch (Exception e) { - LOG.error("Error occurred while closing master service", e); - } - - if (!failed && this.bsp4Master != null) { - this.bsp4Master.waitWorkersCloseDone(); - } - - try { - if (managers != null) { - this.managers.closeAll(this.config); - } - } catch (Exception e) { - LOG.error("Error occurred while closing managers", e); - } - - this.cleanAndCloseBsp(); - this.shutdownHook.unhook(); - - this.closed = true; - LOG.info("{} MasterService closed", this); - } - - private void cleanAndCloseBsp() { - if (this.bsp4Master == null) { - return; - } - - this.bsp4Master.clean(); - this.bsp4Master.close(); - } - - /** - * Execute the graph. First determines which superstep to start from. And - * then execute the superstep iteration. - * After the superstep iteration, output the result. - */ - public void execute() { - StopWatch watcher = new StopWatch(); - this.checkInited(); - - LOG.info("{} MasterService execute", this); - try { - /* - * Step 1: Determines which superstep to start from, and resume this - * superstep. - */ - int superstep = this.superstepToResume(); - LOG.info("{} MasterService resume from superstep: {}", - this, superstep); - - /* - * TODO: Get input splits from HugeGraph if resume from - * Constants.INPUT_SUPERSTEP. - */ - this.bsp4Master.masterResumeDone(superstep); - - /* - * Step 2: Input superstep for loading vertices and edges. - * This step may be skipped if resume from other superstep than - * Constants.INPUT_SUPERSTEP. - */ - SuperstepStat superstepStat; - watcher.start(); - if (superstep == Constants.INPUT_SUPERSTEP) { - superstepStat = this.inputstep(); - superstep++; - } else { - // TODO: Get superstepStat from bsp service. - superstepStat = null; - } - watcher.stop(); - LOG.info("{} MasterService input step cost: {}", - this, TimeUtil.readableTime(watcher.getTime())); - E.checkState(superstep <= this.maxSuperStep, - "The superstep {} can't be > maxSuperStep {}", - superstep, this.maxSuperStep); - - watcher.reset(); - watcher.start(); - // Step 3: Iteration computation of all supersteps. - for (; superstepStat.active(); superstep++) { - LOG.info("{} MasterService superstep {} started", - this, superstep); - /* - * Superstep iteration. The steps in each superstep are: - * 1) Master waits workers superstep prepared. - * 2) All managers call beforeSuperstep. - * 3) Master signals the workers that the master prepared - * superstep. - * 4) Master waits the workers do vertex computation. - * 5) Master signal the workers that all workers have finished - * vertex computation. - * 6) Master waits the workers end the superstep, and get - * superstepStat. - * 7) Master compute whether to continue the next superstep - * iteration. - * 8) All managers call afterSuperstep. - * 9) Master signals the workers with superstepStat, and workers - * know whether to continue the next superstep iteration. - */ - this.bsp4Master.waitWorkersStepPrepareDone(superstep); - this.managers.beforeSuperstep(this.config, superstep); - this.bsp4Master.masterStepPrepareDone(superstep); - - this.bsp4Master.waitWorkersStepComputeDone(superstep); - this.bsp4Master.masterStepComputeDone(superstep); - List workerStats = - this.bsp4Master.waitWorkersStepDone(superstep); - superstepStat = SuperstepStat.from(workerStats); - SuperstepContext context = new SuperstepContext(superstep, - superstepStat); - // Call master compute(), note the worker afterSuperstep() is done - boolean masterContinue = this.masterComputation.compute(context); - if (this.finishedIteration(masterContinue, context)) { - superstepStat.inactivate(); - } - this.managers.afterSuperstep(this.config, superstep); - this.bsp4Master.masterStepDone(superstep, superstepStat); - - LOG.info("{} MasterService superstep {} finished", - this, superstep); - } - watcher.stop(); - LOG.info("{} MasterService compute step cost: {}", - this, TimeUtil.readableTime(watcher.getTime())); - - watcher.reset(); - watcher.start(); - // Step 4: Output superstep for outputting results. - this.outputstep(); - watcher.stop(); - LOG.info("{} MasterService output step cost: {}", - this, TimeUtil.readableTime(watcher.getTime())); - } catch (Throwable throwable) { - LOG.error("{} MasterService execute failed", this, throwable); - failed = true; - throw throwable; - } - } - - @Override - public String toString() { - Object id = this.masterInfo == null ? - "?" + this.hashCode() : this.masterInfo.id(); - return String.format("[master %s]", id); - } - - private InetSocketAddress initManagers() { - // Create managers - MasterInputManager inputManager = new MasterInputManager(); - this.managers.add(inputManager); - - MasterAggrManager aggregatorManager = new MasterAggrManager(); - this.managers.add(aggregatorManager); - - MasterRpcManager rpcManager = new MasterRpcManager(); - this.managers.add(rpcManager); - - // Init managers - this.managers.initAll(this.config); - - // Register rpc service - rpcManager.registerInputSplitService(inputManager.handler()); - rpcManager.registerAggregatorService(aggregatorManager.handler()); - - // Start rpc server - InetSocketAddress address = rpcManager.start(); - LOG.info("{} MasterService started rpc server: {}", this, address); - return address; - } - - private void checkInited() { - E.checkArgument(this.inited, "The %s has not been initialized", this); - } - - private int superstepToResume() { - /* - * TODO: determines which superstep to start from if failover is - * enabled. - */ - return Constants.INPUT_SUPERSTEP; - } - - /** - * The superstep iteration stops if met one of the following conditions: - * 1): Has run maxSuperStep times of superstep iteration. - * 2): The mater-computation returns false that stop superstep iteration. - * 3): All vertices are inactive and no message sent in a superstep. - * @param masterContinue The master-computation decides - * @return true if finish superstep iteration. - */ - private boolean finishedIteration(boolean masterContinue, - MasterComputationContext context) { - if (!masterContinue) { - return true; - } - if (context.superstep() >= this.maxSuperStep - 1) { - return true; - } - long activeVertexCount = context.totalVertexCount() - - context.finishedVertexCount(); - return context.messageCount() == 0L && activeVertexCount == 0L; - } - - /** - * Coordinate with workers to load vertices and edges from HugeGraph. There - * are two phases in inputstep. The First phase is to get input splits from - * master, and read the vertices and edges from input splits. The second - * phase is after all workers read input splits, the workers merge the - * vertices and edges to get the stats for each partition. - */ - private SuperstepStat inputstep() { - LOG.info("{} MasterService inputstep started", this); - this.bsp4Master.waitWorkersInputDone(); - this.bsp4Master.masterInputDone(); - List workerStats = this.bsp4Master.waitWorkersStepDone( - Constants.INPUT_SUPERSTEP); - SuperstepStat superstepStat = SuperstepStat.from(workerStats); - this.bsp4Master.masterStepDone(Constants.INPUT_SUPERSTEP, - superstepStat); - LOG.info("{} MasterService inputstep finished with superstat {}", - this, superstepStat); - return superstepStat; - } - - /** - * Wait the workers write a result back. After this, the job is finished successfully. - */ - private void outputstep() { - LOG.info("{} MasterService outputstep started", this); - this.bsp4Master.waitWorkersOutputDone(); - // Merge output files of multiple partitions - ComputerOutput output = this.config.createObject( - ComputerOptions.OUTPUT_CLASS); - output.mergePartitions(this.config); - LOG.info("{} MasterService outputstep finished", this); - } - - private class DefaultMasterContext implements MasterContext { - - private final MasterAggrManager aggrManager; - - public DefaultMasterContext() { - this.aggrManager = MasterService.this.managers.get( - MasterAggrManager.NAME); - } - - @Override - public > - void registerAggregator(String name, Class aggregatorClass) { - E.checkArgument(aggregatorClass != null, - "The aggregator class can't be null"); - Aggregator aggr; - try { - aggr = aggregatorClass.getDeclaredConstructor().newInstance(); - } catch (Exception e) { - throw new ComputerException("Can't new instance from class: %s", - e, aggregatorClass.getName()); - } - this.aggrManager.registerAggregator(name, aggr); - } - - @Override - public > - void registerAggregator(String name, ValueType type, - Class combinerClass) { - this.registerAggregator(name, type, combinerClass, null); - } - - @Override - public > - void registerAggregator(String name, V defaultValue, - Class combinerClass) { - E.checkArgument(defaultValue != null, - "The aggregator default value can't be null: %s," + - " or call another register method if necessary: " + - "registerAggregator(String name,ValueType type," + - "Class combiner)", name); - this.registerAggregator(name, defaultValue.valueType(), - combinerClass, defaultValue); - } - - private > - void registerAggregator(String name, ValueType type, - Class combinerClass, V defaultValue) { - Aggregator aggr = new DefaultAggregator<>( - MasterService.this.context, - type, combinerClass, defaultValue); - this.aggrManager.registerAggregator(name, aggr); - } - - @Override - public void aggregatedValue(String name, V value) { - this.aggrManager.aggregatedAggregator(name, value); - } - - @Override - public V aggregatedValue(String name) { - return this.aggrManager.aggregatedValue(name); - } - - @Override - public Config config() { - return MasterService.this.config; - } - } - - private class SuperstepContext extends DefaultMasterContext - implements MasterComputationContext { - - private final int superstep; - private final SuperstepStat superstepStat; - - public SuperstepContext(int superstep, SuperstepStat superstepStat) { - this.superstep = superstep; - this.superstepStat = superstepStat; - } - - @Override - public long totalVertexCount() { - return this.superstepStat.vertexCount(); - } - - @Override - public long totalEdgeCount() { - return this.superstepStat.edgeCount(); - } - - @Override - public long finishedVertexCount() { - return this.superstepStat.finishedVertexCount(); - } - - @Override - public long messageCount() { - return this.superstepStat.messageSendCount(); - } - - @Override - public long messageBytes() { - return this.superstepStat.messageSendBytes(); - } - - @Override - public int superstep() { - return this.superstep; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientHandler.java deleted file mode 100644 index de0ae9f19..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -public interface ClientHandler extends TransportHandler { - - /** - * Invoked when the channel associated with the given connectionId channel - * is able to send data immediately. - */ - void sendAvailable(ConnectionId connectionId); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionId.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionId.java deleted file mode 100644 index 7d3a55936..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionId.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import static org.apache.hugegraph.computer.core.network.TransportUtil.resolvedSocketAddress; - -import java.net.InetSocketAddress; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; - -import org.apache.hugegraph.util.E; - -/** - * A {@link ConnectionId} identifies a connection to a remote connection - * manager by the socket address and a client index. This allows multiple - * connections to the same worker to be distinguished by their client index. - */ -public class ConnectionId { - - private static final ConcurrentHashMap - CONNECTION_ID_CACHE = new ConcurrentHashMap<>(); - - private final InetSocketAddress address; - private final int clientIndex; - - public static ConnectionId parseConnectionId(String host, int port) { - return parseConnectionId(host, port, 0); - } - - public static ConnectionId parseConnectionId(String host, int port, - int clientIndex) { - String cacheKey = buildCacheKey(host, port, clientIndex); - - Function resolveAddress = key -> { - InetSocketAddress socketAddress = resolvedSocketAddress(host, port); - return new ConnectionId(socketAddress, clientIndex); - }; - - return CONNECTION_ID_CACHE.computeIfAbsent(cacheKey, resolveAddress); - } - - public ConnectionId(InetSocketAddress address) { - this(address, 0); - } - - public ConnectionId(InetSocketAddress address, int clientIndex) { - E.checkArgument(clientIndex >= 0, - "The clientIndex must be >= 0"); - // Use resolved address here - E.checkArgument(!address.isUnresolved(), - "The address must be resolved"); - this.address = address; - this.clientIndex = clientIndex; - } - - private static String buildCacheKey(String host, int port, - int clientIndex) { - return host + ":" + port + "[" + clientIndex + "]"; - } - - public InetSocketAddress socketAddress() { - return this.address; - } - - public int clientIndex() { - return this.clientIndex; - } - - @Override - public int hashCode() { - return this.address.hashCode() + (31 * this.clientIndex); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof ConnectionId)) { - return false; - } - - final ConnectionId other = (ConnectionId) obj; - return other.socketAddress().equals(this.address) && - other.clientIndex() == this.clientIndex; - } - - @Override - public String toString() { - return String.format("%s[%d]", - TransportUtil.formatAddress(this.address), - this.clientIndex); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataClientManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataClientManager.java deleted file mode 100644 index 8e90c7946..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataClientManager.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.computer.core.sender.QueuedMessageSender; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class DataClientManager implements Manager { - - public static final Logger LOG = Log.logger(DataClientManager.class); - - public static final String NAME = "data_client"; - - private final ConnectionManager connManager; - private final QueuedMessageSender sender; - - public DataClientManager(ConnectionManager connManager, - ComputerContext context) { - this.connManager = connManager; - this.sender = new QueuedMessageSender(context.config()); - } - - public QueuedMessageSender sender() { - return this.sender; - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - ClientHandler clientHandler = new DataClientHandler( - this.sender.notBusyNotifier()); - this.connManager.initClientManager(config, clientHandler); - LOG.info("DataClientManager inited"); - } - - @Override - public void inited(Config config) { - this.sender.init(); - } - - @Override - public void close(Config config) { - try { - this.sender.close(); - } finally { - this.connManager.shutdownClients(); - } - LOG.info("DataClientManager closed"); - } - - public void connect(int workerId, String hostname, int dataPort) { - try { - TransportClient client = this.connManager.getOrCreateClient( - hostname, dataPort); - LOG.info("Successfully connect to worker: {}({}:{})", - workerId, hostname, dataPort); - this.sender.addWorkerClient(workerId, client); - } catch (TransportException e) { - throw new ComputerException( - "Failed to connect to worker: %s(%s:%s)", - workerId, hostname, dataPort); - } - } - - private class DataClientHandler implements ClientHandler { - - private final Runnable notBusyNotifier; - - public DataClientHandler(Runnable notBusyNotifier) { - E.checkNotNull(notBusyNotifier, - "The not-busy notifier can't be null"); - this.notBusyNotifier = notBusyNotifier; - } - - @Override - public void sendAvailable(ConnectionId connectionId) { - LOG.debug("Channel for connectionId {} is available", connectionId); - this.notBusyNotifier.run(); - } - - @Override - public void onChannelActive(ConnectionId connectionId) { - LOG.debug("Channel for connectionId {} is active", connectionId); - } - - @Override - public void onChannelInactive(ConnectionId connectionId) { - LOG.debug("Channel for connectionId {} is inactive", connectionId); - } - - @Override - public void exceptionCaught(TransportException cause, - ConnectionId connectionId) { - LOG.error("Channel for connectionId {} occurred exception", - connectionId, cause); - DataClientManager.this.sender.transportExceptionCaught(cause, connectionId); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManager.java deleted file mode 100644 index 263935bc1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManager.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetSocketAddress; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class DataServerManager implements Manager { - - private static final Logger LOG = Log.logger(DataServerManager.class); - - public static final String NAME = "data_server"; - - private final ConnectionManager connectionManager; - private final MessageHandler messageHandler; - - public DataServerManager(ConnectionManager connectionManager, - MessageHandler messageHandler) { - this.connectionManager = connectionManager; - this.messageHandler = messageHandler; - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - this.connectionManager.startServer(config, this.messageHandler); - LOG.info("DataServerManager initialized with address '{}'", - this.address()); - } - - @Override - public void close(Config config) { - InetSocketAddress address = this.address(); - this.connectionManager.shutdownServer(); - LOG.info("DataServerManager closed with address '{}'", address); - } - - public InetSocketAddress address() { - return this.connectionManager.getServer().bindAddress(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/IOMode.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/IOMode.java deleted file mode 100644 index aff65a748..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/IOMode.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -/** - * Selector for which form of low-level IO we should use. - * NIO is always available, while EPOLL is only available on Linux. - */ -public enum IOMode { - - NIO, - EPOLL -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/MessageHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/MessageHandler.java deleted file mode 100644 index eca40286a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/MessageHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; - -public interface MessageHandler extends TransportHandler { - - /** - * Handle the buffer received. There are two buffer list for a partition, - * one for sorting and one for receiving new buffers. It may block the - * caller if the receiving list reached threshold and the sorting list is - * sorting in process. - */ - void handle(MessageType messageType, int partition, NetworkBuffer buffer); - - /** - * Build a output path. - */ - String genOutputPath(MessageType messageType, int partition); - - /** - * Notify start-session completed on server-side. - */ - void onStarted(ConnectionId connectionId); - - /** - * Notify finish-session completed on server-side. - */ - void onFinished(ConnectionId connectionId); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportClient.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportClient.java deleted file mode 100644 index 980e1a200..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportClient.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.util.concurrent.CompletableFuture; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.computer.core.network.message.MessageType; - -/** - * This is used for worker to send buffer to other worker. The whole process - * contains several iteration. In one iteration {@link #startSession} is - * called only once. {@link #send} is called zero or more times. - * {@link #finishSession()} is called only once. - */ -public interface TransportClient { - - /** - * This method is called before an iteration of sending buffers. - */ - void startSession() throws TransportException; - - /** - * This method is the asynchronous version of {@link #startSession()}. - */ - CompletableFuture startSessionAsync() throws TransportException; - - /** - * Send the buffer to the server. - * Return false if unable send data immediately. - * This method is called zero or many times in iteration. - * @throws TransportException if failed, the job will fail. - */ - boolean send(MessageType messageType, int partition, ByteBuffer buffer) - throws TransportException; - - /** - * This method is called after an iteration. It will block the caller to - * make sure the buffers sent be received by target workers. - */ - void finishSession() throws TransportException; - - /** - * This method is the asynchronous version of {@link #finishSession()}. - */ - CompletableFuture finishSessionAsync() throws TransportException; - - /** - * Get the {@link ConnectionId} - */ - ConnectionId connectionId(); - - /** - * Get the remote SocketAddress - */ - InetSocketAddress remoteAddress(); - - /** - * To check whether the connection is active to use - * @return true if connection is active - */ - boolean active(); - - /** - * To check whether the session is active to use - * @return true if session is active - */ - boolean sessionActive(); - - /** - * Close the client. - * NOTE: If the client is created with {@link ConnectionManager}, need to - * use {@link ConnectionManager#closeClient(ConnectionId)} to close it, - * otherwise there will be unsafe risks. - */ - void close(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportConf.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportConf.java deleted file mode 100644 index 4cc858db5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportConf.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetAddress; -import java.util.Locale; - -import org.apache.hugegraph.computer.core.common.exception.IllegalArgException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.util.E; - -import io.netty.channel.epoll.Epoll; - -public class TransportConf { - - public static final String SERVER_THREAD_GROUP_NAME = - "transport-netty-server"; - public static final String CLIENT_THREAD_GROUP_NAME = - "transport-netty-client"; - private final Config config; - - public static TransportConf wrapConfig(Config config) { - return new TransportConf(config); - } - - protected TransportConf(Config config) { - this.config = config; - } - - public InetAddress serverAddress() { - String host = this.config.get(ComputerOptions.TRANSPORT_SERVER_HOST); - return TransportUtil.resolvedAddress(host); - } - - /** - * A port number of zero will let the system pick up an ephemeral port. - */ - public int serverPort() { - return this.config.get(ComputerOptions.TRANSPORT_SERVER_PORT); - } - - public int serverThreads() { - return Math.min( - this.config.get(ComputerOptions.TRANSPORT_SERVER_THREADS), - this.maxTransportThreads()); - } - - public int clientThreads() { - return Math.min( - this.config.get(ComputerOptions.TRANSPORT_CLIENT_THREADS), - this.maxTransportThreads()); - } - - private int maxTransportThreads() { - return this.config.get(ComputerOptions.JOB_WORKERS_COUNT); - } - - public TransportProvider transportProvider() { - return this.config - .createObject(ComputerOptions.TRANSPORT_PROVIDER_CLASS); - } - - public boolean recvBufferFileMode() { - return this.config.get(ComputerOptions.TRANSPORT_RECV_FILE_MODE); - } - - /** - * IO mode: nio or epoll - */ - public IOMode ioMode() { - String ioMode = this.config.get(ComputerOptions.TRANSPORT_IO_MODE) - .toUpperCase(Locale.ROOT); - switch (ioMode) { - case "NIO": - return IOMode.NIO; - case "EPOLL": - return IOMode.EPOLL; - case "AUTO": - return Epoll.isAvailable() ? IOMode.EPOLL : IOMode.NIO; - default: - throw new IllegalArgException("Unknown io_mode: %s", ioMode); - } - } - - /** - * Whether enabled EPOLL level trigger - */ - public boolean epollLevelTriggered() { - return this.config.get(ComputerOptions.TRANSPORT_EPOLL_LT); - } - - public boolean tcpKeepAlive() { - return this.config.get(ComputerOptions.TRANSPORT_TCP_KEEP_ALIVE); - } - - /** - * Requested maximum length of the queue of incoming connections. If - * < 1, - * the default Netty value of {@link io.netty.util.NetUtil#SOMAXCONN} will - * be used. - */ - public int maxSynBacklog() { - return this.config.get(ComputerOptions.TRANSPORT_MAX_SYN_BACKLOG); - } - - /** - * Receive buffer size (SO_RCVBUF). - * Note: the optimal size for receive buffer and send buffer should be - * latency * network_bandwidth. - * Assuming latency = 1ms, network_bandwidth = 10Gbps - * buffer size should be ~ 1.25MB - */ - public int sizeReceiveBuffer() { - return this.config.get(ComputerOptions.TRANSPORT_RECEIVE_BUFFER_SIZE); - } - - public int sizeSendBuffer() { - return this.config.get(ComputerOptions.TRANSPORT_SEND_BUFFER_SIZE); - } - - public int networkRetries() { - return this.config.get(ComputerOptions.TRANSPORT_NETWORK_RETRIES); - } - - public long clientConnectionTimeout() { - return this.config - .get(ComputerOptions.TRANSPORT_CLIENT_CONNECT_TIMEOUT); - } - - public long closeTimeout() { - return this.config.get(ComputerOptions.TRANSPORT_CLOSE_TIMEOUT); - } - - public long timeoutSyncRequest() { - return this.config.get(ComputerOptions.TRANSPORT_SYNC_REQUEST_TIMEOUT); - } - - /** - * Timeout of finish session, if less than or equal 0 the default value is - * TRANSPORT_SYNC_REQUEST_TIMEOUT * TRANSPORT_MAX_PENDING_REQUESTS - */ - public long timeoutFinishSession() { - long timeout = this.config.get( - ComputerOptions.TRANSPORT_FINISH_SESSION_TIMEOUT); - return timeout > 0 ? timeout : - this.config.get(ComputerOptions.TRANSPORT_SYNC_REQUEST_TIMEOUT) * - this.config.get(ComputerOptions.TRANSPORT_MAX_PENDING_REQUESTS); - } - - public long writeSocketTimeout() { - return this.config.get(ComputerOptions.TRANSPORT_WRITE_SOCKET_TIMEOUT); - } - - public int writeBufferHighMark() { - return this.config - .get(ComputerOptions.TRANSPORT_WRITE_BUFFER_HIGH_MARK); - } - - public int writeBufferLowMark() { - return this.config - .get(ComputerOptions.TRANSPORT_WRITE_BUFFER_LOW_MARK); - } - - public int maxPendingRequests() { - return this.config.get(ComputerOptions.TRANSPORT_MAX_PENDING_REQUESTS); - } - - public int minPendingRequests() { - int minPendingReqs = this.config.get( - ComputerOptions.TRANSPORT_MIN_PENDING_REQUESTS); - - int maxPendingRequests = this.maxPendingRequests(); - - E.checkArgument(minPendingReqs <= maxPendingRequests, - "The min_pending_requests(%s) must be less than or " + - "equal to the max_pending_requests(%s).", - minPendingReqs, maxPendingRequests); - return minPendingReqs; - } - - public long minAckInterval() { - return this.config.get(ComputerOptions.TRANSPORT_MIN_ACK_INTERVAL); - } - - public long serverIdleTimeout() { - return this.config.get(ComputerOptions.TRANSPORT_SERVER_IDLE_TIMEOUT); - } - - public long heartbeatInterval() { - return this.config.get(ComputerOptions.TRANSPORT_HEARTBEAT_INTERVAL); - } - - public int maxTimeoutHeartbeatCount() { - return this.config - .get(ComputerOptions.TRANSPORT_MAX_TIMEOUT_HEARTBEAT_COUNT); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportHandler.java deleted file mode 100644 index 58fd8c7d0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; - -public interface TransportHandler { - - /** - * Invoked when the channel associated with the given connectionId is - * active. - */ - void onChannelActive(ConnectionId connectionId); - - /** - * Invoked when the channel associated with the given - * connectionId is inactive. No further requests will come from this - * channel. - */ - void onChannelInactive(ConnectionId connectionId); - - /** - * Invoked when the channel associated with the given connectionId has - * an exception is thrown processing message. - */ - void exceptionCaught(TransportException cause, ConnectionId connectionId); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportProvider.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportProvider.java deleted file mode 100644 index ebd11e13d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -public interface TransportProvider { - - TransportServer createServer(TransportConf conf); - - ClientFactory createClientFactory(TransportConf conf); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportServer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportServer.java deleted file mode 100644 index 6d2fdf64d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportServer.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetSocketAddress; - -import org.apache.hugegraph.computer.core.config.Config; - -/** - * This is used for worker that receives data. - */ -public interface TransportServer { - - /** - * Startup server, return the port listened. - */ - int listen(Config config, MessageHandler serverHandler); - - /** - * Stop the server. - */ - void shutdown(); - - /** - * To check whether the server is bound to use. - * @return true if server is bound. - */ - boolean bound(); - - /** - * Get the bind {@link InetSocketAddress} - */ - InetSocketAddress bindAddress(); - - /** - * Get the bind IP - */ - String ip(); - - /** - * Get the bind port - */ - int port(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportState.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportState.java deleted file mode 100644 index ff269a70c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportState.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -public enum TransportState { - - READY, - START_SENT, - START_RECV, - ESTABLISHED, - FINISH_SENT, - FINISH_RECV -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtil.java deleted file mode 100644 index 57f35fdb3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtil.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.Inet4Address; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.NetworkInterface; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.buffer.ByteBuf; -import io.netty.channel.Channel; -import io.netty.channel.DefaultMaxBytesRecvByteBufAllocator; - -public class TransportUtil { - - private static final Logger LOG = Log.logger(TransportUtil.class); - - private static final long RESOLVE_TIMEOUT = 2000L; - - public static String remoteAddress(Channel channel) { - if (channel == null || channel.remoteAddress() == null) { - return null; - } - if (channel.remoteAddress() instanceof InetSocketAddress) { - return formatAddress((InetSocketAddress) channel.remoteAddress()); - } else { - return channel.toString(); - } - } - - public static ConnectionId remoteConnectionId(Channel channel) { - if (channel == null || channel.remoteAddress() == null) { - return null; - } - InetSocketAddress address = (InetSocketAddress) - channel.remoteAddress(); - return ConnectionId.parseConnectionId(address.getHostName(), - address.getPort()); - } - - public static InetAddress resolvedAddress(String host) { - try { - return InetAddress.getByName(host); - } catch (UnknownHostException e) { - throw new ComputerException("Failed to parse address from '%s'", e, - host); - } - } - - public static InetSocketAddress resolvedSocketAddress(String host, - int port) { - long preResolveHost = System.nanoTime(); - InetSocketAddress resolvedAddress = new InetSocketAddress(host, port); - long resolveTimeMs = (System.nanoTime() - preResolveHost) / 1000000L; - - - if (resolveTimeMs > RESOLVE_TIMEOUT || resolvedAddress.isUnresolved()) { - String status = resolvedAddress.isUnresolved() ? - "failed" : "succeed"; - LOG.warn("DNS resolution {} for '{}' took {} ms", - status, resolvedAddress, resolveTimeMs); - } - return resolvedAddress; - } - - public static String host(InetSocketAddress socketAddress) { - InetAddress address = socketAddress.getAddress(); - if (address != null) { - return address.getHostAddress(); - } - return socketAddress.getHostName(); - } - - public static List getLocalIPAddress() { - List ips = new ArrayList<>(); - try { - Enumeration allNetInterfaces = - NetworkInterface.getNetworkInterfaces(); - InetAddress ip; - while (allNetInterfaces.hasMoreElements()) { - NetworkInterface netInterface = allNetInterfaces.nextElement(); - if (!netInterface.isLoopback() && !netInterface.isVirtual() && - netInterface.isUp()) { - Enumeration addresses = - netInterface.getInetAddresses(); - while (addresses.hasMoreElements()) { - ip = addresses.nextElement(); - if (ip instanceof Inet4Address) { - ips.add(ip.getHostAddress()); - } - } - } - } - return ips; - } catch (Exception e) { - throw new ComputerException("Failed to getLocalIPAddress", e); - } - } - - /** - * Format Address, priority use of IP - */ - public static String formatAddress(InetSocketAddress socketAddress) { - E.checkNotNull(socketAddress, "socketAddress"); - InetAddress address = socketAddress.getAddress(); - String host; - if (address != null && !socketAddress.isUnresolved()) { - host = address.getHostAddress(); - } else { - host = socketAddress.getHostString(); - } - return String.format("%s:%s", host, socketAddress.getPort()); - } - - public static String readString(ByteBuf buf) { - int length = buf.readInt(); - E.checkArgument(length >= 0, - "The length mast be >= 0, but got %s", length); - if (length == 0) { - return ""; - } - byte[] bytes = new byte[length]; - buf.readBytes(bytes); - return StringEncodeUtil.decode(bytes); - } - - public static void writeString(ByteBuf buf, String value) { - E.checkArgumentNotNull(value, "value"); - byte[] encoded = StringEncodeUtil.encode(value); - buf.writeInt(encoded.length); - buf.writeBytes(encoded); - } - - public static void setMaxBytesPerRead(Channel channel, int length) { - DefaultMaxBytesRecvByteBufAllocator recvByteBufAllocator = - channel.config() - .getRecvByteBufAllocator(); - if (recvByteBufAllocator.maxBytesPerIndividualRead() != length) { - recvByteBufAllocator.maxBytesPerReadPair(length, length); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NettyBuffer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NettyBuffer.java deleted file mode 100644 index ce06c39be..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NettyBuffer.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.buffer; - -import java.nio.ByteBuffer; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufUtil; - -public class NettyBuffer implements NetworkBuffer { - - private final ByteBuf buf; - - public NettyBuffer(ByteBuf buf) { - this.buf = buf; - } - - @Override - public int length() { - return this.buf.readableBytes(); - } - - @Override - public NetworkBuffer retain() { - this.buf.retain(); - return this; - } - - @Override - public NetworkBuffer release() { - this.buf.release(); - return this; - } - - @Override - public int referenceCount() { - return this.buf.refCnt(); - } - - /** - * NOTE: It will trigger copy when this.buf.nioBufferCount > 1 - */ - @Override - public ByteBuffer nioByteBuffer() { - return this.buf.nioBuffer(); - } - - @Override - public ByteBuf nettyByteBuf() { - return this.buf.duplicate(); - } - - @Override - public byte[] copyToByteArray() { - return ByteBufUtil.getBytes(this.buf, - this.buf.readerIndex(), - this.buf.readableBytes(), - true); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBuffer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBuffer.java deleted file mode 100644 index 8b9aba642..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBuffer.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.buffer; - -import java.nio.ByteBuffer; - -import io.netty.buffer.ByteBuf; - -/** - * This interface provides an immutable view for data in the form of bytes - * with reference counting. - * - * The implementation should specify how the data is provided: - * - * - {@link NioBuffer}: data backed by a NIO ByteBuffer - * - {@link NettyBuffer}: data backed by a Netty ByteBuf - * - {@link FileRegionBuffer}: data backed by a File Region - */ -public interface NetworkBuffer { - - /** - * Number of bytes of the data. - */ - int length(); - - /** - * Increase the reference count by one if applicable. - */ - NetworkBuffer retain(); - - /** - * If applicable, decrease the reference count by one and deallocates - * the buffer if the reference count reaches zero. - */ - NetworkBuffer release(); - - /** - * Returns the reference count. - */ - int referenceCount(); - - /** - * Exposes this buffer's data as an NIO ByteBuffer. - * Changing the position and limit of the returned ByteBuffer should not - * affect the content of this buffer. - */ - ByteBuffer nioByteBuffer(); - - /** - * Convert the buffer into an ByteBuf object, used to write the data out. - */ - ByteBuf nettyByteBuf(); - - /** - * Copy to a new byte[] - */ - byte[] copyToByteArray(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NioBuffer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NioBuffer.java deleted file mode 100644 index 6b1e57eba..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NioBuffer.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.buffer; - -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicInteger; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; - -public class NioBuffer implements NetworkBuffer { - - private final ByteBuffer buffer; - private final AtomicInteger referenceCount; - - public NioBuffer(ByteBuffer buffer) { - this.buffer = buffer; - this.referenceCount = new AtomicInteger(1); - } - - @Override - public int length() { - return this.buffer.remaining(); - } - - @Override - public NetworkBuffer retain() { - this.referenceCount.incrementAndGet(); - return this; - } - - @Override - public NetworkBuffer release() { - this.referenceCount.decrementAndGet(); - return this; - } - - @Override - public int referenceCount() { - return this.referenceCount.get(); - } - - @Override - public ByteBuffer nioByteBuffer() { - return this.buffer.duplicate(); - } - - @Override - public ByteBuf nettyByteBuf() { - return Unpooled.wrappedBuffer(this.buffer); - } - - @Override - public byte[] copyToByteArray() { - byte[] bytes = new byte[this.buffer.remaining()]; - this.buffer.duplicate().get(bytes); - return bytes; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManager.java deleted file mode 100644 index d25e18f5e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManager.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.connection; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportServer; - -/** - * This is used for unified manage server and client connection. - */ -public interface ConnectionManager { - - /** - * Start the server, return the port listened. - * This method is called only once. - */ - int startServer(Config config, MessageHandler serverHandler); - - /** - * Return the only one listened server. - */ - TransportServer getServer(); - - /** - * Shutdown the server. - */ - void shutdownServer(); - - /** - * Initialize the client connection manager. - * This method is called only once. - */ - void initClientManager(Config config, ClientHandler clientHandler); - - /** - * Get a {@link TransportClient} instance from the connection pool first. - * If it is not found or not active, create a new one. - * @param connectionId {@link ConnectionId} - */ - TransportClient getOrCreateClient(ConnectionId connectionId) - throws TransportException; - - /** - * Get a {@link TransportClient} instance from the connection pool first. - * If {it is not found or not active, create a new one. - * @param host the hostName or Ip - * @param port the port - */ - TransportClient getOrCreateClient(String host, int port) - throws TransportException; - - /** - * Close a client from the {@link ConnectionManager} - * @param connectionId {@link ConnectionId} - */ - void closeClient(ConnectionId connectionId); - - /** - * Shutdown the client connection manager. - */ - void shutdownClients(); - - /** - * Shutdown the client connection manager and server. - */ - void shutdown(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/TransportConnectionManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/TransportConnectionManager.java deleted file mode 100644 index 692c1b956..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/connection/TransportConnectionManager.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.connection; - -import java.util.Iterator; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ClientFactory; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportProvider; -import org.apache.hugegraph.computer.core.network.TransportServer; -import org.apache.hugegraph.util.E; - -public class TransportConnectionManager implements ConnectionManager { - - private TransportServer server; - private ClientFactory clientFactory; - private ClientHandler clientHandler; - private final ConcurrentHashMap clients; - - public TransportConnectionManager() { - this.clients = new ConcurrentHashMap<>(); - } - - @Override - public synchronized int startServer(Config config, - MessageHandler serverHandler) { - E.checkArgument(this.server == null, - "The TransportServer has already been listened"); - E.checkArgumentNotNull(serverHandler, - "The serverHandler param can't be null"); - TransportConf conf = TransportConf.wrapConfig(config); - TransportServer server = conf.transportProvider().createServer(conf); - int bindPort = server.listen(config, serverHandler); - this.server = server; - return bindPort; - } - - @Override - public TransportServer getServer() { - E.checkArgument(this.server != null && this.server.bound(), - "The TransportServer has not been initialized yet"); - return this.server; - } - - @Override - public void shutdownServer() { - if (this.server != null) { - this.server.shutdown(); - this.server = null; - } - } - - @Override - public synchronized void initClientManager(Config config, - ClientHandler clientHandler) { - E.checkArgument(this.clientFactory == null, - "The clientManager has already been initialized"); - E.checkArgumentNotNull(clientHandler, - "The clientHandler parameter can't be null"); - TransportConf conf = TransportConf.wrapConfig(config); - TransportProvider provider = conf.transportProvider(); - ClientFactory factory = provider.createClientFactory(conf); - factory.init(); - this.clientFactory = factory; - this.clientHandler = clientHandler; - } - - @Override - public TransportClient getOrCreateClient(ConnectionId connectionId) - throws TransportException { - E.checkArgument(this.clientFactory != null, - "The clientManager has not been initialized yet"); - TransportClient client = this.clients.get(connectionId); - if (client == null) { - // Create the client if we don't have it yet. - ClientFactory clientFactory = this.clientFactory; - TransportClient newClient = clientFactory.createClient( - connectionId, this.clientHandler); - this.clients.putIfAbsent(connectionId, newClient); - client = this.clients.get(connectionId); - } - return client; - } - - @Override - public TransportClient getOrCreateClient(String host, int port) - throws TransportException { - E.checkArgument(this.clientFactory != null, - "The clientManager has not been initialized yet"); - ConnectionId connectionId = ConnectionId.parseConnectionId(host, port); - return this.getOrCreateClient(connectionId); - } - - @Override - public void closeClient(ConnectionId connectionId) { - TransportClient client = this.clients.remove(connectionId); - if (client != null) { - client.close(); - } - } - - @Override - public void shutdownClients() { - if (this.clientFactory != null) { - this.clientFactory.close(); - this.clientFactory = null; - } - - if (!this.clients.isEmpty()) { - Iterator> - iterator = this.clients.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry next = iterator.next(); - TransportClient client = next.getValue(); - if (client != null) { - client.close(); - } - iterator.remove(); - } - } - } - - @Override - public void shutdown() { - this.shutdownClients(); - this.shutdownServer(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AbstractMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AbstractMessage.java deleted file mode 100644 index 242a4001f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AbstractMessage.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; - -import io.netty.buffer.ByteBuf; - -/** - * Abstract class for messages which optionally - * contain sequenceNumber, partition, body. - *

- * HugeGraph:// - * - * 0 2 3 4 - * +---------------------------------------------------+ - * 0 | magic 2byte | version 1byte | message-type 1byte | - * +---------------------------------------------------+ - * 4 | sequence-number 4byte | - * +---------------------------------------------------+ - * 8 | partition 4byte | - * +---------------------------------------------------+ - * 12 | body-length 4byte | - * +---------------------------------------------------+ - * 16 | body-content(length: body-length) | - * +---------------------------------------------------+ - *

- */ -public abstract class AbstractMessage implements Message { - - /* - * Header: - * magic(2) version(1) message-type (1) seq(4) partition(4) body-length(4) - */ - public static final int HEADER_LENGTH = 2 + 1 + 1 + 4 + 4 + 4; - public static final int OFFSET_BODY_LENGTH = HEADER_LENGTH - 4; - public static final int LENGTH_BODY_LENGTH = 4; - public static final int MAX_MESSAGE_LENGTH = Integer.MAX_VALUE; - - // MAGIC_NUMBER = "HG" - public static final short MAGIC_NUMBER = 0x4847; - public static final byte PROTOCOL_VERSION = 1; - - public static final int UNKNOWN_SEQ = -1; - public static final int START_SEQ = 0; - - private final int sequenceNumber; - private final int partition; - private final int bodyLength; - private final NetworkBuffer body; - - protected AbstractMessage() { - this(UNKNOWN_SEQ); - } - - protected AbstractMessage(int sequenceNumber) { - this(sequenceNumber, 0); - } - - protected AbstractMessage(int sequenceNumber, int partition) { - this(sequenceNumber, partition, null); - } - - protected AbstractMessage(int sequenceNumber, NetworkBuffer body) { - this(sequenceNumber, 0, body); - } - - protected AbstractMessage(NetworkBuffer body) { - this(UNKNOWN_SEQ, 0, body); - } - - protected AbstractMessage(int sequenceNumber, int partition, - NetworkBuffer body) { - this.sequenceNumber = sequenceNumber; - this.partition = partition; - if (body != null) { - this.body = body; - this.bodyLength = body.length(); - } else { - this.body = null; - this.bodyLength = 0; - } - } - - @Override - public NetworkBuffer encode(ByteBuf buf) { - this.encodeHeader(buf); - - int bodyStart = buf.writerIndex(); - NetworkBuffer networkBuffer = this.encodeBody(buf); - int bodyEnd = buf.writerIndex(); - - int bodyLength; - if (networkBuffer != null) { - assert bodyStart == bodyEnd; - bodyLength = networkBuffer.length(); - } else { - bodyLength = bodyEnd - bodyStart; - } - - int lastWriteIndex = buf.writerIndex(); - try { - buf.resetWriterIndex(); - buf.writeInt(bodyLength); - } finally { - buf.writerIndex(lastWriteIndex); - } - return networkBuffer; - } - - /** - * Only serializes the header of this message by writing - * into the given ByteBuf. - */ - protected void encodeHeader(ByteBuf buf) { - buf.writeShort(MAGIC_NUMBER); - buf.writeByte(PROTOCOL_VERSION); - buf.writeByte(this.type().code()); - buf.writeInt(this.sequenceNumber()); - buf.writeInt(this.partition()); - buf.markWriterIndex(); - // This is an placeholder - buf.writeInt(0); - } - - /** - * Only serializes the body of this message by writing - * into the given ByteBuf or return the body buffer. - */ - protected NetworkBuffer encodeBody(ByteBuf buf) { - return this.body(); - } - - @Override - public int sequenceNumber() { - return this.sequenceNumber; - } - - @Override - public int partition() { - return this.partition; - } - - @Override - public boolean hasBody() { - return this.body != null && this.bodyLength > 0; - } - - @Override - public NetworkBuffer body() { - return this.hasBody() ? this.body : null; - } - - @Override - public void release() { - if (this.hasBody()) { - this.body.release(); - } - } - - protected static void assertExtraHeader(ByteBuf buf) { - int sequenceNumber = buf.readInt(); - assert sequenceNumber == UNKNOWN_SEQ; - int partition = buf.readInt(); - assert partition == 0; - int bodyLength = buf.readInt(); - assert bodyLength == 0; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) - .append("messageType", this.type()) - .append("sequenceNumber", this.sequenceNumber()) - .append("partition", this.partition()) - .append("hasBody", this.hasBody()) - .append("bodyLength", this.bodyLength) - .toString(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AckMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AckMessage.java deleted file mode 100644 index 89824876c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/AckMessage.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import io.netty.buffer.ByteBuf; - -public class AckMessage extends AbstractMessage implements ResponseMessage { - - public AckMessage(int ackId) { - super(ackId); - } - - public AckMessage(int ackId, int partition) { - super(ackId, partition); - } - - @Override - public MessageType type() { - return MessageType.ACK; - } - - public static AckMessage parseFrom(ByteBuf buf) { - int ackId = buf.readInt(); - int partition = buf.readInt(); - // Skip body-length - buf.skipBytes(Integer.BYTES); - return new AckMessage(ackId, partition); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/DataMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/DataMessage.java deleted file mode 100644 index cc11aaed4..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/DataMessage.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NettyBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.util.E; - -import io.netty.buffer.ByteBuf; - -public class DataMessage extends AbstractMessage implements RequestMessage { - - private final MessageType type; - - public DataMessage(MessageType type, int requestId, - int partition, NetworkBuffer data) { - super(requestId, partition, data); - E.checkArgument(requestId > 0, - "The data requestId must be > 0, but got %s", - requestId); - this.type = type; - } - - @Override - public MessageType type() { - return this.type; - } - - /** - * Decoding uses the given ByteBuf as our data. - */ - public static DataMessage parseWithMemoryBuffer(MessageType type, - ByteBuf buf) { - int requestId = buf.readInt(); - int partition = buf.readInt(); - - int bodyLength = buf.readInt(); - // Slice body and retain it, the readIndex of buf will auto to body end - ByteBuf bodySlice = buf.readRetainedSlice(bodyLength); - NetworkBuffer networkBuffer = new NettyBuffer(bodySlice); - return new DataMessage(type, requestId, partition, networkBuffer); - } - - public static DataMessage parseWithFileRegion(MessageType type, - ByteBuf buf) { - int requestId = buf.readInt(); - int partition = buf.readInt(); - - int bodyLength = buf.readInt(); - return new DataMessage(type, requestId, partition, - new FileRegionBuffer(bodyLength)); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FailMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FailMessage.java deleted file mode 100644 index 44d810661..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FailMessage.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.util.E; - -import io.netty.buffer.ByteBuf; - -@Deprecated -public class FailMessage extends AbstractMessage implements ResponseMessage { - - private final int errorCode; - private final String message; - - public FailMessage(int ackId, int errorCode, String message) { - super(ackId); - E.checkNotNull(message, "message"); - this.errorCode = errorCode; - this.message = message; - } - - @Override - public MessageType type() { - return MessageType.FAIL; - } - - @Override - protected NetworkBuffer encodeBody(ByteBuf buf) { - buf.writeInt(this.errorCode); - TransportUtil.writeString(buf, this.message); - return null; - } - - public static FailMessage parseFrom(ByteBuf buf) { - int failAckId = buf.readInt(); - int failCode = 0; - String failMsg = null; - // Skip partition - buf.skipBytes(Integer.BYTES); - - // Decode body buffer - int bodyLength = buf.readInt(); - if (bodyLength >= Integer.BYTES) { - failCode = buf.readInt(); - failMsg = TransportUtil.readString(buf); - } - - return new FailMessage(failAckId, failCode, failMsg); - } - - public static int remainingBytes(ByteBuf buf) { - buf.markReaderIndex(); - // Skip ackId - buf.skipBytes(Integer.BYTES); - // Skip partition - buf.skipBytes(Integer.BYTES); - int bodyLength = buf.readInt(); - buf.resetReaderIndex(); - return bodyLength - buf.readableBytes(); - } - - public String message() { - return this.message; - } - - public int errorCode() { - return this.errorCode; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FinishMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FinishMessage.java deleted file mode 100644 index 5deed75b6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/FinishMessage.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import io.netty.buffer.ByteBuf; - -public class FinishMessage extends AbstractMessage implements RequestMessage { - - public FinishMessage(int finishId) { - super(finishId); - } - - @Override - public MessageType type() { - return MessageType.FINISH; - } - - public static FinishMessage parseFrom(ByteBuf buf) { - int ackId = buf.readInt(); - - int partition = buf.readInt(); - assert partition == 0; - int bodyLength = buf.readInt(); - assert bodyLength == 0; - return new FinishMessage(ackId); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/Message.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/Message.java deleted file mode 100644 index 1bffd0ad3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/Message.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; - -import io.netty.buffer.ByteBuf; - -public interface Message { - - /** - * Serializes this object by writing into the given ByteBuf. - * - * @param buf {@link ByteBuf} the header buffer, if use zero-copy. - * Otherwise it will contain header and body. - * @return {@link NetworkBuffer} body buffer, if use zero-copy - */ - NetworkBuffer encode(ByteBuf buf); - - /** - * Used to identify this message type. - */ - MessageType type(); - - /** - * Whether to include the body of the message - * in the same frame as the message. - */ - boolean hasBody(); - - /** - * An optional body for the message. - */ - NetworkBuffer body(); - - /** - * The message sequence number - */ - int sequenceNumber(); - - /** - * The partition id - */ - int partition(); - - /** - * Release the message - */ - void release(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/MessageType.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/MessageType.java deleted file mode 100644 index aac18fd09..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/MessageType.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import static org.apache.hugegraph.computer.core.network.message.MessageType.Category.CONTROL; -import static org.apache.hugegraph.computer.core.network.message.MessageType.Category.DATA; - -import org.apache.hugegraph.computer.core.common.SerialEnum; - -import io.netty.buffer.ByteBuf; - -public enum MessageType implements SerialEnum { - - MSG(0x01, DATA), - VERTEX(0x02, DATA), - EDGE(0x03, DATA), - ACK(0x80, CONTROL), - FAIL(0X81, CONTROL), - START(0x82, CONTROL), - FINISH(0x83, CONTROL), - PING(0x84, CONTROL), - PONG(0x85, CONTROL), - PAUSE_RECV(0x86, CONTROL), - RESUME_RECV(0x87, CONTROL); - - static { - SerialEnum.register(MessageType.class); - } - - private final byte code; - private final Category category; - - MessageType(int code, Category category) { - assert code >= 0 && code <= 255; - this.code = (byte) code; - this.category = category; - } - - @Override - public byte code() { - return this.code; - } - - public Category category() { - return this.category; - } - - public static MessageType decode(ByteBuf buf) { - byte code = buf.readByte(); - return SerialEnum.fromCode(MessageType.class, code); - } - - public enum Category { - DATA, - CONTROL - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PingMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PingMessage.java deleted file mode 100644 index 44758ab9b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PingMessage.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import io.netty.buffer.ByteBuf; - -public class PingMessage extends AbstractMessage implements RequestMessage { - - public static final PingMessage INSTANCE = new PingMessage(); - - private PingMessage() { - } - - @Override - public MessageType type() { - return MessageType.PING; - } - - public static PingMessage parseFrom(ByteBuf buf) { - assertExtraHeader(buf); - return INSTANCE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PongMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PongMessage.java deleted file mode 100644 index 31a5a845b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/PongMessage.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import io.netty.buffer.ByteBuf; - -public class PongMessage extends AbstractMessage implements ResponseMessage { - - public static final PongMessage INSTANCE = new PongMessage(); - - private PongMessage() { - } - - @Override - public MessageType type() { - return MessageType.PONG; - } - - public static PongMessage parseFrom(ByteBuf buf) { - assertExtraHeader(buf); - return INSTANCE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/RequestMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/RequestMessage.java deleted file mode 100644 index b4cc4de3c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/RequestMessage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -public interface RequestMessage extends Message { - - default int requestId() { - return this.sequenceNumber(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/ResponseMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/ResponseMessage.java deleted file mode 100644 index c5fb7a353..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/ResponseMessage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -public interface ResponseMessage extends Message { - - default int ackId() { - return this.sequenceNumber(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/StartMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/StartMessage.java deleted file mode 100644 index 4f07e02d2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/message/StartMessage.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.message; - -import io.netty.buffer.ByteBuf; - -public class StartMessage extends AbstractMessage implements RequestMessage { - - public static final StartMessage INSTANCE = new StartMessage(); - - public StartMessage() { - super(START_SEQ); - } - - @Override - public MessageType type() { - return MessageType.START; - } - - public static StartMessage parseFrom(ByteBuf buf) { - int sequenceNumber = buf.readInt(); - assert sequenceNumber == START_SEQ; - int partition = buf.readInt(); - assert partition == 0; - int bodyLength = buf.readInt(); - assert bodyLength == 0; - return INSTANCE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNettyHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNettyHandler.java deleted file mode 100644 index 6224f3f00..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNettyHandler.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.common.exception.IllegalArgException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportHandler; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.message.AckMessage; -import org.apache.hugegraph.computer.core.network.message.DataMessage; -import org.apache.hugegraph.computer.core.network.message.FailMessage; -import org.apache.hugegraph.computer.core.network.message.FinishMessage; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.message.PingMessage; -import org.apache.hugegraph.computer.core.network.message.PongMessage; -import org.apache.hugegraph.computer.core.network.message.StartMessage; -import org.apache.hugegraph.computer.core.network.session.TransportSession; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.SimpleChannelInboundHandler; - -public abstract class AbstractNettyHandler - extends SimpleChannelInboundHandler { - - private static final Logger LOG = Log.logger(AbstractNettyHandler.class); - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Message msg) - throws Exception { - Channel channel = ctx.channel(); - - if (LOG.isDebugEnabled()) { - LOG.debug("Receive remote message from '{}', message: {}", - TransportUtil.remoteAddress(channel), msg); - } - - MessageType msgType = msg.type(); - - if (msgType.category() == MessageType.Category.DATA) { - this.processDataMessage(ctx, channel, (DataMessage) msg); - return; - } - - switch (msgType) { - case START: - this.processStartMessage(ctx, channel, (StartMessage) msg); - break; - case FAIL: - this.processFailMessage(ctx, channel, (FailMessage) msg); - break; - case ACK: - this.processAckMessage(ctx, channel, (AckMessage) msg); - break; - case FINISH: - this.processFinishMessage(ctx, channel, (FinishMessage) msg); - break; - case PING: - this.processPingMessage(ctx, channel, (PingMessage) msg); - break; - case PONG: - this.processPongMessage(ctx, channel, (PongMessage) msg); - break; - default: - throw new IllegalArgException("Unknown message type: %s", - msgType); - } - } - - protected abstract void processStartMessage(ChannelHandlerContext ctx, - Channel channel, - StartMessage startMessage); - - protected abstract void processFinishMessage(ChannelHandlerContext ctx, - Channel channel, - FinishMessage finishMessage); - - protected abstract void processDataMessage(ChannelHandlerContext ctx, - Channel channel, - DataMessage dataMessage); - - protected abstract void processAckMessage(ChannelHandlerContext ctx, - Channel channel, - AckMessage ackMessage); - - protected void processPingMessage(ChannelHandlerContext ctx, - Channel channel, - PingMessage pingMessage) { - ctx.writeAndFlush(PongMessage.INSTANCE) - .addListener(ChannelFutureListener.CLOSE_ON_FAILURE); - } - - protected void processPongMessage(ChannelHandlerContext ctx, - Channel channel, - PongMessage pongMessage) { - // No need to deal with the pongMessage, it only for keep-alive - } - - protected void processFailMessage(ChannelHandlerContext ctx, - Channel channel, - FailMessage failMessage) { - int errorCode = failMessage.errorCode(); - - TransportException exception = new TransportException( - errorCode, - "Remote error from '%s', cause: %s", - TransportUtil.remoteAddress(channel), - failMessage.message()); - - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - this.transportHandler().exceptionCaught(exception, connectionId); - } - - @Deprecated - protected void ackFailMessage(ChannelHandlerContext ctx, int failId, - int errorCode, String message) { - long timeout = this.session().conf().writeSocketTimeout(); - FailMessage failMessage = new FailMessage(failId, errorCode, message); - ctx.writeAndFlush(failMessage).awaitUninterruptibly(timeout); - } - - protected abstract TransportSession session(); - - protected abstract TransportHandler transportHandler(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/BufAllocatorFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/BufAllocatorFactory.java deleted file mode 100644 index 7d2cb6ab8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/BufAllocatorFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.PooledByteBufAllocator; - -public class BufAllocatorFactory { - - public static ByteBufAllocator createBufAllocator() { - // TODO: Pooled allocators - return PooledByteBufAllocator.DEFAULT; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ChannelFutureListenerOnWrite.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ChannelFutureListenerOnWrite.java deleted file mode 100644 index 9e54a1693..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ChannelFutureListenerOnWrite.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportHandler; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; - -public class ChannelFutureListenerOnWrite implements ChannelFutureListener { - - private static final Logger LOG = - Log.logger(ChannelFutureListenerOnWrite.class); - - private final TransportHandler handler; - - protected ChannelFutureListenerOnWrite(TransportHandler handler) { - this.handler = handler; - } - - @Override - public void operationComplete(ChannelFuture future) { - if (future.isDone()) { - Channel channel = future.channel(); - this.onDone(channel, future); - } - } - - public void onDone(Channel channel, ChannelFuture future) { - if (future.isSuccess()) { - this.onSuccess(channel, future); - } else { - this.onFailure(channel, future.cause()); - } - } - - public void onSuccess(Channel channel, ChannelFuture future) { - if (LOG.isDebugEnabled()) { - LOG.debug("Successfully send data to '{}'", - TransportUtil.remoteAddress(channel)); - } - } - - public void onFailure(Channel channel, Throwable cause) { - TransportException exception; - if (cause instanceof TransportException) { - exception = (TransportException) cause; - } else { - exception = new TransportException( - "Failed to send data to '%s': %s", - cause, TransportUtil.remoteAddress(channel), - cause.getMessage()); - } - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - this.handler.exceptionCaught(exception, connectionId); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandler.java deleted file mode 100644 index 16d6889d0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandler.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.message.PingMessage; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelDuplexHandler; -import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.timeout.IdleStateEvent; -import io.netty.util.AttributeKey; - -/** - * Heart beat triggered. - * Send ping message - */ -@ChannelHandler.Sharable -public class HeartbeatHandler extends ChannelDuplexHandler { - - private static final Logger LOG = Log.logger(HeartbeatHandler.class); - - public static final AttributeKey TIMEOUT_HEARTBEAT_COUNT = - AttributeKey.valueOf("TIMEOUT_HEARTBEAT_COUNT"); - public static final AttributeKey MAX_TIMEOUT_HEARTBEAT_COUNT = - AttributeKey.valueOf("MAX_TIMEOUT_HEARTBEAT_COUNT"); - - @Override - public void userEventTriggered(final ChannelHandlerContext ctx, - Object event) throws Exception { - if (event instanceof IdleStateEvent) { - Channel channel = ctx.channel(); - Integer maxTimeoutCount = channel.attr(MAX_TIMEOUT_HEARTBEAT_COUNT) - .get(); - assert maxTimeoutCount != null; - - Integer lastTimeoutCount = channel.attr(TIMEOUT_HEARTBEAT_COUNT) - .get(); - assert lastTimeoutCount != null; - - int timeoutHeartbeatCount = lastTimeoutCount + 1; - - if (timeoutHeartbeatCount > maxTimeoutCount) { - LOG.info("The number of timeouts for waiting " + - "heartbeat response more than the " + - "max_timeout_heartbeat_count, close connection to " + - "'{}' from client side, count: {}", - TransportUtil.remoteAddress(channel), - timeoutHeartbeatCount); - - ctx.close(); - } else { - if (LOG.isDebugEnabled()) { - LOG.debug("Client IdleStateEvent trigger to send ping to " + - "'{}', count: {}", - TransportUtil.remoteAddress(channel), - timeoutHeartbeatCount); - } - - ctx.writeAndFlush(PingMessage.INSTANCE) - .addListener(ChannelFutureListener.CLOSE_ON_FAILURE); - - channel.attr(TIMEOUT_HEARTBEAT_COUNT) - .set(timeoutHeartbeatCount); - } - } else { - super.userEventTriggered(ctx, event); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactory.java deleted file mode 100644 index 2caaa40ff..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactory.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ClientFactory; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.ByteBufAllocator; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelOption; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.WriteBufferWaterMark; -import io.netty.channel.socket.SocketChannel; - -public class NettyClientFactory implements ClientFactory { - - private static final Logger LOG = Log.logger(NettyClientFactory.class); - - private final TransportConf conf; - private final ByteBufAllocator bufAllocator; - private final NettyProtocol protocol; - - private EventLoopGroup workerGroup; - private Bootstrap bootstrap; - private int connectTimeoutMs; - - public NettyClientFactory(TransportConf conf) { - this(conf, BufAllocatorFactory.createBufAllocator()); - } - - public NettyClientFactory(TransportConf conf, - ByteBufAllocator bufAllocator) { - this.conf = conf; - this.bufAllocator = bufAllocator; - this.protocol = new NettyProtocol(this.conf); - } - - @Override - public synchronized void init() { - E.checkArgument(this.bootstrap == null, - "The NettyClientFactory has already been initialized"); - this.connectTimeoutMs = Math.toIntExact( - this.conf.clientConnectionTimeout()); - - this.workerGroup = NettyEventLoopUtil.createEventLoop( - this.conf.ioMode(), this.conf.clientThreads(), - TransportConf.CLIENT_THREAD_GROUP_NAME); - - this.bootstrap = new Bootstrap(); - this.bootstrap.group(this.workerGroup); - this.bootstrap - .channel(NettyEventLoopUtil.clientChannelClass(this.conf.ioMode())); - - this.bootstrap.option(ChannelOption.ALLOCATOR, this.bufAllocator); - this.bootstrap.option(ChannelOption.TCP_NODELAY, true); - this.bootstrap.option(ChannelOption.SO_KEEPALIVE, - this.conf.tcpKeepAlive()); - this.bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, - this.connectTimeoutMs); - - if (this.conf.sizeReceiveBuffer() > 0) { - this.bootstrap.option(ChannelOption.SO_RCVBUF, - this.conf.sizeReceiveBuffer()); - } - - if (this.conf.sizeSendBuffer() > 0) { - this.bootstrap.option(ChannelOption.SO_SNDBUF, - this.conf.sizeSendBuffer()); - } - - // Set low water mark and high water mark for the write buffer. - WriteBufferWaterMark bufferWaterMark = new WriteBufferWaterMark( - this.conf.writeBufferLowMark(), - this.conf.writeBufferHighMark()); - this.bootstrap.option(ChannelOption.WRITE_BUFFER_WATER_MARK, - bufferWaterMark); - - this.bootstrap.handler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel channel) { - NettyClientFactory.this.protocol - .initializeClientPipeline(channel); - } - }); - } - - /** - * Create a new {@link TransportClient} to the remote address. - */ - @Override - public TransportClient createClient(ConnectionId connectionId, - ClientHandler handler) - throws TransportException { - InetSocketAddress address = connectionId.socketAddress(); - LOG.debug("Creating new client connection to '{}'", connectionId); - - Channel channel = this.doConnectWithRetries(address, - this.conf.networkRetries(), - this.connectTimeoutMs); - NettyTransportClient client = new NettyTransportClient(channel, - connectionId, - this, handler); - LOG.debug("Successfully created a new client to '{}'", connectionId); - return client; - } - - /** - * Connect to the remote server. - */ - protected Channel doConnect(InetSocketAddress address, int connectTimeoutMs) - throws TransportException { - E.checkArgumentNotNull(this.bootstrap, - "The NettyClientFactory has not been " + - "initialized yet"); - long preConnect = System.nanoTime(); - - String formatAddress = TransportUtil.formatAddress(address); - LOG.debug("ConnectTimeout of address [{}] is [{}]", formatAddress, - connectTimeoutMs); - - ChannelFuture future = this.bootstrap.connect(address); - - boolean success = future.awaitUninterruptibly(connectTimeoutMs, - TimeUnit.MILLISECONDS); - - if (!future.isDone()) { - throw new TransportException( - "Create connection to '%s' timeout!", formatAddress); - } - - if (future.isCancelled()) { - throw new TransportException( - "Create connection to '%s' cancelled by user!", - formatAddress); - } - - if (future.cause() != null) { - throw new TransportException( - "Failed to create connection to '%s', caused by: %s", - future.cause(), formatAddress, future.cause().getMessage()); - } - - if (!success || !future.isSuccess()) { - throw new TransportException( - "Failed to create connection to '%s'", - formatAddress); - } - - long postConnect = System.nanoTime(); - - LOG.info("Successfully created connection to '{}' after {} ms", - formatAddress, (postConnect - preConnect) / 1000000L); - return future.channel(); - } - - /** - * Connect to the remote server with retries - */ - protected Channel doConnectWithRetries(InetSocketAddress address, - int retryNumber, - int connectTimeoutMs) - throws TransportException { - String formatAddress = TransportUtil.formatAddress(address); - int tried = 0; - while (true) { - try { - return this.doConnect(address, connectTimeoutMs); - } catch (IOException e) { - tried++; - if (tried > retryNumber) { - LOG.warn("Failed to connect to '{}', Giving up after {} " + - "retries", formatAddress, retryNumber, e); - throw e; - } else { - LOG.debug("Failed to connect to '{}' with retries times " + - "{}, Retrying...", formatAddress, tried, e); - } - } - } - } - - public TransportConf conf() { - return this.conf; - } - - protected NettyProtocol protocol() { - return this.protocol; - } - - @Override - public void close() { - if (this.workerGroup != null && !this.workerGroup.isShuttingDown()) { - this.workerGroup.shutdownGracefully(); - this.workerGroup = null; - } - this.bootstrap = null; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientHandler.java deleted file mode 100644 index 8e27296cd..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientHandler.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.AckMessage; -import org.apache.hugegraph.computer.core.network.message.DataMessage; -import org.apache.hugegraph.computer.core.network.message.FinishMessage; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.StartMessage; -import org.apache.hugegraph.computer.core.network.session.ClientSession; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandlerContext; - -public class NettyClientHandler extends AbstractNettyHandler { - - private final NettyTransportClient client; - - public NettyClientHandler(NettyTransportClient client) { - this.client = client; - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Message msg) - throws Exception { - // Reset the number of client timeout heartbeat - ctx.channel().attr(HeartbeatHandler.TIMEOUT_HEARTBEAT_COUNT).set(0); - - super.channelRead0(ctx, msg); - } - - @Override - protected void processStartMessage(ChannelHandlerContext ctx, - Channel channel, - StartMessage startMessage) { - throw new UnsupportedOperationException( - "Client does not support processStartMessage()"); - } - - @Override - protected void processFinishMessage(ChannelHandlerContext ctx, - Channel channel, - FinishMessage finishMessage) { - throw new UnsupportedOperationException( - "Client does not support processFinishMessage()"); - } - - @Override - protected void processDataMessage(ChannelHandlerContext ctx, - Channel channel, - DataMessage dataMessage) { - throw new UnsupportedOperationException( - "Client does not support processDataMessage()"); - } - - @Override - protected void processAckMessage(ChannelHandlerContext ctx, - Channel channel, AckMessage ackMessage) { - int ackId = ackMessage.ackId(); - assert ackId > AbstractMessage.UNKNOWN_SEQ; - this.session().onRecvAck(ackId); - this.client.checkAndNotifySendAvailable(); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - this.transportHandler().onChannelInactive(this.client.connectionId()); - super.channelInactive(ctx); - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, - Throwable cause) { - TransportException exception; - if (cause instanceof TransportException) { - exception = (TransportException) cause; - } else { - exception = new TransportException( - "%s when the client receive data from '%s'", - cause, cause.getMessage(), - TransportUtil.remoteAddress(ctx.channel())); - } - - this.client.clientHandler().exceptionCaught(exception, - this.client.connectionId()); - } - - @Override - protected ClientSession session() { - return this.client.clientSession(); - } - - @Override - protected ClientHandler transportHandler() { - return this.client.clientHandler(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEventLoopUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEventLoopUtil.java deleted file mode 100644 index 3a053db06..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEventLoopUtil.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.util.concurrent.ThreadFactory; - -import org.apache.hugegraph.computer.core.common.exception.IllegalArgException; -import org.apache.hugegraph.computer.core.network.IOMode; - -import io.netty.bootstrap.ServerBootstrap; -import io.netty.channel.Channel; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.ServerChannel; -import io.netty.channel.epoll.EpollChannelOption; -import io.netty.channel.epoll.EpollEventLoopGroup; -import io.netty.channel.epoll.EpollMode; -import io.netty.channel.epoll.EpollServerSocketChannel; -import io.netty.channel.epoll.EpollSocketChannel; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.nio.NioServerSocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.util.concurrent.DefaultThreadFactory; - -public class NettyEventLoopUtil { - - private static ThreadFactory createNamedThreadFactory(String prefix) { - return new DefaultThreadFactory(prefix, true); - } - - /** - * Create a Netty EventLoopGroup based on the IOMode. - */ - public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, - String prefix) { - ThreadFactory threadFactory = createNamedThreadFactory(prefix); - - switch (mode) { - case NIO: - return new NioEventLoopGroup(numThreads, threadFactory); - case EPOLL: - return new EpollEventLoopGroup(numThreads, threadFactory); - default: - throw new IllegalArgException("Unknown io mode: " + mode); - } - } - - /** - * Returns the correct (client) SocketChannel class based on IOMode. - */ - public static Class clientChannelClass(IOMode mode) { - switch (mode) { - case NIO: - return NioSocketChannel.class; - case EPOLL: - return EpollSocketChannel.class; - default: - throw new IllegalArgException("Unknown io mode: " + mode); - } - } - - /** - * Returns the correct ServerSocketChannel class based on IOMode. - */ - public static Class serverChannelClass( - IOMode mode) { - switch (mode) { - case NIO: - return NioServerSocketChannel.class; - case EPOLL: - return EpollServerSocketChannel.class; - default: - throw new IllegalArgException("Unknown io mode: " + mode); - } - } - - /** - * Use {@link EpollMode#LEVEL_TRIGGERED} for server bootstrap - * if level trigger enabled by system properties, - * otherwise use {@link EpollMode#EDGE_TRIGGERED}. - */ - public static void enableTriggeredMode(IOMode ioMode, boolean enableLt, - ServerBootstrap serverBootstrap) { - if (serverBootstrap == null || ioMode != IOMode.EPOLL) { - return; - } - if (enableLt) { - serverBootstrap.childOption(EpollChannelOption.EPOLL_MODE, - EpollMode.LEVEL_TRIGGERED); - } else { - serverBootstrap.childOption(EpollChannelOption.EPOLL_MODE, - EpollMode.EDGE_TRIGGERED); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyProtocol.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyProtocol.java deleted file mode 100644 index b0585e17f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyProtocol.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.netty.codec.FrameDecoder; -import org.apache.hugegraph.computer.core.network.netty.codec.MessageDecoder; -import org.apache.hugegraph.computer.core.network.netty.codec.MessageEncoder; -import org.apache.hugegraph.computer.core.network.netty.codec.PreciseFrameDecoder; -import org.apache.hugegraph.computer.core.network.session.ServerSession; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.channel.ChannelPipeline; -import io.netty.handler.timeout.IdleStateHandler; - -/** - * Defines the server and client channel handlers, i.e. the protocol. - */ -public class NettyProtocol { - - private static final ChannelHandler SLOT_HANDLER = new SLOT_HANDLER(); - private static final int DISABLE_IDLE_TIME = 0; - - private static final ServerIdleHandler SERVER_IDLE_HANDLER = - new ServerIdleHandler(); - private static final HeartbeatHandler HEART_BEAT_HANDLER = - new HeartbeatHandler(); - - protected static final String CLIENT_HANDLER_NAME = "networkClientHandler"; - protected static final String SERVER_HANDLER_NAME = "networkServerHandler"; - - private final TransportConf conf; - - public NettyProtocol(TransportConf conf) { - this.conf = conf; - } - - /** - * Initialize the server channel handlers. - * - *
-     *     +----------------------+
-     *     | File / Local Buffer  |
-     *     +-----------+----------+
-     *                /|\ (2) zero-copy
-     * +---------------+---------------------------------------------------+
-     * |               |        SERVER CHANNEL PIPELINE                    |
-     * |               |                                                   |
-     * |    +----------+----------+ (3)write ack +----------------------+  |
-     * |    | ServerHandler       |------------->| MessageEncoder       |  |
-     * |    +----------+----------+              +-----------+----------+  |
-     * |              /|\                                 \|/              |
-     * |               |                                   |               |
-     * |    +----------+----------+                        |               |
-     * |    | MessageDecoder      |                        |               |
-     * |    +----------+----------+                        |               |
-     * |              /|\                                  |               |
-     * |               |                                   |               |
-     * |   +-----------+-----------+                       |               |
-     * |   | PreciseFrameDecoder   |                       |               |
-     * |   +-----------+-----------+                       |               |
-     * |              /|\                                  |               |
-     * +---------------+-----------------------------------+---------------+
-     * |               | (1) read request                 \|/              |
-     * +---------------+-----------------------------------+---------------+
-     * |               |                                   |               |
-     * |       [ Socket.read() ]                    [ Socket.write() ]     |
-     * |                                                                   |
-     * |  Netty Internal I/O Threads (Transport Implementation)            |
-     * +-------------------------------------------------------------------+
-     * 
- */ - protected void initializeServerPipeline(Channel channel, - MessageHandler handler) { - ChannelPipeline pipeline = channel.pipeline(); - - pipeline.addLast("encoder", MessageEncoder.INSTANCE); - - if (this.conf.recvBufferFileMode()) { - pipeline.addLast("frameDecoder", new PreciseFrameDecoder()); - pipeline.addLast("decoder", MessageDecoder.INSTANCE_FILE_REGION); - } else { - pipeline.addLast("frameDecoder", new FrameDecoder()); - pipeline.addLast("decoder", MessageDecoder.INSTANCE_MEMORY_BUFFER); - } - - pipeline.addLast("serverIdleStateHandler", - this.newServerIdleStateHandler()); - // NOTE: The heartbeatHandler can reuse of a server - pipeline.addLast("serverIdleHandler", SERVER_IDLE_HANDLER); - - pipeline.addLast(SERVER_HANDLER_NAME, - this.newNettyServerHandler(handler)); - } - - - /** - * Initialize the client channel handlers. - * - *
-     *                                         +----------------------+
-     *                                         | request client       |
-     *                                         +-----------+----------+
-     *                                                     | (1) send message
-     * +-------------------------------------------------------------------+
-     * |                        CLIENT CHANNEL PIPELINE    |               |
-     * |                                                  \|/              |
-     * |    +---------------------+            +----------------------+    |
-     * |    | ClientHandler       |            | MessageEncoder       |    |
-     * |    +----------+----------+            +-----------+----------+    |
-     * |              /|\                                 \|/              |
-     * |               |                                   |               |
-     * |    +----------+----------+                        |               |
-     * |    | MessageDecoder      |                        |               |
-     * |    +----------+----------+                        |               |
-     * |              /|\                                  |               |
-     * |               |                                   |               |
-     * |   +-----------+-----------+                       |               |
-     * |   | FrameDecoder          |                       |               |
-     * |   +-----------+-----------+                       |               |
-     * |              /|\                                  |               |
-     * +---------------+-----------------------------------+---------------+
-     * |               | (3) server response              \|/ (2) client request
-     * +---------------+-----------------------------------+---------------+
-     * |               |                                   |               |
-     * |       [ Socket.read() ]                    [ Socket.write() ]     |
-     * |                                                                   |
-     * |  Netty Internal I/O Threads (Transport Implementation)            |
-     * +-------------------------------------------------------------------+
-     * 
- */ - protected void initializeClientPipeline(Channel channel) { - ChannelPipeline pipeline = channel.pipeline(); - - pipeline.addLast("encoder", MessageEncoder.INSTANCE); - - pipeline.addLast("frameDecoder", new FrameDecoder()); - - pipeline.addLast("decoder", MessageDecoder.INSTANCE_MEMORY_BUFFER); - - pipeline.addLast("clientIdleStateHandler", - this.newClientIdleStateHandler()); - // NOTE: The heartbeatHandler can reuse - pipeline.addLast("heartbeatHandler", HEART_BEAT_HANDLER); - - // NOTE: It will be replaced when the client object is initialized! - pipeline.addLast(CLIENT_HANDLER_NAME, SLOT_HANDLER); - - // Init heartbeat times - channel.attr(HeartbeatHandler.TIMEOUT_HEARTBEAT_COUNT).set(0); - channel.attr(HeartbeatHandler.MAX_TIMEOUT_HEARTBEAT_COUNT) - .set(this.conf.maxTimeoutHeartbeatCount()); - } - - protected void replaceClientHandler(Channel channel, - NettyTransportClient client) { - ChannelPipeline pipeline = channel.pipeline(); - pipeline.replace(CLIENT_HANDLER_NAME, CLIENT_HANDLER_NAME, - new NettyClientHandler(client)); - } - - private NettyServerHandler newNettyServerHandler(MessageHandler handler) { - ServerSession serverSession = new ServerSession(this.conf); - return new NettyServerHandler(serverSession, handler); - } - - private IdleStateHandler newServerIdleStateHandler() { - long timeout = this.conf.serverIdleTimeout(); - return new IdleStateHandler(timeout, DISABLE_IDLE_TIME, - DISABLE_IDLE_TIME, TimeUnit.MILLISECONDS); - } - - private IdleStateHandler newClientIdleStateHandler() { - long interval = this.conf.heartbeatInterval(); - return new IdleStateHandler(interval, DISABLE_IDLE_TIME, - DISABLE_IDLE_TIME, TimeUnit.MILLISECONDS); - } - - @ChannelHandler.Sharable - private static class SLOT_HANDLER extends ChannelInboundHandlerAdapter { - // It is an empty handler, only for placeholder to replace it later - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyServerHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyServerHandler.java deleted file mode 100644 index 66222595e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyServerHandler.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.AckMessage; -import org.apache.hugegraph.computer.core.network.message.DataMessage; -import org.apache.hugegraph.computer.core.network.message.FinishMessage; -import org.apache.hugegraph.computer.core.network.message.StartMessage; -import org.apache.hugegraph.computer.core.network.session.ServerSession; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.EventLoop; -import io.netty.channel.socket.SocketChannel; -import io.netty.util.concurrent.ScheduledFuture; - -public class NettyServerHandler extends AbstractNettyHandler { - - private static final long INITIAL_DELAY = 0L; - - private final MessageHandler handler; - private final ServerSession serverSession; - private final ChannelFutureListenerOnWrite listenerOnWrite; - private ScheduledFuture respondAckTask; - - public NettyServerHandler(ServerSession serverSession, - MessageHandler handler) { - this.serverSession = serverSession; - this.handler = handler; - this.listenerOnWrite = new ChannelFutureListenerOnWrite(this.handler); - } - - @Override - protected void processStartMessage(ChannelHandlerContext ctx, - Channel channel, - StartMessage startMessage) { - this.serverSession.onRecvStateStart(); - this.ackStartMessage(ctx); - } - - @Override - protected void processFinishMessage(ChannelHandlerContext ctx, - Channel channel, - FinishMessage finishMessage) { - int finishId = finishMessage.requestId(); - boolean needAckFinish = this.serverSession.onRecvStateFinish(finishId); - if (needAckFinish) { - this.ackFinishMessage(ctx, this.serverSession.finishId()); - } - } - - @Override - protected void processDataMessage(ChannelHandlerContext ctx, - Channel channel, - DataMessage dataMessage) { - NetworkBuffer body = dataMessage.body(); - try { - int requestId = dataMessage.requestId(); - this.serverSession.onRecvData(requestId); - if (body instanceof FileRegionBuffer) { - this.processFileRegionBuffer(ctx, channel, dataMessage, - (FileRegionBuffer) body); - } else { - this.handler.handle(dataMessage.type(), dataMessage.partition(), - dataMessage.body()); - this.serverSession.onHandledData(requestId); - } - } finally { - body.release(); - } - } - - private void processFileRegionBuffer(ChannelHandlerContext ctx, - Channel channel, - DataMessage dataMessage, - FileRegionBuffer fileRegionBuffer) { - // Optimize Value of max bytes of next read - TransportUtil.setMaxBytesPerRead(channel, fileRegionBuffer.length()); - String outputPath = this.handler.genOutputPath(dataMessage.type(), - dataMessage.partition()); - /* - * Submit zero-copy task to EventLoop, it will be executed next time - * network data is received. - */ - ChannelFuture channelFuture = fileRegionBuffer.transformFromChannel( - (SocketChannel) channel, outputPath); - - channelFuture.addListener((ChannelFutureListener) future -> { - try { - if (future.isSuccess()) { - this.handler.handle(dataMessage.type(), - dataMessage.partition(), - dataMessage.body()); - this.serverSession.onHandledData( - dataMessage.requestId()); - } else { - this.exceptionCaught(ctx, future.cause()); - } - // Reset max bytes next read to length of frame - TransportUtil.setMaxBytesPerRead(future.channel(), - AbstractMessage.HEADER_LENGTH); - future.channel().unsafe().recvBufAllocHandle().reset( - future.channel().config()); - dataMessage.release(); - } catch (Throwable throwable) { - this.exceptionCaught(ctx, throwable); - } - }); - } - - @Override - protected void processAckMessage(ChannelHandlerContext ctx, Channel channel, - AckMessage ackMessage) { - throw new UnsupportedOperationException( - "Server does not support processAckMessage()"); - } - - private void ackStartMessage(ChannelHandlerContext ctx) { - AckMessage startAck = new AckMessage(AbstractMessage.START_SEQ); - ctx.writeAndFlush(startAck).addListener(this.listenerOnWrite); - this.serverSession.completeStateStart(); - - Channel channel = ctx.channel(); - this.handler.onStarted(TransportUtil.remoteConnectionId(channel)); - - // Add an schedule task to check and respond ack - if (this.respondAckTask == null) { - EventLoop eventExecutors = ctx.channel().eventLoop(); - this.respondAckTask = eventExecutors.scheduleWithFixedDelay( - () -> this.checkAndRespondAck(ctx), - INITIAL_DELAY, - this.serverSession.minAckInterval(), - TimeUnit.MILLISECONDS); - } - } - - private void ackFinishMessage(ChannelHandlerContext ctx, - int finishId) { - AckMessage finishAck = new AckMessage(finishId); - ctx.writeAndFlush(finishAck).addListener(this.listenerOnWrite); - this.serverSession.completeStateFinish(); - - Channel channel = ctx.channel(); - this.handler.onFinished(TransportUtil.remoteConnectionId(channel)); - - // Cancel and remove the task to check respond ack - if (this.respondAckTask != null) { - this.respondAckTask.cancel(false); - this.respondAckTask = null; - } - } - - private void ackDataMessage(ChannelHandlerContext ctx, int ackId) { - AckMessage ackMessage = new AckMessage(ackId); - ctx.writeAndFlush(ackMessage).addListener(this.listenerOnWrite); - this.serverSession.onDataAckSent(ackId); - } - - private void checkAndRespondAck(ChannelHandlerContext ctx) { - if (this.serverSession.needAckFinish()) { - this.ackFinishMessage(ctx, this.serverSession.finishId()); - } else if (this.serverSession.needAckData()) { - this.ackDataMessage(ctx, this.serverSession.maxHandledId()); - } - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - Channel channel = ctx.channel(); - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - this.handler.onChannelActive(connectionId); - super.channelActive(ctx); - } - - @Override - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - Channel channel = ctx.channel(); - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - this.handler.onChannelInactive(connectionId); - super.channelInactive(ctx); - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { - TransportException exception; - Channel channel = ctx.channel(); - if (cause instanceof TransportException) { - exception = (TransportException) cause; - } else { - exception = new TransportException( - "%s when the server receive data from '%s'", - cause, cause.getMessage(), - TransportUtil.remoteAddress(channel)); - } - - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - this.handler.exceptionCaught(exception, connectionId); - } - - @Override - protected ServerSession session() { - return this.serverSession; - } - - @Override - protected MessageHandler transportHandler() { - return this.handler; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClient.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClient.java deleted file mode 100644 index 53ba15c2e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClient.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportState; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.session.ClientSession; -import org.apache.hugegraph.util.E; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; - -public class NettyTransportClient implements TransportClient { - - private final Channel channel; - private final ConnectionId connectionId; - private final NettyClientFactory clientFactory; - private final ClientHandler handler; - private final ClientSession session; - private final long timeoutSyncRequest; - private final long timeoutFinishSession; - private boolean preSendAvailable; - - protected NettyTransportClient(Channel channel, ConnectionId connectionId, - NettyClientFactory clientFactory, - ClientHandler clientHandler) { - E.checkArgumentNotNull(clientHandler, - "The clientHandler parameter can't be null"); - this.initChannel(channel, connectionId, clientFactory.protocol(), - clientHandler); - this.channel = channel; - this.connectionId = connectionId; - this.clientFactory = clientFactory; - this.handler = clientHandler; - - TransportConf conf = this.clientFactory.conf(); - this.timeoutSyncRequest = conf.timeoutSyncRequest(); - this.timeoutFinishSession = conf.timeoutFinishSession(); - this.session = new ClientSession(conf, this.createSendFunction()); - this.preSendAvailable = false; - } - - public Channel channel() { - return this.channel; - } - - @Override - public ConnectionId connectionId() { - return this.connectionId; - } - - @Override - public InetSocketAddress remoteAddress() { - return (InetSocketAddress) this.channel.remoteAddress(); - } - - @Override - public boolean active() { - return this.channel.isActive(); - } - - @Override - public boolean sessionActive() { - if (!this.active()) { - return false; - } - TransportState state = this.session.state(); - return state == TransportState.ESTABLISHED || - state == TransportState.FINISH_SENT; - } - - protected ClientSession clientSession() { - return this.session; - } - - public ClientHandler clientHandler() { - return this.handler; - } - - private void initChannel(Channel channel, ConnectionId connectionId, - NettyProtocol protocol, ClientHandler handler) { - protocol.replaceClientHandler(channel, this); - // Client stateReady notice - handler.onChannelActive(connectionId); - } - - private Function> createSendFunction() { - ChannelFutureListener listener = new ClientChannelListenerOnWrite(); - return message -> { - ChannelFuture channelFuture = this.channel.writeAndFlush(message); - return channelFuture.addListener(listener); - }; - } - - @Override - public CompletableFuture startSessionAsync() { - return this.session.startAsync(); - } - - @Override - public void startSession() throws TransportException { - this.startSession(this.timeoutSyncRequest); - } - - private void startSession(long timeout) throws TransportException { - this.session.start(timeout); - } - - @Override - public boolean send(MessageType messageType, int partition, - ByteBuffer buffer) throws TransportException { - if (!this.checkSendAvailable()) { - return false; - } - this.session.sendAsync(messageType, partition, buffer); - return true; - } - - @Override - public CompletableFuture finishSessionAsync() { - return this.session.finishAsync(); - } - - @Override - public void finishSession() throws TransportException { - this.finishSession(this.timeoutFinishSession); - } - - private void finishSession(long timeout) throws TransportException { - this.session.finish(timeout); - } - - protected boolean checkSendAvailable() { - return !this.session.flowBlocking() && this.channel.isWritable(); - } - - protected void checkAndNotifySendAvailable() { - boolean sendAvailable = this.checkSendAvailable(); - if (sendAvailable && !this.preSendAvailable) { - this.handler.sendAvailable(this.connectionId); - } - this.preSendAvailable = sendAvailable; - } - - @Override - public void close() { - if (this.channel != null) { - long timeout = this.clientFactory.conf().closeTimeout(); - this.channel.close().awaitUninterruptibly(timeout, - TimeUnit.MILLISECONDS); - } - } - - private class ClientChannelListenerOnWrite - extends ChannelFutureListenerOnWrite { - - ClientChannelListenerOnWrite() { - super(NettyTransportClient.this.handler); - } - - @Override - public void onSuccess(Channel channel, ChannelFuture future) { - super.onSuccess(channel, future); - NettyTransportClient.this.checkAndNotifySendAvailable(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportProvider.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportProvider.java deleted file mode 100644 index b7e873fe2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportProvider.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.network.ClientFactory; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportProvider; -import org.apache.hugegraph.computer.core.network.TransportServer; - -import io.netty.buffer.ByteBufAllocator; - -public class NettyTransportProvider implements TransportProvider { - - @Override - public TransportServer createServer(TransportConf conf) { - ByteBufAllocator bufAllocator = - BufAllocatorFactory.createBufAllocator(); - return new NettyTransportServer(bufAllocator); - } - - @Override - public ClientFactory createClientFactory(TransportConf conf) { - ByteBufAllocator bufAllocator = - BufAllocatorFactory.createBufAllocator(); - return new NettyClientFactory(conf, bufAllocator); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServer.java deleted file mode 100644 index 734342fc4..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServer.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.Closeable; -import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.IOMode; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportServer; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.bootstrap.ServerBootstrap; -import io.netty.buffer.ByteBufAllocator; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelOption; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.socket.SocketChannel; - -public class NettyTransportServer implements TransportServer, Closeable { - - private static final Logger LOG = Log.logger(NettyTransportServer.class); - - private static final String BOSS_THREAD_GROUP_NAME = - TransportConf.SERVER_THREAD_GROUP_NAME + "-boss"; - private static final String WORKER_THREAD_GROUP_NAME = - TransportConf.SERVER_THREAD_GROUP_NAME + "-worker"; - private static final int BOSS_THREADS = 1; - - private final ByteBufAllocator bufAllocator; - - private TransportConf conf; - private ServerBootstrap bootstrap; - private ChannelFuture bindFuture; - private InetSocketAddress bindAddress; - - public NettyTransportServer() { - this(BufAllocatorFactory.createBufAllocator()); - } - - public NettyTransportServer(ByteBufAllocator bufAllocator) { - this.bufAllocator = bufAllocator; - } - - @Override - public synchronized int listen(Config config, - MessageHandler serverHandler) { - E.checkArgument(this.bindFuture == null, - "The TransportServer has already been listened"); - E.checkArgumentNotNull(serverHandler, - "The serverHandler param can't be null"); - final long start = System.currentTimeMillis(); - - this.init(config); - - // Child channel pipeline for accepted connections - NettyProtocol protocol = new NettyProtocol(this.conf); - ServerChannelInitializer initializer = new ServerChannelInitializer( - protocol, serverHandler); - this.bootstrap.childHandler(initializer); - - // Start Server - this.bindFuture = this.bootstrap.bind().syncUninterruptibly(); - this.bindAddress = (InetSocketAddress) - this.bindFuture.channel().localAddress(); - - final long duration = System.currentTimeMillis() - start; - LOG.info("The TransportServer started on address {}, took {} ms", - TransportUtil.formatAddress(this.bindAddress), duration); - - return this.bindAddress.getPort(); - } - - private void init(Config config) { - this.conf = TransportConf.wrapConfig(config); - this.bootstrap = new ServerBootstrap(); - - IOMode ioMode = this.conf.ioMode(); - - // Create Netty EventLoopGroup - EventLoopGroup bossGroup = NettyEventLoopUtil.createEventLoop( - ioMode, BOSS_THREADS, - BOSS_THREAD_GROUP_NAME); - EventLoopGroup workerGroup = NettyEventLoopUtil.createEventLoop( - ioMode, this.conf.serverThreads(), - WORKER_THREAD_GROUP_NAME); - this.bootstrap.group(bossGroup, workerGroup); - this.bootstrap.channel(NettyEventLoopUtil.serverChannelClass(ioMode)); - - // Server bind address - this.bootstrap.localAddress(this.conf.serverAddress(), - this.conf.serverPort()); - - // The port can still be bound when the socket is in the TIME_WAIT state - this.bootstrap.option(ChannelOption.SO_REUSEADDR, true); - - this.bootstrap.option(ChannelOption.ALLOCATOR, this.bufAllocator); - this.bootstrap.childOption(ChannelOption.ALLOCATOR, this.bufAllocator); - this.bootstrap.childOption(ChannelOption.TCP_NODELAY, true); - this.bootstrap.childOption(ChannelOption.SO_KEEPALIVE, - this.conf.tcpKeepAlive()); - - boolean enableLt = this.conf.epollLevelTriggered(); - // Must be use level trigger mode on zero-copy mode - if (this.conf.recvBufferFileMode()) { - enableLt = true; - } - // Enable trigger mode for epoll if need - NettyEventLoopUtil.enableTriggeredMode(ioMode, enableLt, - this.bootstrap); - - if (this.conf.maxSynBacklog() > 0) { - this.bootstrap.option(ChannelOption.SO_BACKLOG, - this.conf.maxSynBacklog()); - } - - if (this.conf.sizeReceiveBuffer() > 0) { - this.bootstrap.childOption(ChannelOption.SO_RCVBUF, - this.conf.sizeReceiveBuffer()); - } - - if (this.conf.sizeSendBuffer() > 0) { - this.bootstrap.childOption(ChannelOption.SO_SNDBUF, - this.conf.sizeSendBuffer()); - } - } - - public TransportConf conf() { - return this.conf; - } - - @Override - public int port() { - return this.bindAddress().getPort(); - } - - @Override - public String ip() { - InetAddress address = this.bindAddress().getAddress(); - return address == null ? null : address.getHostAddress(); - } - - @Override - public InetSocketAddress bindAddress() { - E.checkArgumentNotNull(this.bindAddress, - "The TransportServer has not been initialized"); - return this.bindAddress; - } - - @Override - public void shutdown() { - try { - this.close(); - } catch (IOException e) { - throw new ComputerException("Failed to shutdown server", e); - } - } - - @Override - public boolean bound() { - return this.bindFuture != null && this.bindFuture.channel() != null && - this.bindFuture.channel().isActive(); - } - - @Override - public void close() throws IOException { - if (this.bindFuture != null) { - long timeout = this.conf.closeTimeout(); - this.bindFuture.channel().close() - .awaitUninterruptibly(timeout, - TimeUnit.MILLISECONDS); - this.bindFuture = null; - } - if (this.bootstrap != null && this.bootstrap.config().group() != null) { - this.bootstrap.config().group().shutdownGracefully(); - } - if (this.bootstrap != null && - this.bootstrap.config().childGroup() != null) { - this.bootstrap.config().childGroup().shutdownGracefully(); - } - this.bootstrap = null; - } - - private static class ServerChannelInitializer - extends ChannelInitializer { - - private final MessageHandler handler; - private final NettyProtocol protocol; - - public ServerChannelInitializer(NettyProtocol protocol, - MessageHandler handler) { - this.handler = handler; - this.protocol = protocol; - } - - @Override - public void initChannel(SocketChannel channel) { - this.protocol.initializeServerPipeline(channel, this.handler); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ServerIdleHandler.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ServerIdleHandler.java deleted file mode 100644 index 30d0a5d0c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/ServerIdleHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.channel.ChannelDuplexHandler; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.timeout.IdleStateEvent; - -/** - * Server Idle handler. - * In the server side, the connection will be closed - * if it is idle for a certain period of time. - */ -@ChannelHandler.Sharable -public class ServerIdleHandler extends ChannelDuplexHandler { - - private static final Logger LOG = Log.logger(ServerIdleHandler.class); - - @Override - public void userEventTriggered(final ChannelHandlerContext ctx, Object evt) - throws Exception { - if (evt instanceof IdleStateEvent) { - try { - LOG.info("Connection idle, close connection to '{}' from " + - "server side", - TransportUtil.remoteAddress(ctx.channel())); - ctx.close(); - } catch (Exception e) { - LOG.warn("Exception caught when closing " + - "connection to '{}' in ServerIdleHandler", - TransportUtil.remoteAddress(ctx.channel()), e); - throw e; - } - } else { - super.userEventTriggered(ctx, evt); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/FrameDecoder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/FrameDecoder.java deleted file mode 100644 index 42f6ea433..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/FrameDecoder.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty.codec; - -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.LengthFieldBasedFrameDecoder; - -/** - * Frame decoder based on netty's {@link LengthFieldBasedFrameDecoder} - */ -public class FrameDecoder extends LengthFieldBasedFrameDecoder { - - private static final Logger LOG = Log.logger(FrameDecoder.class); - - private static final int LENGTH_ADJUSTMENT = 0; - private static final int INITIAL_BYTES_TO_STRIP = 0; - - public FrameDecoder() { - super(AbstractMessage.MAX_MESSAGE_LENGTH, - AbstractMessage.OFFSET_BODY_LENGTH, - AbstractMessage.LENGTH_BODY_LENGTH, - LENGTH_ADJUSTMENT, INITIAL_BYTES_TO_STRIP); - } - - @Override - protected Object decode(ChannelHandlerContext ctx, ByteBuf in) - throws Exception { - ByteBuf msg = (ByteBuf) super.decode(ctx, in); - if (msg == null) { - return null; - } - - int magicNumber = msg.readShort(); - if (magicNumber != AbstractMessage.MAGIC_NUMBER) { - LOG.warn("Network stream corrupted: received incorrect " + - "magic number: {}, remote address: {}", - magicNumber, TransportUtil.remoteAddress(ctx.channel())); - msg.release(); - return null; - } - int version = msg.readByte(); - if (version != AbstractMessage.PROTOCOL_VERSION) { - LOG.warn("Network stream corrupted: received incorrect " + - "protocol version: {}, remote address: {}", - version, TransportUtil.remoteAddress(ctx.channel())); - msg.release(); - return null; - } - // TODO: improve it use shared memory - return msg; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageDecoder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageDecoder.java deleted file mode 100644 index 015fce59f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageDecoder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty.codec; - -import org.apache.hugegraph.computer.core.common.exception.IllegalArgException; -import org.apache.hugegraph.computer.core.network.message.AckMessage; -import org.apache.hugegraph.computer.core.network.message.DataMessage; -import org.apache.hugegraph.computer.core.network.message.FinishMessage; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.message.PingMessage; -import org.apache.hugegraph.computer.core.network.message.PongMessage; -import org.apache.hugegraph.computer.core.network.message.StartMessage; - -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; - -/** - * Decoder used by the client side to encode server-to-client responses. - * This encoder is stateless so it is safe to be shared by multiple threads. - */ -@ChannelHandler.Sharable -public class MessageDecoder extends ChannelInboundHandlerAdapter { - - public static final MessageDecoder INSTANCE_FILE_REGION = - new MessageDecoder(true); - public static final MessageDecoder INSTANCE_MEMORY_BUFFER = - new MessageDecoder(false); - - private final boolean fileRegionMode; - - private MessageDecoder(boolean fileRegionMode) { - this.fileRegionMode = fileRegionMode; - } - - @Override - public void channelRead(ChannelHandlerContext ctx, Object msg) { - ByteBuf buf = (ByteBuf) msg; - Message message; - try { - MessageType msgType = MessageType.decode(buf); - message = this.decode(ctx, msgType, buf); - if (message == null) { - return; - } - } finally { - buf.release(); - } - - ctx.fireChannelRead(message); - } - - private Message decode(ChannelHandlerContext ctx, - MessageType msgType, - ByteBuf in) { - if (msgType.category() == MessageType.Category.DATA) { - // Decode data message - if (this.fileRegionMode) { - return DataMessage.parseWithFileRegion(msgType, in); - } else { - return DataMessage.parseWithMemoryBuffer(msgType, in); - } - } - switch (msgType) { - case START: - return StartMessage.parseFrom(in); - case ACK: - return AckMessage.parseFrom(in); - case FINISH: - return FinishMessage.parseFrom(in); - case PING: - return PingMessage.parseFrom(in); - case PONG: - return PongMessage.parseFrom(in); - default: - throw new IllegalArgException("Can't decode message type: %s", - msgType); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageEncoder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageEncoder.java deleted file mode 100644 index 8f49a1c05..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/MessageEncoder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty.codec; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.Message; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufAllocator; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelOutboundHandlerAdapter; -import io.netty.channel.ChannelPromise; -import io.netty.util.concurrent.PromiseCombiner; - -/** - * Encoder used by the server side to encode server-to-client responses. - * This encoder is stateless so it is safe to be shared by multiple threads. - */ -@ChannelHandler.Sharable -public class MessageEncoder extends ChannelOutboundHandlerAdapter { - - public static final MessageEncoder INSTANCE = new MessageEncoder(); - - private MessageEncoder() { - } - - @Override - public void write(ChannelHandlerContext ctx, Object obj, - ChannelPromise promise) throws Exception { - if (obj instanceof Message) { - Message message = (Message) obj; - this.writeMessage(ctx, message, promise, ctx.alloc()); - } else { - ctx.write(obj, promise); - } - } - - private void writeMessage(ChannelHandlerContext ctx, - Message message, ChannelPromise promise, - ByteBufAllocator allocator) - throws TransportException { - ByteBuf bufHeader = null; - try { - PromiseCombiner combiner = new PromiseCombiner(ctx.executor()); - bufHeader = allocator.directBuffer(AbstractMessage.HEADER_LENGTH); - NetworkBuffer bodyBuffer = message.encode(bufHeader); - ChannelFuture headerWriteFuture = ctx.write(bufHeader); - /* - * Released bufHeader after in ctx.write(), set bufHeader = null - * to not release again - */ - bufHeader = null; - combiner.add(headerWriteFuture); - if (bodyBuffer != null) { - ByteBuf bodyBuf = bodyBuffer.nettyByteBuf(); - // Will call bodyBuf.release() in ctx.write(), retain() first - bodyBuffer.retain(); - combiner.add(ctx.write(bodyBuf)); - } - combiner.finish(promise); - } catch (Throwable e) { - throw new TransportException("Failed to encode message, " + - "message type: %s", e, message.type()); - } finally { - if (bufHeader != null) { - bufHeader.release(); - } - message.release(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/PreciseFrameDecoder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/PreciseFrameDecoder.java deleted file mode 100644 index afb162977..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/netty/codec/PreciseFrameDecoder.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty.codec; - -import java.util.List; - -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.DefaultMaxBytesRecvByteBufAllocator; -import io.netty.handler.codec.ByteToMessageDecoder; - -/** - * The {@link PreciseFrameDecoder} is a frame Decoder that precisely controls - * the number of the max bytes per read, the decoder should be chosen when - * receiving data using zero-copy. - */ -public class PreciseFrameDecoder extends ByteToMessageDecoder { - - private static final Logger LOG = Log.logger(PreciseFrameDecoder.class); - - public PreciseFrameDecoder() { - super.setSingleDecode(true); - } - - @Override - public void channelActive(ChannelHandlerContext ctx) throws Exception { - super.channelActive(ctx); - DefaultMaxBytesRecvByteBufAllocator recvByteBufAllocator = - new DefaultMaxBytesRecvByteBufAllocator(AbstractMessage.HEADER_LENGTH, - AbstractMessage.HEADER_LENGTH); - ctx.channel().config().setRecvByteBufAllocator(recvByteBufAllocator); - } - - @Override - protected void decode(ChannelHandlerContext ctx, ByteBuf in, - List out) throws Exception { - Object decoded = this.decode(ctx, in); - if (decoded != null) { - out.add(decoded); - } - } - - protected ByteBuf decode(ChannelHandlerContext ctx, ByteBuf in) { - if (in.readableBytes() < AbstractMessage.HEADER_LENGTH) { - int nextMaxBytesRead = - AbstractMessage.HEADER_LENGTH - in.readableBytes(); - TransportUtil.setMaxBytesPerRead(ctx.channel(), nextMaxBytesRead); - return null; - } - - // reset max bytes next read to length of frame - TransportUtil.setMaxBytesPerRead(ctx.channel(), - AbstractMessage.HEADER_LENGTH); - - assert in.readableBytes() <= AbstractMessage.HEADER_LENGTH; - - ByteBuf buf = in.readRetainedSlice(AbstractMessage.HEADER_LENGTH); - - int magicNumber = buf.readShort(); - if (magicNumber != AbstractMessage.MAGIC_NUMBER) { - LOG.warn("Network stream corrupted: received incorrect " + - "magic number: {}, remote address: {}", - magicNumber, TransportUtil.remoteAddress(ctx.channel())); - buf.release(); - return null; - } - int version = buf.readByte(); - if (version != AbstractMessage.PROTOCOL_VERSION) { - LOG.warn("Network stream corrupted: received incorrect " + - "protocol version: {}, remote address: {}", - version, TransportUtil.remoteAddress(ctx.channel())); - buf.release(); - return null; - } - - return buf; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ClientSession.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ClientSession.java deleted file mode 100644 index 44732ad40..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ClientSession.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.session; - -import java.nio.ByteBuffer; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; -import java.util.function.Function; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportState; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NioBuffer; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.DataMessage; -import org.apache.hugegraph.computer.core.network.message.FinishMessage; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.message.StartMessage; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class ClientSession extends TransportSession { - - private static final Logger LOG = Log.logger(ClientSession.class); - - private final int maxPendingRequests; - private final int minPendingRequests; - - private final Lock lock; - private volatile boolean flowBlocking; - private final AtomicReference> startedFutureRef; - private final AtomicReference> finishedFutureRef; - private final Function> sendFunction; - - public ClientSession(TransportConf conf, - Function> sendFunction) { - super(conf); - this.maxPendingRequests = this.conf.maxPendingRequests(); - this.minPendingRequests = this.conf.minPendingRequests(); - this.lock = new ReentrantLock(); - this.flowBlocking = false; - this.startedFutureRef = new AtomicReference<>(); - this.finishedFutureRef = new AtomicReference<>(); - this.sendFunction = sendFunction; - } - - @Override - protected void stateReady() { - this.flowBlocking = false; - super.stateReady(); - } - - private void stateStartSent() { - this.maxRequestId = AbstractMessage.START_SEQ; - this.state = TransportState.START_SENT; - } - - private void stateFinishSent(int finishId) { - this.finishId = finishId; - this.state = TransportState.FINISH_SENT; - } - - public synchronized void start(long timeout) throws TransportException { - CompletableFuture startFuture = this.startAsync(); - try { - startFuture.get(timeout, TimeUnit.MILLISECONDS); - } catch (Throwable e) { - this.stateReady(); - if (e instanceof TimeoutException) { - throw new TransportException( - "Timeout(%sms) to wait start-response", timeout); - } else { - throw new TransportException("Failed to wait start-response", - e); - } - } finally { - startFuture.cancel(false); - this.startedFutureRef.compareAndSet(startFuture, null); - } - } - - public synchronized CompletableFuture startAsync() { - E.checkArgument(this.state == TransportState.READY, - "The state must be READY instead of %s " + - "at startAsync()", this.state); - - CompletableFuture startedFuture = new CompletableFuture<>(); - boolean success = this.startedFutureRef.compareAndSet(null, - startedFuture); - E.checkArgument(success, "The startedFutureRef value must be null " + - "at startAsync()"); - - this.stateStartSent(); - try { - this.sendFunction.apply(StartMessage.INSTANCE); - } catch (Throwable e) { - this.stateReady(); - startedFuture.cancel(false); - this.startedFutureRef.compareAndSet(startedFuture, null); - throw e; - } - return startedFuture; - } - - public synchronized void finish(long timeout) throws TransportException { - CompletableFuture finishFuture = this.finishAsync(); - try { - finishFuture.get(timeout, TimeUnit.MILLISECONDS); - } catch (Throwable e) { - this.stateEstablished(); - if (e instanceof TimeoutException) { - throw new TransportException("Timeout(%sms) to wait finish-response", timeout); - } else { - throw new TransportException("Failed to wait finish-response", e); - } - } finally { - this.finishedFutureRef.compareAndSet(finishFuture, null); - } - } - - public synchronized CompletableFuture finishAsync() { - E.checkArgument(this.state == TransportState.ESTABLISHED, - "The state must be ESTABLISHED instead of %s " + - "at finishAsync()", this.state); - - CompletableFuture finishedFuture = new CompletableFuture<>(); - boolean success = this.finishedFutureRef.compareAndSet(null, finishedFuture); - E.checkArgument(success, "The finishedFutureRef value must be null " + - "at finishAsync()"); - - int finishId = this.genFinishId(); - this.stateFinishSent(finishId); - try { - FinishMessage finishMessage = new FinishMessage(finishId); - this.sendFunction.apply(finishMessage); - } catch (Throwable e) { - this.stateEstablished(); - finishedFuture.cancel(false); - this.finishedFutureRef.compareAndSet(finishedFuture, null); - throw e; - } - - return finishedFuture; - } - - public synchronized void sendAsync(MessageType messageType, int partition, - ByteBuffer buffer) { - E.checkArgument(this.state == TransportState.ESTABLISHED, - "The state must be ESTABLISHED instead of %s " + - "at sendAsync()", this.state); - int requestId = this.nextRequestId(); - - NetworkBuffer networkBuffer = new NioBuffer(buffer); - DataMessage dataMessage = new DataMessage(messageType, requestId, - partition, networkBuffer); - - this.sendFunction.apply(dataMessage); - - this.updateFlowBlocking(); - } - - public void onRecvAck(int ackId) { - switch (this.state) { - case START_SENT: - if (ackId == AbstractMessage.START_SEQ) { - this.onRecvStartAck(); - break; - } - case FINISH_SENT: - if (ackId == this.finishId) { - this.onRecvFinishAck(); - } else { - this.onRecvDataAck(ackId); - } - break; - case ESTABLISHED: - this.onRecvDataAck(ackId); - break; - default: - throw new ComputerException("Receive one ack message, but " + - "the state not match, state: %s, " + - "ackId: %s", this.state, ackId); - } - } - - private void onRecvStartAck() { - E.checkArgument(this.state == TransportState.START_SENT, - "The state must be START_SENT instead of %s " + - "at completeStateStart()", this.state); - - this.maxAckId = AbstractMessage.START_SEQ; - - this.stateEstablished(); - - CompletableFuture startedFuture = this.startedFutureRef.get(); - if (startedFuture != null) { - if (!startedFuture.isCancelled()) { - boolean complete = startedFuture.complete(null); - if (!complete) { - LOG.warn("The startedFuture can't be completed"); - } - } - this.startedFutureRef.compareAndSet(startedFuture, null); - } - } - - private void onRecvFinishAck() { - E.checkArgument(this.state == TransportState.FINISH_SENT, - "The state must be FINISH_SENT instead of %s " + - "at completeStateFinish()", this.state); - - this.stateReady(); - - CompletableFuture finishedFuture = this.finishedFutureRef.get(); - if (finishedFuture != null) { - if (!finishedFuture.isCancelled()) { - boolean complete = finishedFuture.complete(null); - if (!complete) { - LOG.warn("The finishedFuture can't be completed"); - } - } - this.finishedFutureRef.compareAndSet(finishedFuture, null); - } - } - - private void onRecvDataAck(int ackId) { - if (ackId > this.maxAckId) { - this.maxAckId = ackId; - } - this.updateFlowBlocking(); - } - - public boolean flowBlocking() { - return this.flowBlocking; - } - - private void updateFlowBlocking() { - this.lock.lock(); - try { - int pendingRequests = this.maxRequestId - this.maxAckId; - - if (pendingRequests >= this.maxPendingRequests) { - this.flowBlocking = true; - } else if (pendingRequests < this.minPendingRequests) { - this.flowBlocking = false; - } - } finally { - this.lock.unlock(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ServerSession.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ServerSession.java deleted file mode 100644 index c3eaa0f93..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/ServerSession.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.session; - -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportState; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.util.E; - -public class ServerSession extends TransportSession { - - private final long minAckInterval; - private volatile int maxHandledId; - - public ServerSession(TransportConf conf) { - super(conf); - this.minAckInterval = this.conf().minAckInterval(); - this.maxHandledId = AbstractMessage.UNKNOWN_SEQ; - } - - @Override - protected void stateReady() { - this.maxHandledId = AbstractMessage.UNKNOWN_SEQ; - super.stateReady(); - } - - public void completeStateStart() { - E.checkArgument(this.state == TransportState.START_RECV, - "The state must be START_RECV instead of %s " + - "at completeStateStart()", this.state); - - this.maxHandledId = AbstractMessage.START_SEQ; - this.maxAckId = AbstractMessage.START_SEQ; - this.stateEstablished(); - } - - public void completeStateFinish() { - E.checkArgument(this.state == TransportState.FINISH_RECV, - "The state must be FINISH_RECV instead of %s " + - "at completeStateFinish()", this.state); - - this.stateReady(); - } - - public void onRecvStateStart() { - E.checkArgument(this.state == TransportState.READY, - "The state must be READY instead of %s " + - "at onRecvStateStart()", this.state); - - this.maxRequestId = AbstractMessage.START_SEQ; - this.state = TransportState.START_RECV; - } - - public boolean onRecvStateFinish(int finishId) { - E.checkArgument(this.state == TransportState.ESTABLISHED, - "The state must be ESTABLISHED instead of %s " + - "at onRecvStateFinish()", this.state); - E.checkArgument(finishId == this.maxRequestId + 1, - "The finishId must be maxRequestId + 1 at " + - "onRecvStateFinish(), finishId: %s, maxRequestId: %s", - finishId, this.maxRequestId); - - this.finishId = finishId; - this.state = TransportState.FINISH_RECV; - return this.needAckFinish(); - } - - public void onRecvData(int requestId) { - E.checkArgument(this.state == TransportState.ESTABLISHED, - "The state must be ESTABLISHED instead of %s " + - "at onRecvData()", this.state); - E.checkArgument(requestId == this.maxRequestId + 1, - "The requestId must be increasing at onRecvData(), " + - "requestId: %s, maxRequestId: %s", requestId, - this.maxRequestId); - - this.maxRequestId = requestId; - } - - public void onHandledData(int requestId) { - E.checkArgument(this.state == TransportState.ESTABLISHED || - this.state == TransportState.FINISH_RECV, - "The state must be ESTABLISHED or FINISH_RECV " + - "instead of %s at onHandledData()", this.state); - - synchronized (this) { - if (requestId > this.maxHandledId) { - this.maxHandledId = requestId; - } - } - } - - public void onDataAckSent(int ackId) { - E.checkArgument(this.state == TransportState.ESTABLISHED || - this.state == TransportState.FINISH_RECV, - "The state must be ESTABLISHED or FINISH_RECV " + - "instead of %s at onDataAckSent()", this.state); - E.checkArgument(ackId > this.maxAckId, - "The ackId must be increasing at onDataAckSent(), " + - "ackId: %s, maxAckId: %s", ackId, this.maxAckId); - - this.maxAckId = ackId; - } - - public boolean needAckFinish() { - if (this.state == TransportState.FINISH_RECV) { - return this.maxHandledId == this.finishId - 1; - } - return false; - } - - public boolean needAckData() { - if (this.state != TransportState.ESTABLISHED) { - return false; - } - return this.maxHandledId > this.maxAckId; - } - - public int maxHandledId() { - return this.maxHandledId; - } - - public long minAckInterval() { - return this.minAckInterval; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LimitedLogOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LimitedLogOutput.java deleted file mode 100644 index dca6aea1d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LimitedLogOutput.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class LimitedLogOutput extends AbstractComputerOutput { - - private static final Logger LOG = Log.logger(LimitedLogOutput.class); - - private static final String CONF_LIMIT_OUTPUT_PER_PARTITION_KEY = - "output.limit_logt_output"; - private static final int CONF_LIMIT_OUTPUT_PER_PARTITION_DEFAULT = 10; - - private int limit; - private int logged; - - @Override - public void init(Config config, int partition) { - super.init(config, partition); - this.limit = config.getInt(CONF_LIMIT_OUTPUT_PER_PARTITION_KEY, - CONF_LIMIT_OUTPUT_PER_PARTITION_DEFAULT); - this.logged = 0; - } - - @Override - public void write(Vertex vertex) { - if (this.logged < this.limit) { - LOG.info("'{}': '{}'", vertex.id(), vertex.value().string()); - this.logged++; - } - } - - @Override - public void close() { - LOG.info("End write back partition {}", this.partition()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LogOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LogOutput.java deleted file mode 100644 index ecc7ddf0a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/LogOutput.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output; - -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -/** - * LogOutput print the computation result to log file. - * It can't be used on production environment. - * Be used for test or development only. - */ -public class LogOutput extends AbstractComputerOutput { - - private static final Logger LOG = Log.logger(LogOutput.class); - - @Override - public void write(Vertex vertex) { - LOG.info("'{}': '{}'", vertex.id(), vertex.value().string()); - } - - @Override - public void close() { - LOG.info("End write back partition {}", this.partition()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutput.java deleted file mode 100644 index 9d4beece7..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutput.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hdfs; - -import java.io.IOException; -import java.net.URI; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataOutputStream; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.security.UserGroupInformation; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.AbstractComputerOutput; -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class HdfsOutput extends AbstractComputerOutput { - - private static final Logger LOG = Log.logger(HdfsOutput.class); - - private FileSystem fs; - private FSDataOutputStream fileOutputStream; - private String delimiter; - private static final String REPLICATION_KEY = "dfs.replication"; - private static final String FILE_PREFIX = "partition_"; - private static final String FILE_SUFFIX = ".csv"; - - @Override - public void init(Config config, int partition) { - super.init(config, partition); - - try { - Configuration configuration = new Configuration(); - Short replication = config.get( - ComputerOptions.OUTPUT_HDFS_REPLICATION); - configuration.set(REPLICATION_KEY, String.valueOf(replication)); - this.fs = HdfsOutput.openHDFS(config, configuration); - - this.delimiter = config.get(ComputerOptions.OUTPUT_HDFS_DELIMITER); - String dir = config.get(ComputerOptions.OUTPUT_HDFS_DIR); - String jobId = config.get(ComputerOptions.JOB_ID); - Path hdfsPath = buildPath(dir, jobId, partition); - this.fileOutputStream = this.fs.create(hdfsPath, true); - } catch (IOException | InterruptedException e) { - throw new ComputerException("Failed to init hdfs output on " + - "partition [%s]", e, partition); - } - } - - @Override - public void write(Vertex vertex) { - try { - if (!this.filter(vertex)) { - return; - } - this.writeString(vertex.id().toString()); - this.writeString(this.delimiter); - this.writeString(this.constructValueString(vertex)); - this.writeString(System.lineSeparator()); - } catch (IOException e) { - throw new ComputerException("Failed to write vertex: {}", - vertex.toString(), e); - } - } - - protected boolean filter(Vertex vertex) { - return true; - } - - protected void writeBytes(byte[] bytes) throws IOException { - this.fileOutputStream.write(bytes); - } - - protected void writeString(String string) throws IOException { - this.writeBytes(StringEncodeUtil.encode(string)); - } - - protected String constructValueString(Vertex vertex) { - return vertex.value().string(); - } - - public static Path buildPath(String dir, String jobId, int partition) { - Path dirPath = new Path(dir, jobId); - return new Path(dirPath, FILE_PREFIX + partition + FILE_SUFFIX); - } - - @Override - public void mergePartitions(Config config) { - Boolean merge = config.get(ComputerOptions.OUTPUT_HDFS_MERGE); - if (merge) { - LOG.info("Merge hdfs output partitions started"); - HdfsOutputMerger hdfsOutputMerger = new HdfsOutputMerger(); - try { - hdfsOutputMerger.init(config); - hdfsOutputMerger.merge(); - } finally { - hdfsOutputMerger.close(); - } - LOG.info("Merge hdfs output partitions finished"); - } - } - - @Override - public void close() { - try { - if (this.fileOutputStream != null) { - this.fileOutputStream.close(); - } - if (this.fs != null) { - this.fs.close(); - } - } catch (IOException e) { - throw new ComputerException("Failed to close hdfs", e); - } - } - - public static FileSystem openHDFS(Config config, Configuration conf) - throws IOException, - InterruptedException { - String url = config.get(ComputerOptions.OUTPUT_HDFS_URL); - Boolean enableKerberos = config.get( - ComputerOptions.OUTPUT_HDFS_KERBEROS_ENABLE); - - String coreSite = config.get( - ComputerOptions.OUTPUT_HDFS_CORE_SITE_PATH); - if (StringUtils.isNotBlank(coreSite)) { - conf.addResource(new Path(coreSite)); - } - String hdfsSite = config.get(ComputerOptions.OUTPUT_HDFS_SITE_PATH); - if (StringUtils.isNotBlank(hdfsSite)) { - conf.addResource(new Path(hdfsSite)); - } - - if (enableKerberos) { - String krb5Conf = config.get(ComputerOptions.OUTPUT_HDFS_KRB5_CONF); - System.setProperty("java.security.krb5.conf", krb5Conf); - String principal = config.get( - ComputerOptions.OUTPUT_HDFS_KERBEROS_PRINCIPAL); - String keyTab = config.get( - ComputerOptions.OUTPUT_HDFS_KERBEROS_KEYTAB); - conf.set("fs.defaultFS", url); - conf.set("hadoop.security.authentication", "kerberos"); - conf.set("dfs.namenode.kerberos.principal", principal); - - UserGroupInformation.setConfiguration(conf); - UserGroupInformation.loginUserFromKeytab(principal, keyTab); - return FileSystem.get(conf); - } else { - String user = config.get(ComputerOptions.OUTPUT_HDFS_USER); - return FileSystem.get(URI.create(url), conf, user); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutputMerger.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutputMerger.java deleted file mode 100644 index 5b107caff..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hdfs/HdfsOutputMerger.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hdfs; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; - -public class HdfsOutputMerger { - - private FileSystem fs; - private Path[] sourcePaths; - private Path mergedPath; - private static final String MERGED_FILE_NAME = "all.csv"; - - protected HdfsOutputMerger() { - } - - protected void init(Config config) { - try { - Configuration configuration = new Configuration(); - this.fs = HdfsOutput.openHDFS(config, configuration); - - String dir = config.get(ComputerOptions.OUTPUT_HDFS_DIR); - String jobId = config.get(ComputerOptions.JOB_ID); - int partitions = config.get(ComputerOptions.JOB_PARTITIONS_COUNT); - this.sourcePaths = this.paths(dir, jobId, partitions); - this.mergedPath = new Path(new Path(dir, jobId), MERGED_FILE_NAME); - } catch (Exception e) { - throw new ComputerException("Failed to init hdfs output merger", e); - } - } - - protected void merge() { - try { - this.fs.create(this.mergedPath, true).close(); - this.fs.concat(this.mergedPath, this.sourcePaths); - } catch (IOException e) { - throw new ComputerException("Failed to merge hdfs output files", e); - } - } - - private Path[] paths(String dir, String jobId, int partitions) throws - IOException { - List pathList = new ArrayList<>(); - for (int i = 0; i < partitions; i++) { - Path path = HdfsOutput.buildPath(dir, jobId, i); - if (this.fs.exists(path) && - this.fs.getFileStatus(path).getLen() > 0) { - pathList.add(path); - } - } - return pathList.toArray(new Path[0]); - } - - protected void close() { - try { - if (this.fs != null) { - this.fs.close(); - } - } catch (IOException e) { - throw new ComputerException("Failed to close hdfs output merger", - e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphDoubleOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphDoubleOutput.java deleted file mode 100644 index b948eb812..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphDoubleOutput.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -public class HugeGraphDoubleOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asDouble() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphFloatOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphFloatOutput.java deleted file mode 100644 index 11664fbcd..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphFloatOutput.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -public class HugeGraphFloatOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asFloat() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIdOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIdOutput.java deleted file mode 100644 index beafe1846..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIdOutput.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; - -public class HugeGraphIdOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asText() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } - - @Override - protected String value(Vertex vertex) { - return vertex.value().string(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIntOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIntOutput.java deleted file mode 100644 index f480cd76e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphIntOutput.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -public class HugeGraphIntOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asInt() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphLongOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphLongOutput.java deleted file mode 100644 index d155d80a9..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphLongOutput.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -public class HugeGraphLongOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asLong() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphStringOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphStringOutput.java deleted file mode 100644 index db2fcdb57..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/output/hg/HugeGraphStringOutput.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.output.hg; - -public class HugeGraphStringOutput extends HugeGraphOutput { - - @Override - protected void prepareSchema() { - this.client().schema().propertyKey(this.name()) - .asText() - .writeType(this.writeType()) - .ifNotExist() - .create(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffers.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffers.java deleted file mode 100644 index a9b71c01e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffers.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.UnsafeBytesInput; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.concurrent.BarrierEvent; - -public class MessageRecvBuffers { - - /* - * The bytesLimit is the limit of total bytes in buffers. The bytesLimit - * is not hard limit. For performance, it checks whether totalBytes >= - * bytesLimit after {@link #addBuffer(NetworkBuffer)}. - * If totalBytes >= bytesLimit, the buffers will be sorted into a file. - */ - private final long bytesLimit; - private long totalBytes; - - private final List buffers; - private final BarrierEvent sortFinished; - private final long waitSortedTimeout; - - public MessageRecvBuffers(long bytesLimit, long waitSortedTimeout) { - this.totalBytes = 0L; - this.sortFinished = new BarrierEvent(); - this.bytesLimit = bytesLimit; - this.waitSortedTimeout = waitSortedTimeout; - this.buffers = new ArrayList<>(); - } - - public void addBuffer(NetworkBuffer data) { - /* - * TODO: don't not use copy, add a new class - * RandomAccessInput(NetworkBuffer) - */ - byte[] bytes = data.copyToByteArray(); - this.buffers.add(bytes); - this.totalBytes += bytes.length; - } - - public boolean full() { - return this.totalBytes >= this.bytesLimit; - } - - /** - * Get all the buffers. - */ - public List buffers() { - // Transfer byte[] list to BytesInput list - List inputs = new ArrayList<>(this.buffers.size()); - for (byte[] buffer : this.buffers) { - inputs.add(new UnsafeBytesInput(buffer)); - } - return inputs; - } - - /** - * Prepare to sort the buffers, and reset event at the sort beginning - */ - public void prepareSort() { - // Reset buffers and totalBytes to prepare a new sorting - this.buffers.clear(); - this.totalBytes = 0L; - - // Reset event to prepare a new sorting - this.sortFinished.reset(); - } - - /** - * Wait the buffers to be sorted. - */ - public void waitSorted() { - if (this.buffers.isEmpty()) { - return; - } - try { - boolean sorted = this.sortFinished.await(this.waitSortedTimeout); - if (!sorted) { - throw new ComputerException( - "Buffers have not been sorted in %s ms", - this.waitSortedTimeout); - } - } catch (InterruptedException e) { - throw new ComputerException( - "Interrupted while waiting buffers to be sorted", e); - } - } - - /** - * Set event and signal all waiting threads - */ - public void signalSorted() { - this.sortFinished.signalAll(); - } - - public long totalBytes() { - return this.totalBytes; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManager.java deleted file mode 100644 index 54237d4f3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManager.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.edge.EdgeMessageRecvPartitions; -import org.apache.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitions; -import org.apache.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitions; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class MessageRecvManager implements Manager, MessageHandler { - - public static final String NAME = "message_recv"; - - private static final Logger LOG = Log.logger(MessageRecvManager.class); - - private final ComputerContext context; - private final FileManager fileManager; - private final SortManager sortManager; - - private VertexMessageRecvPartitions vertexPartitions; - private EdgeMessageRecvPartitions edgePartitions; - private ComputeMessageRecvPartitions messagePartitions; - - private int workerCount; - private int expectedFinishMessages; - private CompletableFuture finishMessagesFuture; - private AtomicInteger finishMessagesCount; - private SnapshotManager snapshotManager; - - private long waitFinishMessagesTimeout; - private long superstep; - - public MessageRecvManager(ComputerContext context, - FileManager fileManager, - SortManager sortManager) { - this.context = context; - this.fileManager = fileManager; - this.sortManager = sortManager; - this.superstep = Constants.INPUT_SUPERSTEP; - this.finishMessagesCount = new AtomicInteger(); - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.vertexPartitions = new VertexMessageRecvPartitions(this.context, - fileGenerator, - this.sortManager, - this.snapshotManager); - this.edgePartitions = new EdgeMessageRecvPartitions(this.context, - fileGenerator, - this.sortManager, - this.snapshotManager); - this.workerCount = config.get(ComputerOptions.JOB_WORKERS_COUNT); - // One for vertex and one for edge. - this.expectedFinishMessages = this.workerCount * 2; - this.finishMessagesFuture = new CompletableFuture<>(); - this.finishMessagesCount.set(this.expectedFinishMessages); - - this.waitFinishMessagesTimeout = config.get( - ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT); - } - - @Override - public void beforeSuperstep(Config config, int superstep) { - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, superstep); - this.messagePartitions = new ComputeMessageRecvPartitions(this.context, - fileGenerator, - this.sortManager, - this.snapshotManager); - this.expectedFinishMessages = this.workerCount; - this.finishMessagesFuture = new CompletableFuture<>(); - this.finishMessagesCount.set(this.expectedFinishMessages); - - this.superstep = superstep; - - if (this.superstep == Constants.INPUT_SUPERSTEP + 1) { - assert this.vertexPartitions != null; - this.vertexPartitions.clearOldFiles(Constants.INPUT_SUPERSTEP); - this.vertexPartitions = null; - - assert this.edgePartitions != null; - this.edgePartitions.clearOldFiles(Constants.INPUT_SUPERSTEP); - this.edgePartitions = null; - } - } - - @Override - public void afterSuperstep(Config config, int superstep) { - if (superstep > Constants.INPUT_SUPERSTEP + 1) { - this.messagePartitions.clearOldFiles(superstep - 1); - } - } - - @Override - public void onChannelActive(ConnectionId connectionId) { - // pass - } - - @Override - public void onChannelInactive(ConnectionId connectionId) { - // pass - } - - @Override - public void exceptionCaught(TransportException cause, - ConnectionId connectionId) { - LOG.error("Exception caught for connection:{}, root cause:", - connectionId, cause); - this.finishMessagesFuture.completeExceptionally(cause); - } - - public void waitReceivedAllMessages() { - try { - this.finishMessagesFuture.get(this.waitFinishMessagesTimeout, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - throw new ComputerException("Time out while waiting %s finish-messages " + - "received in %s ms in superstep %s", - this.expectedFinishMessages, this.waitFinishMessagesTimeout, this.superstep, e); - } catch (InterruptedException | ExecutionException e) { - throw new ComputerException("Error while waiting %s finish-messages in superstep %s", - this.expectedFinishMessages, this.superstep, e); - } - } - - @Override - public void handle(MessageType messageType, int partition, - NetworkBuffer buffer) { - switch (messageType) { - case VERTEX: - this.vertexPartitions.addBuffer(partition, buffer); - break; - case EDGE: - this.edgePartitions.addBuffer(partition, buffer); - break; - case MSG: - this.messagePartitions.addBuffer(partition, buffer); - break; - default: - throw new ComputerException( - "Unable handle NetworkBuffer with type '%s'", - messageType.name()); - } - } - - @Override - public String genOutputPath(MessageType messageType, int partition) { - switch (messageType) { - case VERTEX: - return this.vertexPartitions.genOutputPath(partition); - case EDGE: - return this.edgePartitions.genOutputPath(partition); - case MSG: - return this.messagePartitions.genOutputPath(partition); - default: - throw new ComputerException( - "Unable generator output path with type '%s'", - messageType.name()); - } - } - - @Override - public void onStarted(ConnectionId connectionId) { - LOG.debug("ConnectionId {} started", connectionId); - } - - @Override - public void onFinished(ConnectionId connectionId) { - LOG.debug("ConnectionId {} finished", connectionId); - int currentCount = this.finishMessagesCount.decrementAndGet(); - if (currentCount == 0) { - this.finishMessagesFuture.complete(null); - } - } - - /** - * Get the Iterator of each partition. - */ - public Map> vertexPartitions() { - E.checkState(this.vertexPartitions != null, - "The vertexPartitions can't be null"); - VertexMessageRecvPartitions partitions = this.vertexPartitions; - return partitions.iterators(); - } - - public Map> edgePartitions() { - E.checkState(this.edgePartitions != null, - "The edgePartitions can't be null"); - EdgeMessageRecvPartitions partitions = this.edgePartitions; - return partitions.iterators(); - } - - public Map> messagePartitions() { - E.checkState(this.messagePartitions != null, - "The messagePartitions can't be null"); - ComputeMessageRecvPartitions partitions = this.messagePartitions; - this.messagePartitions = null; - return partitions.iterators(); - } - - public Map messageStats() { - this.waitReceivedAllMessages(); - E.checkState(this.messagePartitions != null, - "The messagePartitions can't be null"); - return this.messagePartitions.messageStats(); - } - - public void setSnapshotManager(SnapshotManager snapshotManager) { - this.snapshotManager = snapshotManager; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartition.java deleted file mode 100644 index ce0ada3e3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartition.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.util.FileUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -/** - * Manage the buffers received for a partition and the files generated by - * sorting the buffers to file. The type of data may be VERTEX, EDGE, and - * MESSAGE. - */ -public abstract class MessageRecvPartition { - - public static final Logger LOG = Log.logger(MessageRecvPartition.class); - - private MessageRecvBuffers recvBuffers; - /* - * Used to sort the buffers that reached threshold - * ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT. - */ - private MessageRecvBuffers sortBuffers; - private final SortManager sortManager; - - private List outputFiles; - private final SuperstepFileGenerator fileGenerator; - private final boolean withSubKv; - private final int mergeFileNum; - private long totalBytes; - private final boolean useFileRegion; - - private final AtomicReference exception; - - public MessageRecvPartition(Config config, - SuperstepFileGenerator fileGenerator, - SortManager sortManager, - boolean withSubKv) { - this.fileGenerator = fileGenerator; - this.sortManager = sortManager; - this.withSubKv = withSubKv; - long buffersLimit = config.get( - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT); - - long waitSortTimeout = config.get( - ComputerOptions.WORKER_WAIT_SORT_TIMEOUT); - this.mergeFileNum = config.get(ComputerOptions.HGKV_MERGE_FILES_NUM); - this.useFileRegion = config.get( - ComputerOptions.TRANSPORT_RECV_FILE_MODE); - if (!this.useFileRegion) { - this.recvBuffers = new MessageRecvBuffers(buffersLimit, - waitSortTimeout); - this.sortBuffers = new MessageRecvBuffers(buffersLimit, - waitSortTimeout); - } - - this.outputFiles = new ArrayList<>(); - this.totalBytes = 0L; - this.exception = new AtomicReference<>(); - } - - /** - * Only one thread can call this method. - */ - public synchronized void addBuffer(NetworkBuffer buffer) { - this.totalBytes += buffer.length(); - if (buffer instanceof FileRegionBuffer) { - String path = ((FileRegionBuffer) buffer).path(); - this.outputFiles.add(path); - return; - } - this.recvBuffers.addBuffer(buffer); - if (this.recvBuffers.full()) { - // Wait for the previous sorting - this.sortBuffers.waitSorted(); - // Transfer recvBuffers to sortBuffers, then sort and flush - this.swapReceiveAndSortBuffers(); - this.flushSortBuffersAsync(); - } - } - - public synchronized PeekableIterator iterator() { - /* - * TODO: create iterator directly from buffers if there is no - * outputFiles. - */ - if (!this.useFileRegion) { - this.flushAllBuffersAndWaitSorted(); - } - this.mergeOutputFilesIfNeeded(); - if (this.outputFiles.size() == 0) { - return PeekableIterator.emptyIterator(); - } - return this.sortManager.iterator(this.outputFiles, this.withSubKv); - } - - public synchronized long totalBytes() { - return this.totalBytes; - } - - public synchronized List outputFiles() { - return this.outputFiles; - } - - public synchronized MessageStat messageStat() { - // TODO: count the message received - return new MessageStat(0L, this.totalBytes); - } - - protected abstract OuterSortFlusher outerSortFlusher(); - - protected abstract String type(); - - /** - * Flush the receive buffers to file, and wait both recvBuffers and - * sortBuffers to finish sorting. - * After this method be called, can not call - * {@link #addBuffer(NetworkBuffer)} any more. - */ - private void flushAllBuffersAndWaitSorted() { - this.sortBuffers.waitSorted(); - if (this.recvBuffers.totalBytes() > 0) { - // Transfer recvBuffers to sortBuffers, then sort and flush - this.swapReceiveAndSortBuffers(); - this.flushSortBuffersAsync(); - this.sortBuffers.waitSorted(); - } - this.checkException(); - } - - private void flushSortBuffersAsync() { - String path = this.genOutputPath(); - this.mergeBuffersAsync(this.sortBuffers, path); - this.outputFiles.add(path); - } - - private void mergeBuffersAsync(MessageRecvBuffers buffers, String path) { - this.checkException(); - this.sortManager.mergeBuffers(buffers.buffers(), path, - this.withSubKv, this.outerSortFlusher()) - .whenComplete((r , e) -> { - if (e != null) { - LOG.error("Failed to merge buffers", e); - // Just record the first error - this.exception.compareAndSet(null, e); - } - // Signal the buffers to prevent other thread wait indefinitely. - buffers.signalSorted(); - }); - } - - private void swapReceiveAndSortBuffers() { - assert this.recvBuffers.totalBytes() > 0; - MessageRecvBuffers oldRecvBuffers = this.recvBuffers; - this.recvBuffers = this.sortBuffers; - this.sortBuffers = oldRecvBuffers; - - // Prepare for the next buffer-adding/sorting - this.recvBuffers.prepareSort(); - } - - /** - * Merge outputFiles if needed, like merge 10000 files into 100 files. - */ - private void mergeOutputFilesIfNeeded() { - if (this.outputFiles.size() <= 1) { - return; - } - - /* - * TODO Restore genOutputFileNames(sqrt(outputFiles.size())) - * after add Sorter#iterator() of subkv - */ - int mergeFileNum = this.mergeFileNum; - mergeFileNum = 1; - List newOutputs = this.genOutputFileNames(mergeFileNum); - this.sortManager.mergeInputs(this.outputFiles, newOutputs, - this.withSubKv, this.outerSortFlusher()); - FileUtil.deleteFilesQuietly(this.outputFiles); - this.outputFiles = newOutputs; - } - - public String genOutputPath() { - return this.fileGenerator.nextPath(this.type()); - } - - private List genOutputFileNames(int targetSize) { - List files = new ArrayList<>(targetSize); - for (int i = 0; i < targetSize; i++) { - files.add(this.genOutputPath()); - } - return files; - } - - private void checkException() { - Throwable t = this.exception.get(); - if (t != null) { - throw new ComputerException(t.getMessage(), t); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartitions.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartitions.java deleted file mode 100644 index 222fff2c7..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvPartitions.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -import java.io.File; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public abstract class MessageRecvPartitions

{ - - protected final ComputerContext context; - protected final Config config; - protected final SuperstepFileGenerator fileGenerator; - protected final SortManager sortManager; - protected final SnapshotManager snapshotManager; - - // The map of partition-id and the messages for the partition. - private final Map partitions; - - public MessageRecvPartitions(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager, - SnapshotManager snapshotManager) { - this.context = context; - this.config = context.config(); - this.fileGenerator = fileGenerator; - this.sortManager = sortManager; - this.snapshotManager = snapshotManager; - this.partitions = new HashMap<>(); - } - - protected abstract P createPartition(); - - protected abstract void writePartitionSnapshot(int partitionId, List outputFiles); - - public void addBuffer(int partitionId, NetworkBuffer buffer) { - P partition = this.partition(partitionId); - partition.addBuffer(buffer); - } - - public String genOutputPath(int partitionId) { - P partition = this.partition(partitionId); - String path = partition.genOutputPath(); - new File(path).getParentFile().mkdirs(); - return path; - } - - private P partition(int partitionId) { - P partition = this.partitions.get(partitionId); - if (partition == null) { - synchronized (this.partitions) { - /* - * Not use putIfAbsent because it may create useless partition - * object. - */ - partition = this.partitions.get(partitionId); - if (partition == null) { - partition = this.createPartition(); - this.partitions.put(partitionId, partition); - } - } - } - return partition; - } - - public Map> iterators() { - Map> entries = new HashMap<>(); - for (Map.Entry entry : this.partitions.entrySet()) { - entries.put(entry.getKey(), entry.getValue().iterator()); - this.writePartitionSnapshot(entry.getKey(), entry.getValue().outputFiles()); - } - return entries; - } - - public Map messageStats() { - Map entries = new HashMap<>(); - for (Map.Entry entry : this.partitions.entrySet()) { - entries.put(entry.getKey(), entry.getValue().messageStat()); - } - return entries; - } - - public void clearOldFiles(int superstep) { - P partition = this.partitions.values().stream() - .findFirst().orElse(null); - if (partition != null) { - List dirs = this.fileGenerator - .superstepDirs(superstep, partition.type()); - for (String dir : dirs) { - FileUtils.deleteQuietly(new File(dir)); - } - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageStat.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageStat.java deleted file mode 100644 index 20f9aa1a3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageStat.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -/** - * Send or Received message stat for a partition. - */ -public class MessageStat { - - private long messageCount; - private long messageBytes; - - public MessageStat() { - this(0L, 0L); - } - - public MessageStat(long messageCount, long messageBytes) { - this.messageCount = messageCount; - this.messageBytes = messageBytes; - } - - public long messageCount() { - return this.messageCount; - } - - public long messageBytes() { - return this.messageBytes; - } - - public void increase(MessageStat other) { - this.messageCount += other.messageCount; - this.messageBytes += other.messageBytes; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartition.java deleted file mode 100644 index 043bdd0e8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartition.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.edge; - -import org.apache.hugegraph.computer.core.combiner.EdgeValueCombiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartition; -import org.apache.hugegraph.computer.core.sort.flusher.CombineSubKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -public class EdgeMessageRecvPartition extends MessageRecvPartition { - - private static final String TYPE = MessageType.EDGE.name().toLowerCase(); - - private final OuterSortFlusher flusher; - - public EdgeMessageRecvPartition(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager) { - super(context.config(), fileGenerator, sortManager, true); - - Config config = context.config(); - int flushThreshold = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - PointerCombiner combiner = new EdgeValueCombiner(context); - - this.flusher = new CombineSubKvOuterSortFlusher(combiner, - flushThreshold); - } - - @Override - protected OuterSortFlusher outerSortFlusher() { - return this.flusher; - } - - @Override - protected String type() { - return TYPE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitions.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitions.java deleted file mode 100644 index 558bfaa2b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitions.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.edge; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartitions; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -import java.util.List; - -public class EdgeMessageRecvPartitions - extends MessageRecvPartitions { - - public EdgeMessageRecvPartitions(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager, - SnapshotManager snapshotManager) { - super(context, fileGenerator, sortManager, snapshotManager); - } - - @Override - public EdgeMessageRecvPartition createPartition() { - return new EdgeMessageRecvPartition(this.context, this.fileGenerator, - this.sortManager); - } - - @Override - public void writePartitionSnapshot(int partitionId, List outputFiles) { - if (this.snapshotManager.writeSnapshot()) { - this.snapshotManager.upload(MessageType.EDGE, partitionId, outputFiles); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartition.java deleted file mode 100644 index c31f99bcc..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartition.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.message; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.combiner.MessageValueCombiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartition; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.KvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -public class ComputeMessageRecvPartition extends MessageRecvPartition { - - private static final String TYPE = MessageType.MSG.name().toLowerCase(); - - private final OuterSortFlusher flusher; - - public ComputeMessageRecvPartition(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager) { - super(context.config(), fileGenerator, sortManager, false); - Config config = context.config(); - Combiner combiner = config.createObject( - ComputerOptions.WORKER_COMBINER_CLASS, - false); - if (combiner == null) { - this.flusher = new KvOuterSortFlusher(); - } else { - PointerCombiner pointerCombiner = new MessageValueCombiner(context); - this.flusher = new CombineKvOuterSortFlusher(pointerCombiner); - } - } - - @Override - protected OuterSortFlusher outerSortFlusher() { - return this.flusher; - } - - @Override - protected String type() { - return TYPE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitions.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitions.java deleted file mode 100644 index a3e3e3584..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitions.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.message; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartitions; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -import java.util.List; - -public class ComputeMessageRecvPartitions - extends MessageRecvPartitions { - - public ComputeMessageRecvPartitions(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager, - SnapshotManager snapshotManager) { - super(context, fileGenerator, sortManager, snapshotManager); - } - - @Override - public ComputeMessageRecvPartition createPartition() { - return new ComputeMessageRecvPartition(this.context, this.fileGenerator, - this.sortManager); - } - - @Override - protected void writePartitionSnapshot(int partitionId, List outputFiles) { - // pass - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartition.java deleted file mode 100644 index 952dc77c6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartition.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.vertex; - -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.combiner.VertexValueCombiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartition; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -public class VertexMessageRecvPartition extends MessageRecvPartition { - - private static final String TYPE = MessageType.VERTEX.name().toLowerCase(); - - private final OuterSortFlusher flusher; - - public VertexMessageRecvPartition(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager) { - super(context.config(), fileGenerator, sortManager, false); - - PointerCombiner combiner = new VertexValueCombiner(context); - - this.flusher = new CombineKvOuterSortFlusher(combiner); - } - - @Override - protected OuterSortFlusher outerSortFlusher() { - return this.flusher; - } - - @Override - protected String type() { - return TYPE; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitions.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitions.java deleted file mode 100644 index 982ae7409..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitions.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.vertex; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvPartitions; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; - -import java.util.List; - -public class VertexMessageRecvPartitions - extends MessageRecvPartitions { - - - public VertexMessageRecvPartitions(ComputerContext context, - SuperstepFileGenerator fileGenerator, - SortManager sortManager, - SnapshotManager snapshotManager) { - super(context, fileGenerator, sortManager, snapshotManager); - } - - @Override - public VertexMessageRecvPartition createPartition() { - return new VertexMessageRecvPartition(this.context, this.fileGenerator, - this.sortManager); - } - - @Override - public void writePartitionSnapshot(int partitionId, List outputFiles) { - if (this.snapshotManager.writeSnapshot()) { - this.snapshotManager.upload(MessageType.VERTEX, partitionId, outputFiles); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/AggregateRpcService.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/AggregateRpcService.java deleted file mode 100644 index 888706db5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/AggregateRpcService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.rpc; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.aggregator.RegisterAggregators; -import org.apache.hugegraph.computer.core.graph.value.Value; - -public interface AggregateRpcService { - - RegisterAggregators registeredAggregators(); - - Map listAggregators(); - - void aggregateAggregators(Map aggregators); - - Aggregator getAggregator(String name); - - void aggregateAggregator(String name, V value); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/InputSplitRpcService.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/InputSplitRpcService.java deleted file mode 100644 index 46add8cb1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/InputSplitRpcService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.rpc; - -import org.apache.hugegraph.computer.core.input.InputSplit; - -public interface InputSplitRpcService { - - InputSplit nextVertexInputSplit(); - - InputSplit nextEdgeInputSplit(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/MasterRpcManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/MasterRpcManager.java deleted file mode 100644 index 97657c21e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/MasterRpcManager.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.rpc; - -import java.net.InetSocketAddress; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.rpc.RpcProviderConfig; -import org.apache.hugegraph.rpc.RpcServer; -import org.apache.hugegraph.util.E; - -public class MasterRpcManager implements Manager { - - public static final String NAME = "master_rpc"; - - private RpcServer rpcServer = null; - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - assert this.rpcServer == null; - this.rpcServer = new RpcServer(config.hugeConfig()); - } - - @Override - public void close(Config config) { - this.rpcServer.destroy(); - } - - public void registerInputSplitService(InputSplitRpcService service) { - RpcProviderConfig serverConfig = this.rpcServer.config(); - serverConfig.addService(InputSplitRpcService.class, service); - } - - public void registerAggregatorService(AggregateRpcService service) { - RpcProviderConfig serverConfig = this.rpcServer.config(); - serverConfig.addService(AggregateRpcService.class, service); - } - - public InetSocketAddress start() { - E.checkNotNull(this.rpcServer, "rpcServer"); - try { - this.rpcServer.exportAll(); - - return InetSocketAddress.createUnresolved(this.rpcServer.host(), - this.rpcServer.port()); - } catch (Throwable e) { - this.rpcServer.destroy(); - throw new ComputerException("Failed to start rpc-server", e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/WorkerRpcManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/WorkerRpcManager.java deleted file mode 100644 index 809f82a90..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/rpc/WorkerRpcManager.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.rpc; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.config.RpcOptions; -import org.apache.hugegraph.rpc.RpcClientProvider; -import org.apache.hugegraph.rpc.RpcConsumerConfig; - -public class WorkerRpcManager implements Manager { - - public static final String NAME = "worker_rpc"; - - private RpcClientProvider rpcClient = null; - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - if (this.rpcClient != null) { - return; - } - this.rpcClient = new RpcClientProvider(config.hugeConfig()); - } - - @Override - public void close(Config config) { - this.rpcClient.destroy(); - } - - public InputSplitRpcService inputSplitService() { - RpcConsumerConfig clientConfig = this.rpcClient.config(); - return clientConfig.serviceProxy(InputSplitRpcService.class); - } - - public AggregateRpcService aggregateRpcService() { - RpcConsumerConfig clientConfig = this.rpcClient.config(); - return clientConfig.serviceProxy(AggregateRpcService.class); - } - - public static void updateRpcRemoteServerConfig(Config config, - String host, int port) { - /* - * Update rpc remote-url to the global config. - * NOTE: this rpc-server address is from ContainerInfo.masterInfo, - * the masterInfo has bee got from BSP server. - */ - String url = host + ":" + port; - config.hugeConfig().setProperty(RpcOptions.RPC_REMOTE_URL.name(), url); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueue.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueue.java deleted file mode 100644 index 43d50e2ff..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueue.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; - -import org.apache.hugegraph.util.E; - -/** - * It's not a public class, need package access - */ -class MessageQueue { - - private final BlockingQueue queue; - private final Runnable notEmptyNotifier; - - public MessageQueue(Runnable notEmptyNotifier) { - E.checkArgumentNotNull(notEmptyNotifier, - "The callback to notify that a queue is " + - "not empty can't be null"); - // TODO: replace with disruptor queue - this.queue = new LinkedBlockingQueue<>(128); - this.notEmptyNotifier = notEmptyNotifier; - } - - public void put(QueuedMessage message) throws InterruptedException { - this.queue.put(message); - /* - * TODO: Try to optimize, don't signal every time when the queue - * is not empty - */ - this.notEmptyNotifier.run(); - } - - public QueuedMessage peek() { - return this.queue.peek(); - } - - public QueuedMessage take() throws InterruptedException { - return this.queue.take(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffers.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffers.java deleted file mode 100644 index 9a777afa8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffers.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.util.InsertionOrderUtil; - -public class MessageSendBuffers { - - /* - * Currently there is only one WriteBuffer object in each partition. - * Add a MessageSendPartition class when find that we really need it - * to encapsulate more objects. - */ - private final MessageSendPartition[] buffers; - - public MessageSendBuffers(ComputerContext context) { - Config config = context.config(); - int partitionCount = config.get(ComputerOptions.JOB_PARTITIONS_COUNT); - int threshold = config.get( - ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD); - int capacity = config.get( - ComputerOptions.WORKER_WRITE_BUFFER_INIT_CAPACITY); - this.buffers = new MessageSendPartition[partitionCount]; - for (int i = 0; i < partitionCount; i++) { - /* - * It depends on the concrete implementation of the - * partition algorithm, which is not elegant. - */ - this.buffers[i] = new MessageSendPartition(context, threshold, - capacity); - } - } - - public WriteBuffers get(int partitionId) { - if (partitionId < 0 || partitionId >= this.buffers.length) { - throw new ComputerException("Invalid partition id %s", partitionId); - } - return this.buffers[partitionId].buffersForCurrentThread(); - } - - public Map all() { - Map all = InsertionOrderUtil.newMap(); - for (int i = 0; i < this.buffers.length; i++) { - all.put(i, this.buffers[i]); - } - return all; - } - - public MessageStat messageStat(int partitionId) { - if (partitionId < 0 || partitionId >= this.buffers.length) { - throw new ComputerException("Invalid partition id %s", partitionId); - } - return this.buffers[partitionId].messageWritten(); - } - - public void clear() { - for (MessageSendPartition partition : this.buffers) { - partition.clear(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManager.java deleted file mode 100644 index bda242ab0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManager.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.partition.Partitioner; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class MessageSendManager implements Manager { - - public static final Logger LOG = Log.logger(MessageSendManager.class); - - public static final String NAME = "message_send"; - - private final MessageSendBuffers buffers; - private final Partitioner partitioner; - private final SortManager sortManager; - private final MessageSender sender; - private final AtomicReference exception; - private final TransportConf transportConf; - - public MessageSendManager(ComputerContext context, SortManager sortManager, - MessageSender sender) { - this.buffers = new MessageSendBuffers(context); - this.partitioner = context.config().createObject( - ComputerOptions.WORKER_PARTITIONER); - this.transportConf = TransportConf.wrapConfig(context.config()); - // The sort and client manager is inited at WorkerService init() - this.sortManager = sortManager; - this.sender = sender; - this.exception = new AtomicReference<>(); - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - this.partitioner.init(config); - } - - @Override - public void close(Config config) { - // pass - } - - /** - * There will multiple threads calling the method - */ - public void sendVertex(Vertex vertex) { - this.checkException(); - - int partitionId = this.partitioner.partitionId(vertex.id()); - WriteBuffers buffer = this.buffers.get(partitionId); - - this.sortIfTargetBufferIsFull(buffer, partitionId, - MessageType.VERTEX); - try { - // Write vertex to buffer - buffer.writeVertex(vertex); - } catch (IOException e) { - throw new ComputerException("Failed to write vertex '%s'", - e, vertex.id()); - } - } - - public void sendEdge(Vertex vertex) { - this.checkException(); - - int partitionId = this.partitioner.partitionId(vertex.id()); - WriteBuffers buffer = this.buffers.get(partitionId); - - this.sortIfTargetBufferIsFull(buffer, partitionId, - MessageType.EDGE); - try { - // Write edge to buffer - buffer.writeEdges(vertex); - } catch (IOException e) { - throw new ComputerException("Failed to write edges of " + - "vertex '%s'", e, vertex.id()); - } - } - - public void sendMessage(Id targetId, Value value) { - this.checkException(); - - int partitionId = this.partitioner.partitionId(targetId); - WriteBuffers buffer = this.buffers.get(partitionId); - - this.sortIfTargetBufferIsFull(buffer, partitionId, MessageType.MSG); - try { - // Write message to buffer - buffer.writeMessage(targetId, value); - } catch (IOException e) { - throw new ComputerException("Failed to write message", e); - } - } - - /** - * Start send message, put an START signal into queue - * @param type the message type - */ - public void startSend(MessageType type) { - Map all = this.buffers.all(); - all.values().forEach(MessageSendPartition::resetMessageWritten); - Set workerIds = all.keySet().stream() - .map(this.partitioner::workerId) - .collect(Collectors.toSet()); - this.sendControlMessageToWorkers(workerIds, MessageType.START); - LOG.info("Start sending message(type={})", type); - } - - /** - * Finish send message, send the last buffer and put an END signal - * into queue - * @param type the message type - */ - public void finishSend(MessageType type) { - Map all = this.buffers.all(); - MessageStat stat = this.sortAndSendLastBuffer(all, type); - - Set workerIds = all.keySet().stream() - .map(this.partitioner::workerId) - .collect(Collectors.toSet()); - this.sendControlMessageToWorkers(workerIds, MessageType.FINISH); - LOG.info("Finish sending message(type={},count={},bytes={})", - type, stat.messageCount(), stat.messageBytes()); - } - - public MessageStat messageStat(int partitionId) { - return this.buffers.messageStat(partitionId); - } - - public void clearBuffer() { - this.buffers.clear(); - } - - private void sortIfTargetBufferIsFull(WriteBuffers buffer, - int partitionId, - MessageType type) { - if (buffer.reachThreshold()) { - /* - * Switch buffers if writing buffer is full, - * After switch, the buffer can be continued to write. - */ - buffer.switchForSorting(); - this.sortThenSend(partitionId, type, buffer); - } - } - - private Future sortThenSend(int partitionId, MessageType type, - WriteBuffers buffer) { - int workerId = this.partitioner.workerId(partitionId); - return this.sortManager.sort(type, buffer).thenAccept(sortedBuffer -> { - // The following code is also executed in sort thread - buffer.finishSorting(); - // Each target worker has a buffer queue - QueuedMessage message = new QueuedMessage(partitionId, type, - sortedBuffer); - try { - this.sender.send(workerId, message); - } catch (InterruptedException e) { - throw new ComputerException("Interrupted when waiting to " + - "put buffer into queue"); - } - }).whenComplete((r, e) -> { - if (e != null) { - LOG.error("Failed to sort buffer or put sorted buffer " + - "into queue", e); - // Just record the first error - this.exception.compareAndSet(null, e); - } - }); - } - - private MessageStat sortAndSendLastBuffer( - Map all, - MessageType type) { - MessageStat messageWritten = new MessageStat(); - List> futures = new ArrayList<>(all.size()); - // Sort and send the last buffer - for (Map.Entry entry : all.entrySet()) { - int partitionId = entry.getKey(); - MessageSendPartition partition = entry.getValue(); - /* - * If the last buffer has already been sorted and sent (empty), - * there is no need to send again here - */ - for (WriteBuffers buffer : partition.buffers()) { - if (!buffer.isEmpty()) { - buffer.prepareSorting(); - futures.add(this.sortThenSend(partitionId, type, buffer)); - } - } - // Record total message count & bytes - messageWritten.increase(partition.messageWritten()); - } - this.checkException(); - - // Wait all future finished - try { - for (Future future : futures) { - future.get(Constants.FUTURE_TIMEOUT, TimeUnit.SECONDS); - } - } catch (TimeoutException e) { - throw new ComputerException("Timed out to wait for sorting task " + - "to finished", e); - } catch (InterruptedException | ExecutionException e) { - throw new ComputerException("Failed to wait for sorting task " + - "to finished", e); - } - - return messageWritten; - } - - private void sendControlMessageToWorkers(Set workerIds, - MessageType type) { - List> futures = new ArrayList<>(); - try { - for (Integer workerId : workerIds) { - futures.add(this.sender.send(workerId, type)); - } - } catch (InterruptedException e) { - throw new ComputerException("Interrupted when waiting to " + - "send message async"); - } - - long timeout = type == MessageType.FINISH ? - this.transportConf.timeoutFinishSession() : - this.transportConf.timeoutSyncRequest(); - try { - for (CompletableFuture future : futures) { - future.get(timeout, TimeUnit.MILLISECONDS); - } - } catch (TimeoutException e) { - throw new ComputerException("Timeout(%sms) to wait for " + - "controlling message(%s) to finished", - e, timeout, type); - } catch (InterruptedException | ExecutionException e) { - throw new ComputerException("Failed to wait for controlling " + - "message(%s) to finished", e, type); - } - } - - private void checkException() { - if (this.exception.get() != null) { - throw new ComputerException("Failed to send message", - this.exception.get()); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendPartition.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendPartition.java deleted file mode 100644 index 8d65e9fcb..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendPartition.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.receiver.MessageStat; - -public class MessageSendPartition { - - private final ComputerContext context; - private final int threshold; - private final int capacity; - - private final Map buffers; - - public MessageSendPartition(ComputerContext context, - int threshold, int capacity) { - this.context = context; - this.threshold = threshold; - this.capacity = capacity; - - this.buffers = new ConcurrentHashMap<>(); - } - - public WriteBuffers buffersForCurrentThread() { - Thread current = Thread.currentThread(); - WriteBuffers buffer = this.buffers.get(current); - if (buffer == null) { - buffer = new WriteBuffers(this.context, this.threshold, - this.capacity); - this.buffers.put(current, buffer); - } - return buffer; - } - - public synchronized void clear() { - this.buffers.clear(); - } - - public synchronized void resetMessageWritten() { - for (WriteBuffers buffer : this.buffers.values()) { - buffer.resetMessageWritten(); - } - } - - public synchronized MessageStat messageWritten() { - MessageStat partitionStat = new MessageStat(); - for (WriteBuffers buffer : this.buffers.values()) { - partitionStat.increase(buffer.messageWritten()); - } - return partitionStat; - } - - public Collection buffers() { - return this.buffers.values(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSender.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSender.java deleted file mode 100644 index a700b22c9..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSender.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.concurrent.CompletableFuture; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.message.MessageType; - -public interface MessageSender { - - /** - * Send control message, like START and FINISH - * @param workerId target workerId - * @param type message type - */ - CompletableFuture send(int workerId, MessageType type) - throws InterruptedException; - - /** - * Send data message, like VERTEX, EDGE or MSG - * @param workerId target workerId - * @param message message payload - */ - void send(int workerId, QueuedMessage message) throws InterruptedException; - - /** - * Invoked when the channel associated with the given connectionId has - * an exception is thrown processing message. - */ - void transportExceptionCaught(TransportException cause, ConnectionId connectionId); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessage.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessage.java deleted file mode 100644 index 7401daea4..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.nio.ByteBuffer; - -import org.apache.hugegraph.computer.core.network.message.MessageType; - -public class QueuedMessage { - - private final int partitionId; - private final MessageType type; - private final ByteBuffer buffer; - - public QueuedMessage(int partitionId, MessageType type, ByteBuffer buffer) { - this.partitionId = partitionId; - this.type = type; - this.buffer = buffer; - } - - public int partitionId() { - return this.partitionId; - } - - public MessageType type() { - return this.type; - } - - public ByteBuffer buffer() { - return this.buffer; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSender.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSender.java deleted file mode 100644 index b2006b886..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSender.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.concurrent.BarrierEvent; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class QueuedMessageSender implements MessageSender { - - public static final Logger LOG = Log.logger(QueuedMessageSender.class); - - private static final String NAME = "send-executor"; - - // Each target worker has a WorkerChannel - private final WorkerChannel[] channels; - // The thread used to send vertex/message, only one is enough - private final Thread sendExecutor; - private final BarrierEvent anyQueueNotEmptyEvent; - private final BarrierEvent anyClientNotBusyEvent; - - public QueuedMessageSender(Config config) { - int workerCount = config.get(ComputerOptions.JOB_WORKERS_COUNT); - // NOTE: the workerId start from 1 - this.channels = new WorkerChannel[workerCount]; - // TODO: pass send-executor in and share executor with others - this.sendExecutor = new Thread(new Sender(), NAME); - this.anyQueueNotEmptyEvent = new BarrierEvent(); - this.anyClientNotBusyEvent = new BarrierEvent(); - } - - public void init() { - for (WorkerChannel channel : this.channels) { - E.checkNotNull(channel, "channel"); - } - this.sendExecutor.start(); - } - - public void close() { - this.sendExecutor.interrupt(); - try { - this.sendExecutor.join(); - } catch (InterruptedException e) { - throw new ComputerException("Interrupted when waiting for " + - "send-executor to stop", e); - } - } - - public void addWorkerClient(int workerId, TransportClient client) { - MessageQueue queue = new MessageQueue( - this.anyQueueNotEmptyEvent::signal); - WorkerChannel channel = new WorkerChannel(workerId, queue, client); - this.channels[channelId(workerId)] = channel; - LOG.info("Add client {} for worker {}", - client.connectionId(), workerId); - } - - @Override - public CompletableFuture send(int workerId, MessageType type) - throws InterruptedException { - WorkerChannel channel = this.channels[channelId(workerId)]; - CompletableFuture future = channel.newFuture(); - future.whenComplete((r, e) -> { - channel.resetFuture(future); - }); - /* - * Control message just need message type is enough, - * partitionId = -1 and buffer = null represents a meaningless value - */ - channel.queue.put(new QueuedMessage(-1, type, null)); - return future; - } - - @Override - public void send(int workerId, QueuedMessage message) - throws InterruptedException { - WorkerChannel channel = this.channels[channelId(workerId)]; - channel.queue.put(message); - } - - @Override - public void transportExceptionCaught(TransportException cause, ConnectionId connectionId) { - for (WorkerChannel channel : this.channels) { - if (channel.client.connectionId().equals(connectionId)) { - channel.futureRef.get().completeExceptionally(cause); - } - } - } - - public Runnable notBusyNotifier() { - /* - * DataClientHandler.sendAvailable() will call it when client - * is available - */ - return this.anyClientNotBusyEvent::signal; - } - - private class Sender implements Runnable { - - @Override - public void run() { - LOG.info("The send-executor is running"); - Thread thread = Thread.currentThread(); - while (!thread.isInterrupted()) { - try { - int emptyQueueCount = 0; - int busyClientCount = 0; - for (WorkerChannel channel : channels) { - QueuedMessage message = channel.queue.peek(); - if (message == null) { - ++emptyQueueCount; - continue; - } - if (channel.doSend(message)) { - // Only consume the message after it is sent - channel.queue.take(); - } else { - ++busyClientCount; - } - } - int channelCount = channels.length; - /* - * If all queues are empty, let send thread wait - * until any queue is available - */ - if (emptyQueueCount >= channelCount) { - LOG.debug("The send executor was blocked " + - "to wait any queue not empty"); - QueuedMessageSender.this.waitAnyQueueNotEmpty(); - } - /* - * If all clients are busy, let send thread wait - * until any client is available - */ - if (busyClientCount >= channelCount) { - LOG.debug("The send executor was blocked " + - "to wait any client not busy"); - QueuedMessageSender.this.waitAnyClientNotBusy(); - } - } catch (InterruptedException e) { - // Reset interrupted flag - thread.interrupt(); - // Any client is active means that sending task in running - if (QueuedMessageSender.this.activeClientCount() > 0) { - throw new ComputerException( - "Interrupted when waiting for message " + - "queue not empty"); - } - } catch (TransportException e) { - // TODO: should handle this in main workflow thread - throw new ComputerException("Failed to send message", e); - } - } - LOG.info("The send-executor is terminated"); - } - } - - private void waitAnyQueueNotEmpty() { - try { - this.anyQueueNotEmptyEvent.await(); - } catch (InterruptedException e) { - // Reset interrupted flag - Thread.currentThread().interrupt(); - } finally { - this.anyQueueNotEmptyEvent.reset(); - } - } - - private void waitAnyClientNotBusy() { - try { - this.anyClientNotBusyEvent.await(); - } catch (InterruptedException e) { - // Reset interrupted flag - Thread.currentThread().interrupt(); - throw new ComputerException("Interrupted when waiting any client " + - "not busy"); - } finally { - this.anyClientNotBusyEvent.reset(); - } - } - - private int activeClientCount() { - int count = 0; - for (WorkerChannel channel : this.channels) { - if (channel.client.sessionActive()) { - ++count; - } - } - return count; - } - - private static int channelId(int workerId) { - assert workerId > 0; - return workerId - 1; - } - - private static class WorkerChannel { - - private final int workerId; - // Each target worker has a MessageQueue - private final MessageQueue queue; - // Each target worker has a TransportClient - private final TransportClient client; - private final AtomicReference> futureRef; - - public WorkerChannel(int workerId, MessageQueue queue, - TransportClient client) { - this.workerId = workerId; - this.queue = queue; - this.client = client; - this.futureRef = new AtomicReference<>(); - } - - public CompletableFuture newFuture() { - CompletableFuture future = new CompletableFuture<>(); - if (!this.futureRef.compareAndSet(null, future)) { - throw new ComputerException("The origin future must be null"); - } - return future; - } - - public void resetFuture(CompletableFuture future) { - if (!this.futureRef.compareAndSet(future, null)) { - throw new ComputerException("Failed to reset futureRef, " + - "expect future object is %s, " + - "but some thread modified it", - future); - } - } - - public boolean doSend(QueuedMessage message) - throws TransportException, InterruptedException { - switch (message.type()) { - case START: - this.sendStartMessage(); - return true; - case FINISH: - this.sendFinishMessage(); - return true; - default: - return this.sendDataMessage(message); - } - } - - public void sendStartMessage() throws TransportException { - this.client.startSessionAsync().whenComplete((r, e) -> { - CompletableFuture future = this.futureRef.get(); - assert future != null; - - if (e != null) { - LOG.info("Failed to start session connected to {}", this); - future.completeExceptionally(e); - } else { - LOG.info("Start session connected to {}", this); - future.complete(null); - } - }); - } - - public void sendFinishMessage() throws TransportException { - this.client.finishSessionAsync().whenComplete((r, e) -> { - CompletableFuture future = this.futureRef.get(); - assert future != null; - - if (e != null) { - LOG.info("Failed to finish session connected to {}", this); - future.completeExceptionally(e); - } else { - LOG.info("Finish session connected to {}", this); - future.complete(null); - } - }); - } - - public boolean sendDataMessage(QueuedMessage message) - throws TransportException { - return this.client.send(message.type(), message.partitionId(), - message.buffer()); - } - - @Override - public String toString() { - return String.format("workerId=%s(remoteAddress=%s)", - this.workerId, this.client.remoteAddress()); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffer.java deleted file mode 100644 index dac165fb3..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffer.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.GraphComputeOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.StreamGraphOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; - -/** - * It's not a public class, need package access - */ -class WriteBuffer { - - /* - * When writed bytes exceed this threshold, means that need a new buffer - * to continue write - */ - private final int threshold; - private final BytesOutput bytesOutput; - private final GraphComputeOutput graphOutput; - private long writeCount; - - public WriteBuffer(ComputerContext context, int threshold, int capacity) { - assert threshold > 0 && capacity > 0 && threshold <= capacity; - this.threshold = threshold; - this.bytesOutput = IOFactory.createBytesOutput(capacity); - EntryOutput entryOutput = new EntryOutputImpl(this.bytesOutput); - this.graphOutput = new StreamGraphOutput(context, entryOutput); - this.writeCount = 0L; - } - - public boolean reachThreshold() { - return this.bytesOutput.position() >= this.threshold; - } - - public boolean isEmpty() { - return this.bytesOutput.position() == 0L; - } - - public long numBytes() { - return this.bytesOutput.position(); - } - - public long writeCount() { - return this.writeCount; - } - - public void clear() throws IOException { - this.writeCount = 0L; - this.bytesOutput.seek(0L); - } - - public BytesOutput output() { - return this.bytesOutput; - } - - public void writeVertex(Vertex vertex) throws IOException { - this.writeCount++; - this.graphOutput.writeVertex(vertex); - } - - public void writeEdges(Vertex vertex) throws IOException { - this.writeCount++; - this.graphOutput.writeEdges(vertex); - } - - public void writeMessage(Id targetId, Value value) throws IOException { - this.writeCount++; - this.graphOutput.writeMessage(targetId, value); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffers.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffers.java deleted file mode 100644 index 322217350..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffers.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.util.E; - -public class WriteBuffers { - - // For writing - private WriteBuffer writingBuffer; - // For sorting - private WriteBuffer sortingBuffer; - // Total count & bytes written - private long totalCount; - private long totalBytes; - - public WriteBuffers(ComputerContext context, int threshold, int capacity) { - E.checkArgument(threshold > 0, - "The threshold of buffer must be > 0, actual got %s", - threshold); - E.checkArgument(capacity > 0, - "The capacity of buffer must be > 0, actual got %s", - capacity); - E.checkArgument(threshold <= capacity, - "The threshold must be <= capacity, actual got %s > %s", - threshold, capacity); - this.writingBuffer = new WriteBuffer(context, threshold, capacity); - this.sortingBuffer = new WriteBuffer(context, threshold, capacity); - this.totalCount = 0L; - this.totalBytes = 0L; - } - - public boolean reachThreshold() { - return this.writingBuffer.reachThreshold(); - } - - public boolean isEmpty() { - return this.writingBuffer.isEmpty(); - } - - public void resetMessageWritten() { - this.totalCount = 0L; - this.totalBytes = 0L; - } - - public MessageStat messageWritten() { - return new MessageStat(this.totalCount, this.totalBytes); - } - - public synchronized void writeVertex(Vertex vertex) throws IOException { - this.writingBuffer.writeVertex(vertex); - } - - public synchronized void writeEdges(Vertex vertex) throws IOException { - this.writingBuffer.writeEdges(vertex); - } - - public synchronized void writeMessage(Id targetId, Value value) - throws IOException { - this.writingBuffer.writeMessage(targetId, value); - } - - public synchronized void switchForSorting() { - if (!this.reachThreshold()) { - return; - } - this.prepareSorting(); - } - - /** - * Can remove synchronized if MessageSendManager.finish() only called by - * single thread - */ - public synchronized void prepareSorting() { - // Ensure last sorting task finished - while (!this.sortingBuffer.isEmpty()) { - try { - this.wait(); - } catch (InterruptedException e) { - throw new ComputerException("Interrupted when waiting " + - "sorting buffer empty"); - } - } - // Record total message bytes - this.totalCount += this.writingBuffer.writeCount(); - this.totalBytes += this.writingBuffer.numBytes(); - // Swap the writing buffer and sorting buffer pointer - WriteBuffer temp = this.writingBuffer; - this.writingBuffer = this.sortingBuffer; - this.sortingBuffer = temp; - } - - public synchronized void finishSorting() { - try { - this.sortingBuffer.clear(); - } catch (IOException e) { - throw new ComputerException("Failed to clear sorting buffer"); - } - this.notify(); - } - - public synchronized RandomAccessInput wrapForRead() { - BytesOutput output = this.sortingBuffer.output(); - return IOFactory.createBytesInput(output.buffer(), - (int) output.position()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java deleted file mode 100644 index 674d95d72..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.snapshot; - -import io.minio.BucketExistsArgs; -import io.minio.DownloadObjectArgs; -import io.minio.ListObjectsArgs; -import io.minio.MakeBucketArgs; -import io.minio.MinioClient; -import io.minio.RemoveObjectsArgs; -import io.minio.Result; -import io.minio.UploadObjectArgs; -import io.minio.messages.DeleteError; -import io.minio.messages.DeleteObject; -import io.minio.messages.Item; -import org.apache.commons.lang.StringUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.partition.Partitioner; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import java.io.File; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.LinkedList; -import java.util.List; -import java.util.Locale; - -public class SnapshotManager implements Manager { - - private static final Logger LOG = Log.logger(SnapshotManager.class); - public static final String NAME = "worker_snapshot"; - - private final MessageSendManager sendManager; - private final MessageRecvManager recvManager; - - private final ContainerInfo workerInfo; - private final Partitioner partitioner; - private final int partitionCount; - private final boolean loadSnapshot; - private final boolean writeSnapshot; - private final String snapshotName; - - private MinioClient minioClient; - private String bucketName; - - public SnapshotManager(ComputerContext context, MessageSendManager sendManager, - MessageRecvManager recvManager, ContainerInfo workerInfo) { - this.loadSnapshot = context.config().get(ComputerOptions.SNAPSHOT_LOAD); - this.writeSnapshot = context.config().get(ComputerOptions.SNAPSHOT_WRITE); - - this.sendManager = sendManager; - this.recvManager = recvManager; - this.recvManager.setSnapshotManager(this); - - this.workerInfo = workerInfo; - this.partitioner = context.config().createObject(ComputerOptions.WORKER_PARTITIONER); - this.partitionCount = context.config().get(ComputerOptions.JOB_PARTITIONS_COUNT); - this.snapshotName = context.config().get(ComputerOptions.SNAPSHOT_NAME); - } - - @Override - public String name() { - return NAME; - } - - @Override - public void init(Config config) { - String endpoint = config.get(ComputerOptions.SNAPSHOT_MINIO_ENDPOINT); - this.bucketName = config.get(ComputerOptions.SNAPSHOT_MINIO_BUCKET_NAME); - - if (StringUtils.isNotEmpty(endpoint) && StringUtils.isNotEmpty(this.bucketName)) { - String accessKey = config.get(ComputerOptions.SNAPSHOT_MINIO_ACCESS_KEY); - String secretKey = config.get(ComputerOptions.SNAPSHOT_MINIO_SECRET_KEY); - this.minioClient = MinioClient.builder() - .endpoint(endpoint) - .credentials(accessKey, secretKey) - .build(); - - try { - boolean bucketExist = this.minioClient.bucketExists( - BucketExistsArgs.builder() - .bucket(this.bucketName) - .build()); - if (!bucketExist) { - this.minioClient.makeBucket(MakeBucketArgs.builder() - .bucket(this.bucketName) - .build()); - } - } catch (Exception e) { - throw new ComputerException("Failed to initialize bucket %s", this.bucketName, e); - } - } - } - - @Override - public void close(Config config) { - // pass - } - - public boolean loadSnapshot() { - return this.loadSnapshot; - } - - public boolean writeSnapshot() { - return this.writeSnapshot; - } - - public void upload(MessageType messageType, int partitionId, List outputFiles) { - if (this.loadSnapshot()) { - LOG.info("No later {} snapshots have to be uploaded", - messageType.name().toLowerCase(Locale.ROOT)); - return; - } - this.uploadObjects(messageType, partitionId, outputFiles); - } - - public void load() { - int id = this.workerInfo.id(); - for (int partitionId = 0; partitionId < this.partitionCount; partitionId++) { - if (this.partitioner.workerId(partitionId) == id) { - // TODO: Do not need to send control message to all workers - this.sendManager.startSend(MessageType.VERTEX); - this.downloadObjects(MessageType.VERTEX, partitionId); - this.sendManager.finishSend(MessageType.VERTEX); - - this.sendManager.startSend(MessageType.EDGE); - this.downloadObjects(MessageType.EDGE, partitionId); - this.sendManager.finishSend(MessageType.EDGE); - } - } - } - - private void uploadObjects(MessageType messageType, int partitionId, - List outputFiles) { - String dirName = this.generateObjectDirName(messageType, partitionId); - - try { - this.clearObjectsIfExist(dirName); - } catch (Exception e) { - throw new ComputerException("Failed to clear out-dated snapshots from %s", dirName, e); - } - - LOG.info("Upload {} snapshots for partition {}", - messageType.name().toLowerCase(Locale.ROOT), partitionId); - for (String outputFile : outputFiles) { - String objectName = dirName + new File(outputFile).getName(); - this.uploadObject(outputFile, objectName); - } - } - - private void downloadObjects(MessageType messageType, int partitionId) { - LOG.info("Load {} snapshots for partition {}", - messageType.name().toLowerCase(Locale.ROOT), partitionId); - String dirName = this.generateObjectDirName(messageType, partitionId); - - try { - Iterable> snapshotFiles = this.minioClient.listObjects( - ListObjectsArgs.builder() - .bucket(this.bucketName) - .prefix(dirName) - .build()); - - if (!snapshotFiles.iterator().hasNext()) { - throw new ComputerException("Empty snapshot directory %s", dirName); - } - - for (Result result : snapshotFiles) { - Item item = result.get(); - int size = (int) item.size(); - String objectName = item.objectName(); - - String outputPath = this.recvManager.genOutputPath(messageType, partitionId); - this.downloadObject(objectName, outputPath); - - FileRegionBuffer fileRegionBuffer = new FileRegionBuffer(size, outputPath); - this.recvManager.handle(messageType, partitionId, fileRegionBuffer); - } - } catch (Exception e) { - throw new ComputerException("Failed to download snapshots from %s", dirName, e); - } - } - - private void uploadObject(String fileName, String objectName) { - try { - this.minioClient.uploadObject(UploadObjectArgs.builder() - .bucket(this.bucketName) - .object(objectName) - .filename(fileName) - .build()); - } catch (Exception e) { - throw new ComputerException("Failed to upload snapshot %s to %s", - fileName, objectName, e); - } - } - - private void downloadObject(String objectName, String outputPath) { - try { - this.minioClient.downloadObject(DownloadObjectArgs.builder() - .bucket(this.bucketName) - .object(objectName) - .filename(outputPath) - .build()); - } catch (Exception e) { - throw new ComputerException("Failed to download snapshot from %s to %s", - objectName, outputPath, e); - } - } - - private void clearObjectsIfExist(String dirName) throws Exception { - List objects = new LinkedList<>(); - Iterable> snapshotFiles = this.minioClient.listObjects( - ListObjectsArgs.builder() - .bucket(this.bucketName) - .prefix(dirName) - .build()); - if (!snapshotFiles.iterator().hasNext()) { - return; - } - - LOG.info("Clear out-dated snapshots from {} first", dirName); - for (Result result : snapshotFiles) { - Item item = result.get(); - objects.add(new DeleteObject(item.objectName())); - } - Iterable> results = - minioClient.removeObjects(RemoveObjectsArgs.builder() - .bucket(this.bucketName) - .objects(objects) - .build()); - for (Result result : results) { - DeleteError error = result.get(); - throw new ComputerException("Failed to delete snapshot %s, error message: %s", - error.objectName(), error.message()); - } - } - - private String generateObjectDirName(MessageType messageType, int partitionId) { - // dir name: {SNAPSHOT_NAME}/{PARTITIONER}/{PARTITION_COUNT}/VERTEX/{PARTITION_ID}/ - Path path = Paths.get(this.snapshotName, - this.partitioner.getClass().getSimpleName(), - String.valueOf(this.partitionCount), - messageType.name(), - String.valueOf(partitionId)); - return path + "/"; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/BufferFileSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/BufferFileSorter.java deleted file mode 100644 index df4671012..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/BufferFileSorter.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort; - -import java.io.IOException; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesInput; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesWithFirstSubKvInput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.bufferfile.BufferFileEntryBuilder; -import org.apache.hugegraph.computer.core.store.file.bufferfile.BufferFileEntryReader; -import org.apache.hugegraph.computer.core.store.file.bufferfile.BufferFileSubEntryReader; -import org.apache.hugegraph.computer.core.store.file.select.DisperseEvenlySelector; -import org.apache.hugegraph.computer.core.store.file.select.InputFilesSelector; -import org.apache.hugegraph.computer.core.store.file.select.SelectedFiles; - -public class BufferFileSorter implements Sorter { - - private final DefaultSorter sorter; - - public BufferFileSorter(Config config) { - this.sorter = new DefaultSorter(config); - } - - @Override - public void sortBuffer(RandomAccessInput input, InnerSortFlusher flusher, - boolean withSubKv) throws Exception { - try (EntryIterator entries = new KvEntriesInput(input, withSubKv)) { - this.sorter.sortBuffer(entries, flusher); - } - } - - @Override - public void mergeBuffers(List inputs, - OuterSortFlusher flusher, String output, - boolean withSubKv) throws Exception { - List entries; - if (withSubKv) { - entries = inputs.stream() - .map(KvEntriesWithFirstSubKvInput::new) - .collect(Collectors.toList()); - } else { - entries = inputs.stream() - .map(KvEntriesInput::new) - .collect(Collectors.toList()); - } - try (KvEntryFileWriter writer = new BufferFileEntryBuilder(output)) { - this.sorter.mergeBuffers(entries, writer, flusher); - } - } - - @Override - public void mergeInputs(List inputs, OuterSortFlusher flusher, - List outputs, boolean withSubKv) - throws Exception { - Function fileToInput; - Function fileToWriter; - if (withSubKv) { - fileToInput = o -> new BufferFileSubEntryReader(o).iterator(); - } else { - fileToInput = o -> new BufferFileEntryReader(o).iterator(); - } - fileToWriter = BufferFileEntryBuilder::new; - - InputFilesSelector selector = new DisperseEvenlySelector(); - List selectResult = selector.selectedByBufferFile( - inputs, outputs); - this.sorter.mergeFile(selectResult, fileToInput, fileToWriter, flusher); - } - - @Override - public PeekableIterator iterator(List inputs, - boolean withSubKv) - throws IOException { - Function fileToEntries = input -> { - return new BufferFileEntryReader(input, withSubKv).iterator(); - }; - return this.sorter.iterator(inputs, fileToEntries); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/DefaultSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/DefaultSorter.java deleted file mode 100644 index 933cec797..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/DefaultSorter.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort; - -import java.io.IOException; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIteratorAdaptor; -import org.apache.hugegraph.computer.core.sort.merge.FileMerger; -import org.apache.hugegraph.computer.core.sort.merge.FileMergerImpl; -import org.apache.hugegraph.computer.core.sort.sorter.InputSorter; -import org.apache.hugegraph.computer.core.sort.sorter.InputsSorter; -import org.apache.hugegraph.computer.core.sort.sorter.InputsSorterImpl; -import org.apache.hugegraph.computer.core.sort.sorter.JavaInputSorter; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.select.SelectedFiles; - -public class DefaultSorter { - - private final Config config; - - public DefaultSorter(Config config) { - this.config = config; - } - - public void sortBuffer(EntryIterator entries, InnerSortFlusher flusher) - throws Exception { - InputSorter sorter = new JavaInputSorter(); - flusher.flush(sorter.sort(entries)); - } - - public void mergeBuffers(List entries, - KvEntryFileWriter writer, OuterSortFlusher flusher) - throws IOException { - InputsSorter sorter = new InputsSorterImpl(); - EntryIterator result = sorter.sort(entries); - flusher.flush(result, writer); - } - - public void mergeFile(List selectedFiles, - Function fileToEntries, - Function fileToWriter, - OuterSortFlusher flusher) throws Exception { - FileMerger merger = new FileMergerImpl(this.config); - for (SelectedFiles select : selectedFiles) { - merger.merge(select.inputs(), fileToEntries, - select.output(), fileToWriter, flusher); - } - } - - public PeekableIterator iterator( - List inputs, Function fileToEntries) - throws IOException { - List entries = inputs.stream() - .map(fileToEntries) - .collect(Collectors.toList()); - InputsSorterImpl sorter = new InputsSorterImpl(); - return PeekableIteratorAdaptor.of(sorter.sort(entries)); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/HgkvFileSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/HgkvFileSorter.java deleted file mode 100644 index 7414727a2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/HgkvFileSorter.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort; - -import java.io.IOException; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesInput; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesWithFirstSubKvInput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvDirBuilderImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.reader.HgkvDir4SubKvReaderImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.reader.HgkvDirReaderImpl; -import org.apache.hugegraph.computer.core.store.file.select.DisperseEvenlySelector; -import org.apache.hugegraph.computer.core.store.file.select.InputFilesSelector; -import org.apache.hugegraph.computer.core.store.file.select.SelectedFiles; - -public class HgkvFileSorter implements Sorter { - - private final Config config; - private final DefaultSorter sorter; - - public HgkvFileSorter(Config config) { - this.config = config; - this.sorter = new DefaultSorter(config); - } - - @Override - public void sortBuffer(RandomAccessInput input, InnerSortFlusher flusher, - boolean withSubKv) throws Exception { - try (EntryIterator entries = new KvEntriesInput(input, withSubKv)) { - this.sorter.sortBuffer(entries, flusher); - } - } - - @Override - public void mergeBuffers(List inputs, - OuterSortFlusher flusher, String output, - boolean withSubKv) throws Exception { - List entries; - if (withSubKv) { - entries = inputs.stream() - .map(KvEntriesWithFirstSubKvInput::new) - .collect(Collectors.toList()); - } else { - entries = inputs.stream() - .map(KvEntriesInput::new) - .collect(Collectors.toList()); - } - try (KvEntryFileWriter writer = new HgkvDirBuilderImpl(this.config, - output)) { - this.sorter.mergeBuffers(entries, writer, flusher); - } - } - - @Override - public void mergeInputs(List inputs, OuterSortFlusher flusher, - List outputs, boolean withSubKv) - throws Exception { - Function fileToInput; - Function fileToWriter; - if (withSubKv) { - fileToInput = o -> new HgkvDir4SubKvReaderImpl(o).iterator(); - } else { - fileToInput = o -> new HgkvDirReaderImpl(o).iterator(); - } - fileToWriter = path -> new HgkvDirBuilderImpl(this.config, path); - - InputFilesSelector selector = new DisperseEvenlySelector(); - List selectResult = selector.selectedByHgkvFile( - inputs, outputs); - this.sorter.mergeFile(selectResult, fileToInput, fileToWriter, flusher); - } - - @Override - public PeekableIterator iterator(List inputs, - boolean withSubKv) - throws IOException { - Function fileToEntries = input -> { - return new HgkvDirReaderImpl(input, false, withSubKv).iterator(); - }; - return this.sorter.iterator(inputs, fileToEntries); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/Sorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/Sorter.java deleted file mode 100644 index af3adc744..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/Sorter.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface Sorter { - - /** - * Sort the buffer by increasing order of key. Every key exists only once - * in output buffer. - * The input buffer format: - * | key1 length | key1 | value1 length | value1 | - * | key2 length | key2 | value2 length | value2 | - * | key1 length | key1 | value3 length | value3 | - * and so on. - * If some key exists several time, combine the values. - * @param input The input buffer. - * @param flusher The flusher for the same key. - * @param withSubKv True if need sort subKv. - */ - void sortBuffer(RandomAccessInput input, InnerSortFlusher flusher, - boolean withSubKv) throws Exception; - - /** - * Merge the buffers by increasing order of key. - * The input buffers in list are in increasing order of the key. - * There are two formats for the input buffer: - * 1. - * | key1 length | key1 | value1 length | value1 | - * | key2 length | key2 | value2 length | value2 | - * and so on. - * Keys are in increasing order in each buffer. - * 2. - * | key1 length | key1 | value1 length | sub-entry count | - * | sub-key1 length | sub-key1 | sub-value1 length | sub-value1 | - * | sub-key2 length | sub-key2 | sub-value2 length | sub-value2 | - * and so on. - * Keys are in increasing order in each buffer. - * Sub-keys are in increasing order in a key value pair. - * - * The results of multiple buffer sorting are outputted to @param output - * @param inputBuffers The input buffer list. - * @param flusher The flusher for the same key. - * @param output Sort result output location. - * @param withSubKv True if need sort subKv. - */ - void mergeBuffers(List inputBuffers, - OuterSortFlusher flusher, String output, - boolean withSubKv) throws Exception; - - /** - * Merge the n inputs into m outputs. - * 'n' is size of inputs, 'm' is size of outputs. - * The input files in list are in increasing order of the key. - * There are two formats for the input buffer: - * 1. - * | key1 length | key1 | value1 length | value1 | - * | key2 length | key2 | value2 length | value2 | - * and so on. - * Keys are in increasing order in each buffer. - * 2. - * | key1 length | key1 | value1 length | sub-entry count | - * | sub-key1 length | sub-key1 | sub-value1 length | sub-value1 | - * | sub-key2 length | sub-key2 | sub-value2 length | sub-value2 | - * and so on. - * Sub-keys are in increasing order in a key value pair. - * - * The format of outputs is same as inputs. - * For example number of the inputs is 100, and number of the outputs is - * 10, this method merge 100 inputs into 10 outputs. - * The outputs need to be as evenly distributed as possible. It might - * need to sort the inputs by desc order. Then select the inputs one by - * one assign to the output with least inputs. It makes the difference - * between the outputs below the least inputs. - * @param inputs The input file list. - * @param flusher The flusher for the same key. - * @param outputs Sort result output locations. - * @param withSubKv True if need sort subKv. - */ - void mergeInputs(List inputs, OuterSortFlusher flusher, - List outputs, boolean withSubKv) throws Exception; - - /** - * Get the iterator of pair by increasing order of key. - */ - PeekableIterator iterator(List inputs, boolean withSubKv) - throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombinableSorterFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombinableSorterFlusher.java deleted file mode 100644 index d1c4cc7fb..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombinableSorterFlusher.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.store.entry.DefaultKvEntry; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.util.E; - -public abstract class CombinableSorterFlusher { - - private final PointerCombiner combiner; - - public CombinableSorterFlusher(PointerCombiner combiner) { - this.combiner = combiner; - } - - public void flush(Iterator entries) throws IOException { - E.checkArgument(entries.hasNext(), - "Parameter entries can't be empty"); - - KvEntry last = entries.next(); - Pointer combineValue = last.value(); - - while (true) { - KvEntry current = null; - if (entries.hasNext()) { - current = entries.next(); - if (last.compareTo(current) == 0) { - combineValue = this.combiner.combine(combineValue, - current.value()); - continue; - } - } - - this.writeKvEntry(new DefaultKvEntry(last.key(), combineValue)); - - if (current == null) { - break; - } - - last = current; - combineValue = last.value(); - } - } - - protected abstract void writeKvEntry(KvEntry entry) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvInnerSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvInnerSortFlusher.java deleted file mode 100644 index 68e0f1a35..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvInnerSortFlusher.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class CombineKvInnerSortFlusher extends CombinableSorterFlusher - implements InnerSortFlusher { - - private final RandomAccessOutput output; - - public CombineKvInnerSortFlusher(RandomAccessOutput output, - PointerCombiner combiner) { - super(combiner); - this.output = output; - } - - @Override - protected void writeKvEntry(KvEntry entry) throws IOException { - entry.key().write(this.output); - entry.value().write(this.output); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvOuterSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvOuterSortFlusher.java deleted file mode 100644 index 8041f1be7..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineKvOuterSortFlusher.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class CombineKvOuterSortFlusher extends CombinableSorterFlusher - implements OuterSortFlusher { - - private KvEntryFileWriter writer; - - public CombineKvOuterSortFlusher(PointerCombiner combiner) { - super(combiner); - } - - @Override - protected void writeKvEntry(KvEntry entry) throws IOException { - this.writer.write(entry); - } - - @Override - public void flush(EntryIterator entries, KvEntryFileWriter writer) - throws IOException { - this.writer = writer; - this.flush(entries); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvInnerSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvInnerSortFlusher.java deleted file mode 100644 index 3b8075153..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvInnerSortFlusher.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.sort.sorting.SortingFactory; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.util.E; - -public class CombineSubKvInnerSortFlusher implements InnerSortFlusher { - - private final RandomAccessOutput output; - private final PointerCombiner combiner; - private final int subKvFlushThreshold; - - public CombineSubKvInnerSortFlusher(RandomAccessOutput output, - PointerCombiner combiner, - int subKvFlushThreshold) { - this.output = output; - this.combiner = combiner; - this.subKvFlushThreshold = subKvFlushThreshold; - } - - @Override - public RandomAccessOutput output() { - return this.output; - } - - @Override - public PointerCombiner combiner() { - return this.combiner; - } - - @Override - public void flush(Iterator entries) throws IOException { - E.checkArgument(entries.hasNext(), "Parameter entries can't be empty"); - - KvEntry last = entries.next(); - // TODO: use byte buffer store all value pointer to avoid big collection - List sameKeyEntries = new ArrayList<>(); - sameKeyEntries.add(last); - - while (true) { - KvEntry current = null; - if (entries.hasNext()) { - current = entries.next(); - if (last.compareTo(current) == 0) { - sameKeyEntries.add(current); - continue; - } - } - - this.writeSubKvs(last, this.sortedSubKvFromEntries(sameKeyEntries)); - - if (current == null) { - break; - } - - sameKeyEntries.clear(); - sameKeyEntries.add(current); - last = current; - } - } - - private Iterator sortedSubKvFromEntries(List entries) { - Function> kvEntryToSubKvs = - EntriesUtil::subKvIterFromEntry; - List> subKvs = entries.stream() - .map(kvEntryToSubKvs) - .collect(Collectors.toList()); - - return SortingFactory.createSorting(subKvs); - } - - private void writeSubKvs(KvEntry kvEntry, Iterator subKvIter) - throws IOException { - E.checkArgument(subKvIter.hasNext(), - "Parameter subKvs can't be empty"); - - kvEntry.key().write(this.output); - long position = this.output.position(); - // Write value length placeholder - this.output.writeFixedInt(0); - // Write subKv count placeholder - this.output.writeFixedInt(0); - - // Write subKv to output - KvEntry lastSubKv = subKvIter.next(); - Pointer lastSubValue = lastSubKv.value(); - int writtenCount = 0; - - while (true) { - // Write subKv - KvEntry current = null; - if (subKvIter.hasNext()) { - current = subKvIter.next(); - if (lastSubKv.compareTo(current) == 0) { - lastSubValue = this.combiner.combine(lastSubValue, - current.value()); - continue; - } - } - - lastSubKv.key().write(this.output); - lastSubValue.write(this.output); - writtenCount++; - - if (writtenCount == this.subKvFlushThreshold || current == null) { - // Fill placeholder - long currentPosition = this.output.position(); - this.output.seek(position); - // Fill value length placeholder - this.output.writeFixedInt((int) - (currentPosition - position - 4)); - // Fill subKv count placeholder - this.output.writeFixedInt(writtenCount); - this.output.seek(currentPosition); - - if (current == null) { - break; - } - - // Used for next loop - kvEntry.key().write(this.output); - position = this.output.position(); - // Write value length placeholder - this.output.writeFixedInt(0); - // Write subKv count placeholder - this.output.writeFixedInt(0); - writtenCount = 0; - } - - lastSubKv = current; - lastSubValue = current.value(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/InnerSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/InnerSortFlusher.java deleted file mode 100644 index 6a65e32e6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/InnerSortFlusher.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; -import java.util.Iterator; - -import org.apache.commons.lang.NotImplementedException; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface InnerSortFlusher { - - /** - * Flush result to this output. - */ - default RandomAccessOutput output() { - throw new NotImplementedException(); - } - - /** - * Combine entries with the same key. - */ - default PointerCombiner combiner() { - throw new NotImplementedException(); - } - - /** - * Combine the list of inputValues, and write the combined result length and - * results to output. - */ - void flush(Iterator entries) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvInnerSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvInnerSortFlusher.java deleted file mode 100644 index 129e38e6d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvInnerSortFlusher.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.util.E; - -public class KvInnerSortFlusher implements InnerSortFlusher { - - private final RandomAccessOutput output; - - public KvInnerSortFlusher(RandomAccessOutput output) { - this.output = output; - } - - @Override - public RandomAccessOutput output() { - return this.output; - } - - @Override - public void flush(Iterator entries) throws IOException { - E.checkArgument(entries.hasNext(), - "Parameter entries can't be empty"); - while (entries.hasNext()) { - KvEntry entry = entries.next(); - entry.key().write(this.output); - entry.value().write(this.output); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvOuterSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvOuterSortFlusher.java deleted file mode 100644 index 8a48eca86..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/KvOuterSortFlusher.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.util.E; - -public class KvOuterSortFlusher implements OuterSortFlusher { - - @Override - public void flush(EntryIterator entries, KvEntryFileWriter writer) - throws IOException { - E.checkArgument(entries.hasNext(), - "Parameter entries can't be empty"); - while (entries.hasNext()) { - KvEntry entry = entries.next(); - writer.write(entry); - } - writer.finish(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/OuterSortFlusher.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/OuterSortFlusher.java deleted file mode 100644 index be5a62c17..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/OuterSortFlusher.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.io.IOException; - -import org.apache.commons.lang.NotImplementedException; -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.Pointer; - -public interface OuterSortFlusher { - - /** - * Number of path to generate entries iterator in flush method. - * This method must be called before flush if sort with subKv. - */ - default void sources(int sources) { - throw new NotImplementedException(); - } - - /** - * Combiner entries with the same key. - */ - default Combiner combiner() { - throw new NotImplementedException(); - } - - /** - * Combine the list of inputValues, and write the inputKey and combined - * result length and results to HgkvDirWriter. - * The caller maybe needs to call the sources method before call this - * method. - */ - void flush(EntryIterator entries, KvEntryFileWriter writer) - throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIterator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIterator.java deleted file mode 100644 index cb76e8c7a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIterator.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import java.util.NoSuchElementException; - -import org.apache.hugegraph.iterator.CIter; - -public interface PeekableIterator extends CIter { - - @SuppressWarnings("unchecked") - static PeekableIterator emptyIterator() { - return (PeekableIterator) EmptyIterator.EMPTY_ITERATOR; - } - - T peek(); - - class EmptyIterator implements PeekableIterator { - - static final EmptyIterator EMPTY_ITERATOR = - new EmptyIterator<>(); - - @Override - public boolean hasNext() { - return false; - } - - @Override - public E next() { - throw new NoSuchElementException(); - } - - @Override - public Object metadata(String s, Object... objects) { - throw new UnsupportedOperationException(); - } - - @Override - public E peek() { - throw new NoSuchElementException(); - } - - @Override - public void close() throws Exception { - // pass - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIteratorAdaptor.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIteratorAdaptor.java deleted file mode 100644 index e3954b504..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/PeekableIteratorAdaptor.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.flusher; - -import org.apache.hugegraph.iterator.CIter; -import org.apache.hugegraph.util.E; - -public class PeekableIteratorAdaptor implements PeekableIterator { - - private final CIter entries; - private T next; - - private PeekableIteratorAdaptor(CIter entries) { - this.entries = entries; - this.fetchNext(); - } - - public static PeekableIterator of(CIter iterator) { - E.checkArgument(iterator.hasNext(), - "Parameter iterator can't be empty"); - return new PeekableIteratorAdaptor<>(iterator); - } - - @Override - public T peek() { - return this.next; - } - - @Override - public boolean hasNext() { - return this.next != null; - } - - @Override - public T next() { - T next = this.next; - - this.fetchNext(); - - return next; - } - - private void fetchNext() { - if (this.entries.hasNext()) { - this.next = this.entries.next(); - } else { - this.next = null; - } - } - - @Override - public void close() throws Exception { - this.entries.close(); - } - - @Override - public Object metadata(String s, Object... objects) { - return this.entries.metadata(s, objects); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMerger.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMerger.java deleted file mode 100644 index 1b85bd4c6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMerger.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.merge; - -import java.util.List; -import java.util.function.Function; - -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; - -public interface FileMerger { - - /** - * Merge inputs file to output file - * @param inputs file that need to be merged - * @param inputToEntries key value pair read mode - * @param output write merge result to this file - * @param flusher combiner entries of same key - */ - void merge(List inputs, - Function inputToEntries, - String output, Function fileToWriter, - OuterSortFlusher flusher) throws Exception; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMergerImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMergerImpl.java deleted file mode 100644 index fccbb9987..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/merge/FileMergerImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.merge; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import java.util.function.Function; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.sorter.InputsSorter; -import org.apache.hugegraph.computer.core.sort.sorter.InputsSorterImpl; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.util.FileUtil; -import org.apache.hugegraph.util.E; - -public class FileMergerImpl implements FileMerger { - - private final int mergePathNum; - private final String tempDir; - - public FileMergerImpl(Config config) { - this.mergePathNum = config.get(ComputerOptions.HGKV_MERGE_FILES_NUM); - this.tempDir = config.get(ComputerOptions.HGKV_TEMP_DIR) + - File.separator + UUID.randomUUID(); - boolean result = new File(this.tempDir).mkdirs(); - E.checkState(result, "Failed to create temp directory: '%s'", - this.tempDir); - } - - @Override - public void merge(List inputs, - Function inputToEntries, - String output, - Function fileToWriter, - OuterSortFlusher flusher) throws Exception { - List subInputs = new ArrayList<>(this.mergePathNum); - int round = 0; - while (inputs.size() > this.mergePathNum) { - List newInputs = new ArrayList<>(inputs.size()); - for (int i = 0; i < inputs.size(); i++) { - subInputs.add(inputs.get(i)); - if (subInputs.size() == this.mergePathNum || - i == inputs.size() - 1) { - String subOutput = this.mergeInputsToRandomFile( - subInputs, inputToEntries, - fileToWriter, flusher); - // Don't remove original file - if (round != 0) { - FileUtil.deleteFilesQuietly(subInputs); - } - subInputs.clear(); - newInputs.add(subOutput); - } - } - - inputs = newInputs; - round++; - } - - this.mergeInputs(inputs, inputToEntries, flusher, output, fileToWriter); - } - - private String mergeInputsToRandomFile( - List inputs, - Function inputToIter, - Function fileToWriter, - OuterSortFlusher flusher) throws Exception { - String output = this.randomPath(); - this.mergeInputs(inputs, inputToIter, flusher, output, fileToWriter); - return output; - } - - private void mergeInputs(List inputs, - Function inputToIter, - OuterSortFlusher flusher, String output, - Function fileToWriter) - throws Exception { - /* - * File value format is different, upper layer is required to - * provide the file reading mode - */ - List entries = inputs.stream() - .map(inputToIter) - .collect(Collectors.toList()); - - InputsSorter sorter = new InputsSorterImpl(); - // Merge inputs and write to output - try (EntryIterator sortedKv = sorter.sort(entries); - KvEntryFileWriter builder = fileToWriter.apply(output)) { - flusher.flush(sortedKv, builder); - } - } - - private String randomPath() { - return this.tempDir + File.separator + HgkvDirImpl.FILE_NAME_PREFIX + - UUID.randomUUID() + HgkvDirImpl.FILE_EXTEND_NAME; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputSorter.java deleted file mode 100644 index 5d09e7861..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputSorter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.IOException; -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface InputSorter { - - /** - * Memory sorting. Sort the data in input. - */ - Iterator sort(Iterator entries) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorter.java deleted file mode 100644 index 637bf12ae..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.store.EntryIterator; - -public interface InputsSorter { - - /** - * Sort multiple inputs from memory. - */ - EntryIterator sort(List inputs) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorterImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorterImpl.java deleted file mode 100644 index 45f40e7e9..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/InputsSorterImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.IOException; -import java.util.List; - -import org.apache.hugegraph.computer.core.sort.sorting.InputsSorting; -import org.apache.hugegraph.computer.core.sort.sorting.SortingFactory; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class InputsSorterImpl implements InputsSorter { - - @Override - public EntryIterator sort(List entries) throws IOException { - return new SortingEntries(entries); - } - - private static class SortingEntries implements EntryIterator { - - private final InputsSorting inputsSorting; - private final List sources; - private boolean closed; - - public SortingEntries(List sources) { - this.sources = sources; - this.inputsSorting = SortingFactory.createSorting(sources); - this.closed = false; - } - - @Override - public boolean hasNext() { - return this.inputsSorting.hasNext(); - } - - @Override - public KvEntry next() { - return this.inputsSorting.next(); - } - - @Override - public void close() throws Exception { - if (this.closed) { - return; - } - for (EntryIterator source : this.sources) { - source.close(); - } - this.closed = true; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/JavaInputSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/JavaInputSorter.java deleted file mode 100644 index d5e7528e2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/JavaInputSorter.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class JavaInputSorter implements InputSorter { - - private static final ThreadLocal> SORT_LOCAL = - ThreadLocal.withInitial(ArrayList::new); - - private static List threadLocalSortList() { - List list = SORT_LOCAL.get(); - list.clear(); - return list; - } - - @Override - public Iterator sort(Iterator entries) - throws IOException { - List kvEntries = threadLocalSortList(); - while (entries.hasNext()) { - kvEntries.add(entries.next()); - } - kvEntries.sort(KvEntry::compareTo); - return kvEntries.iterator(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SubKvSorter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SubKvSorter.java deleted file mode 100644 index b7d20bc1b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SubKvSorter.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.LoserTreeInputsSorting; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.util.E; - -public class SubKvSorter implements Iterator { - - private final PeekableIterator entries; - private final int subKvSortPathNum; - private final List> subKvMergeSources; - private Iterator subKvSorting; - private KvEntry currentEntry; - - public SubKvSorter(PeekableIterator entries, - int subKvSortPathNum) { - E.checkArgument(entries.hasNext(), - "Parameter entries can't be empty"); - E.checkArgument(subKvSortPathNum > 0, - "Parameter subKvSortPathNum must be > 0"); - this.entries = entries; - this.subKvSortPathNum = subKvSortPathNum; - this.subKvMergeSources = new ArrayList<>(this.subKvSortPathNum); - this.init(); - } - - @Override - public boolean hasNext() { - return this.subKvSorting.hasNext(); - } - - @Override - public KvEntry next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - - return this.subKvSorting.next(); - } - - public KvEntry currentKv() { - return this.currentEntry; - } - - public void reset() { - if (!this.entries.hasNext()) { - this.currentEntry = null; - return; - } - this.subKvMergeSources.clear(); - - assert this.subKvSortPathNum > 0; - KvEntry entry; - while (true) { - entry = this.entries.next(); - this.subKvMergeSources.add(new MergePath(this.entries, entry)); - - KvEntry next = this.entries.peek(); - if (this.subKvMergeSources.size() == this.subKvSortPathNum || - next == null || entry.key().compareTo(next.key()) != 0) { - break; - } - } - this.subKvSorting = new LoserTreeInputsSorting<>( - this.subKvMergeSources); - this.currentEntry = entry; - } - - private void init() { - this.reset(); - } - - private static class MergePath implements Iterator { - - private final PeekableIterator entries; - private Iterator subKvIter; - private KvEntry currentEntry; - - public MergePath(PeekableIterator entries, - KvEntry currentEntry) { - this.entries = entries; - this.subKvIter = EntriesUtil.subKvIterFromEntry(currentEntry); - this.currentEntry = currentEntry; - } - - @Override - public boolean hasNext() { - return this.subKvIter.hasNext(); - } - - @Override - public KvEntry next() { - KvEntry nextSubKvEntry = this.subKvIter.next(); - if (!this.subKvIter.hasNext()) { - KvEntry nextEntry = this.entries.peek(); - if (nextEntry != null && - nextEntry.key().compareTo(this.currentEntry.key()) == 0) { - this.currentEntry = this.entries.next(); - this.subKvIter = EntriesUtil.subKvIterFromEntry( - this.currentEntry); - } - } - return nextSubKvEntry; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/AbstractInputsSorting.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/AbstractInputsSorting.java deleted file mode 100644 index 87ef42b22..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/AbstractInputsSorting.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.Collection; -import java.util.Comparator; -import java.util.Iterator; - -import org.apache.hugegraph.util.E; - -public abstract class AbstractInputsSorting implements InputsSorting { - - protected final Iterator[] sources; - protected final Comparator comparator; - - @SuppressWarnings("unchecked") - public AbstractInputsSorting(Collection> sources, - Comparator comparator) { - E.checkNotEmpty(sources, "sources"); - - this.sources = sources.toArray(new Iterator[0]); - this.comparator = comparator; - } - - protected final int compare(T t1, T t2) { - @SuppressWarnings("unchecked") - int result = this.comparator != null ? - this.comparator.compare(t1, t2) : - ((Comparable) t1).compareTo(t2); - return result; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/HeapInputsSorting.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/HeapInputsSorting.java deleted file mode 100644 index 359ee7bae..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/HeapInputsSorting.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.Collection; -import java.util.Comparator; -import java.util.Iterator; -import java.util.NoSuchElementException; - -public final class HeapInputsSorting extends AbstractInputsSorting { - - private final Object[] data; - private int size; - - public HeapInputsSorting(Collection> sources) { - this(sources, null); - } - - public HeapInputsSorting(Collection> sources, - Comparator comparator) { - super(sources, comparator); - - this.size = sources.size(); - this.data = new Object[this.size]; - - // Init Heap - this.constructHeap(); - } - - @Override - public boolean hasNext() { - return !this.isEmpty(); - } - - @Override - public T next() { - if (this.isEmpty()) { - throw new NoSuchElementException(); - } - - @SuppressWarnings("unchecked") - T top = (T) this.data[0]; - Iterator topSource = this.sources[0]; - if (topSource.hasNext()) { - // Current element was removed, fill next element. - this.data[0] = topSource.next(); - } else { - this.size--; - // Move the last input to the top when the top input is empty. - if (this.size > 0) { - this.sources[0] = this.sources[this.size]; - this.data[0] = this.data[this.size]; - } - } - - this.adjustHeap(0); - - return top; - } - - private void constructHeap() { - // Init data array. Skip empty iterator. - for (int i = 0, len = this.sources.length - 1; i <= len; ) { - if (!this.sources[i].hasNext()) { - System.arraycopy(this.sources, i + 1, - this.sources, i, len - i); - this.size--; - len--; - continue; - } - this.data[i] = this.sources[i].next(); - i++; - } - - // Build Heap - for (int index = (this.size >> 1) - 1; index >= 0; index--) { - this.adjustHeap(index); - } - } - - @SuppressWarnings("unchecked") - private void adjustHeap(int parent) { - int child; - while ((child = (parent << 1) + 1) < this.size) { - // Compare left and right child if right child exist. - if (child < this.size - 1 && - this.compare((T) this.data[child], - (T) this.data[child + 1]) > 0) { - child++; - } - if (this.compare((T) this.data[parent], (T) this.data[child]) > 0) { - this.swap(parent, child); - parent = child; - } else { - break; - } - } - } - - private void swap(int i, int j) { - // Swap data - Object dataTmp = this.data[i]; - this.data[i] = this.data[j]; - this.data[j] = dataTmp; - - // Swap sources - Iterator sourceTmp = this.sources[i]; - this.sources[i] = this.sources[j]; - this.sources[j] = sourceTmp; - } - - private boolean isEmpty() { - return this.size <= 0; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSorting.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSorting.java deleted file mode 100644 index 88b64c87e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSorting.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.Iterator; - -public interface InputsSorting extends Iterator { -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/LoserTreeInputsSorting.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/LoserTreeInputsSorting.java deleted file mode 100644 index 8479714f2..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/LoserTreeInputsSorting.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Comparator; -import java.util.Iterator; -import java.util.NoSuchElementException; - -public final class LoserTreeInputsSorting extends AbstractInputsSorting { - - private static final Object INFINITY_LEAF = new Object(); - - private final Object[] leaves; - private final int size; - private final int[] tree; - - public LoserTreeInputsSorting(Collection> sources) { - this(sources, null); - } - - public LoserTreeInputsSorting(Collection> sources, - Comparator comparator) { - super(sources, comparator); - - this.size = sources.size(); - this.leaves = new Object[this.size]; - this.tree = new int[this.size]; - - this.constructLoserTree(); - } - - @Override - public boolean hasNext() { - return !this.isEmpty(); - } - - @Override - public T next() { - if (this.isEmpty()) { - throw new NoSuchElementException(); - } - - int winnerIndex = this.tree[0]; - - @SuppressWarnings("unchecked") - T winner = (T) this.leaves[winnerIndex]; - - this.fill(winnerIndex); - this.adjust(winnerIndex); - - return winner; - } - - private boolean isEmpty() { - return this.leaves[this.tree[0]] == INFINITY_LEAF; - } - - private void constructLoserTree() { - // Init leaves - for (int i = 0; i < this.sources.length; i++) { - if (this.sources[i].hasNext()) { - this.leaves[i] = this.sources[i].next(); - } else { - this.leaves[i] = INFINITY_LEAF; - } - } - - // Init tree to winner - int winner = 0; - for (int i = 0; i < this.size; i++) { - if (this.beat(i, winner)) { - winner = i; - } - } - Arrays.fill(this.tree, winner); - - // Init loser tree - for (int i = this.size - 1; i >= 0; i--) { - this.adjust(i); - } - } - - private void fill(int index) { - Iterator source = this.sources[index]; - if (source.hasNext()) { - this.leaves[index] = source.next(); - } else { - this.leaves[index] = INFINITY_LEAF; - } - } - - private void adjust(int index) { - int t = (this.size + index) >> 1; - while (t > 0) { - // Save loser - if (this.beat(this.tree[t], index)) { - int temp = this.tree[t]; - this.tree[t] = index; - index = temp; - } - t = t >> 1; - } - this.tree[0] = index; - } - - /** - * Judge whether index1 can beat index2 - * if order by asc. smaller one is winner. bigger one is loser. - */ - private boolean beat(int index1, int index2) { - @SuppressWarnings("unchecked") - T t1 = (T) this.leaves[index1]; - @SuppressWarnings("unchecked") - T t2 = (T) this.leaves[index2]; - - if (t1 == INFINITY_LEAF) { - return false; - } - if (t2 == INFINITY_LEAF) { - return true; - } - - int result = this.compare(t1, t2); - if (result == 0) { - return index1 > index2; - } - return result < 0; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/RecvSortManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/RecvSortManager.java deleted file mode 100644 index fa5247826..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/RecvSortManager.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; - -public class RecvSortManager extends SortManager { - - private static final String NAME = "recv_sort"; - private static final String PREFIX = "recv-sort-executor-%s"; - - public RecvSortManager(ComputerContext context) { - super(context); - } - - @Override - public String name() { - return NAME; - } - - @Override - protected String threadPrefix() { - return PREFIX; - } - - @Override - protected Integer threadNum(Config config) { - if (config.get(ComputerOptions.TRANSPORT_RECV_FILE_MODE)) { - return 0; - } - return Math.min(super.threadNum(config), - this.maxSendSortThreads(config)); - } - - private int maxSendSortThreads(Config config) { - Integer workerCount = config.get(ComputerOptions.JOB_WORKERS_COUNT); - Integer partitions = config.get(ComputerOptions.JOB_PARTITIONS_COUNT); - return partitions / workerCount; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SendSortManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SendSortManager.java deleted file mode 100644 index 37c71cfab..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SendSortManager.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import org.apache.hugegraph.computer.core.common.ComputerContext; - -public class SendSortManager extends SortManager { - - private static final String NAME = "send_sort"; - private static final String PREFIX = "send-sort-executor-%s"; - - public SendSortManager(ComputerContext context) { - super(context); - } - - @Override - public String name() { - return NAME; - } - - @Override - protected String threadPrefix() { - return PREFIX; - } -} - diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortManager.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortManager.java deleted file mode 100644 index 124a02ab8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortManager.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.combiner.EdgeValueCombiner; -import org.apache.hugegraph.computer.core.combiner.MessageValueCombiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.combiner.VertexValueCombiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.sender.WriteBuffers; -import org.apache.hugegraph.computer.core.sort.BufferFileSorter; -import org.apache.hugegraph.computer.core.sort.HgkvFileSorter; -import org.apache.hugegraph.computer.core.sort.Sorter; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.CombineSubKvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.KvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public abstract class SortManager implements Manager { - - public static final Logger LOG = Log.logger(SortManager.class); - - private final ComputerContext context; - private final ExecutorService sortExecutor; - private final Sorter sorter; - private final int capacity; - private final int flushThreshold; - - public SortManager(ComputerContext context) { - this.context = context; - Config config = context.config(); - if (this.threadNum(config) != 0) { - this.sortExecutor = ExecutorUtil.newFixedThreadPool( - this.threadNum(config), this.threadPrefix()); - } else { - this.sortExecutor = null; - } - if (config.get(ComputerOptions.TRANSPORT_RECV_FILE_MODE)) { - this.sorter = new BufferFileSorter(config); - } else { - this.sorter = new HgkvFileSorter(config); - } - this.capacity = config.get( - ComputerOptions.WORKER_WRITE_BUFFER_INIT_CAPACITY); - this.flushThreshold = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - } - - @Override - public abstract String name(); - - protected abstract String threadPrefix(); - - protected Integer threadNum(Config config) { - return config.get(ComputerOptions.SORT_THREAD_NUMS); - } - - @Override - public void init(Config config) { - // pass - } - - @Override - public void close(Config config) { - if (this.sortExecutor == null) { - return; - } - this.sortExecutor.shutdown(); - try { - this.sortExecutor.awaitTermination(Constants.SHUTDOWN_TIMEOUT, - TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - LOG.warn("Interrupted when waiting sort executor terminated"); - } - } - - public CompletableFuture sort(MessageType type, - WriteBuffers buffer) { - return CompletableFuture.supplyAsync(() -> { - RandomAccessInput bufferForRead = buffer.wrapForRead(); - // TODO:This ByteBuffer should be allocated from the off-heap - BytesOutput output = IOFactory.createBytesOutput(this.capacity); - InnerSortFlusher flusher = this.createSortFlusher( - type, output, - this.flushThreshold); - try { - this.sorter.sortBuffer(bufferForRead, flusher, - type == MessageType.EDGE); - } catch (Exception e) { - throw new ComputerException("Failed to sort buffers of %s " + - "message", e, type.name()); - } - - return ByteBuffer.wrap(output.buffer(), 0, (int) output.position()); - }, this.sortExecutor); - } - - public CompletableFuture mergeBuffers(List inputs, - String path, - boolean withSubKv, - OuterSortFlusher flusher) { - return CompletableFuture.runAsync(() -> { - if (withSubKv) { - flusher.sources(inputs.size()); - } - try { - this.sorter.mergeBuffers(inputs, flusher, path, withSubKv); - } catch (Exception e) { - throw new ComputerException( - "Failed to merge %s buffers to file '%s'", - e, inputs.size(), path); - } - }, this.sortExecutor); - } - - public void mergeInputs(List inputs, List outputs, - boolean withSubKv, OuterSortFlusher flusher) { - if (withSubKv) { - flusher.sources(inputs.size()); - } - try { - this.sorter.mergeInputs(inputs, flusher, outputs, withSubKv); - } catch (Exception e) { - throw new ComputerException( - "Failed to merge %s files into %s files", - e, inputs.size(), outputs.size()); - } - } - - public PeekableIterator iterator(List outputs, - boolean withSubKv) { - try { - return this.sorter.iterator(outputs, withSubKv); - } catch (IOException e) { - throw new ComputerException("Failed to iterate files: '%s'", - outputs); - } - } - - private InnerSortFlusher createSortFlusher(MessageType type, - RandomAccessOutput output, - int flushThreshold) { - PointerCombiner combiner; - boolean needSortSubKv; - - switch (type) { - case VERTEX: - combiner = new VertexValueCombiner(this.context); - needSortSubKv = false; - break; - case EDGE: - combiner = new EdgeValueCombiner(this.context); - needSortSubKv = true; - break; - case MSG: - combiner = this.createMessageCombiner(); - needSortSubKv = false; - break; - default: - throw new ComputerException("Unsupported combine message " + - "type for %s", type); - } - - InnerSortFlusher flusher; - if (combiner == null) { - flusher = new KvInnerSortFlusher(output); - } else { - if (needSortSubKv) { - flusher = new CombineSubKvInnerSortFlusher(output, combiner, - flushThreshold); - } else { - flusher = new CombineKvInnerSortFlusher(output, combiner); - } - } - - return flusher; - } - - private PointerCombiner createMessageCombiner() { - Config config = this.context.config(); - Combiner valueCombiner = config.createObject( - ComputerOptions.WORKER_COMBINER_CLASS, - false); - if (valueCombiner == null) { - return null; - } - return new MessageValueCombiner(this.context); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingFactory.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingFactory.java deleted file mode 100644 index 50a064828..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingFactory.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.Iterator; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; - -public class SortingFactory { - - private static final SortingMode MODE = SortingMode.LOSER_TREE; - - public static InputsSorting createSorting( - List> inputs, - SortingMode mode) { - switch (mode) { - case HEAP: - return createHeapSorting(inputs); - case LOSER_TREE: - return createLoserTreeSorting(inputs); - default: - throw new ComputerException("Can't create sorting for '%s'", - mode); - } - } - - public static InputsSorting createSorting( - List> inputs) { - return createSorting(inputs, MODE); - } - - private static InputsSorting createLoserTreeSorting( - List> inputs) { - return new LoserTreeInputsSorting<>(inputs); - } - - private static InputsSorting createHeapSorting( - List> inputs) { - return new HeapInputsSorting<>(inputs); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingMode.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingMode.java deleted file mode 100644 index a471c545b..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingMode.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -/** - * Multi-way sorting algorithm type - */ -public enum SortingMode { - - LOSER_TREE, - HEAP -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/EntryIterator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/EntryIterator.java deleted file mode 100644 index 32c9f335d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/EntryIterator.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import org.apache.commons.lang.NotImplementedException; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.iterator.CIter; - -public interface EntryIterator extends CIter { - - @Override - default Object metadata(String meta, Object... args) { - throw new NotImplementedException(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileGenerator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileGenerator.java deleted file mode 100644 index 29b9be729..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileGenerator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.nio.file.Paths; -import java.util.List; -import java.util.UUID; - -public interface FileGenerator { - - /** - * Allocate a base directory each call. There may be multi base - * directories configured by user, generally each base directory - * represent a disk, allocated by round mode. - * - * For example, the base directories configured - * ["/disk1/job_001/container_001", "/disk2/job_001/container_001"]. - * It indicates there are two base directories and each base directory - * for one disk. - * First call returns "/disk1/job_001/container_001", - * second call returns "/disk2/job_001/container_001" - * and third call returns "/disk1/job_001/container_001" and so on in - * round mode. - * - * Note: Can't request a directory and write many files into it, this will - * cause the io pressure can't distributed over several disks. - * - * @return The directory of allocated local base directory. - */ - String nextDirectory(); - - /** - * Allocate a base directory each call, return allocated base directory + - * joined string of paths. - * - * @param paths The paths as sub-directory. - * @return A string representation of a directory "#nextDirectory() + - * joined string of paths" - */ - default String nextDirectory(String... paths) { - return Paths.get(this.nextDirectory(), paths).toString(); - } - - default String randomDirectory(String... paths) { - return Paths.get(this.nextDirectory(paths), - UUID.randomUUID().toString()) - .toString(); - } - - List dirs(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileReader.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileReader.java deleted file mode 100644 index eca38535c..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileReader.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.core.store; - -public interface KvEntryFileReader { - - EntryIterator iterator(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileWriter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileWriter.java deleted file mode 100644 index 0291667a9..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/KvEntryFileWriter.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.Closeable; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface KvEntryFileWriter extends Closeable { - - /** - * Write kvEntry to file. - */ - void write(KvEntry entry) throws IOException; - - /** - * Finish build file. - * You can release resources or do some aftercare in this method. - */ - void finish() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/SuperstepFileGenerator.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/SuperstepFileGenerator.java deleted file mode 100644 index 665f9ec08..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/SuperstepFileGenerator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -public class SuperstepFileGenerator { - - private final FileGenerator fileGenerator; - private final int superstep; - - public SuperstepFileGenerator(FileGenerator fileGenerator, - int superstep) { - this.fileGenerator = fileGenerator; - this.superstep = superstep; - } - - public String nextPath(String type) { - String[] paths = {type, Integer.toString(this.superstep), - UUID.randomUUID().toString()}; - return this.fileGenerator.nextDirectory(paths); - } - - public List superstepDirs(int superstep, String type) { - List superstepDirs = new ArrayList<>(); - String[] paths = {type, Integer.toString(superstep)}; - for (String dir : this.fileGenerator.dirs()) { - superstepDirs.add(Paths.get(dir, paths).toString()); - } - return superstepDirs; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesInput.java deleted file mode 100644 index 9f05e64ed..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesInput.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.buffer; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class KvEntriesInput implements EntryIterator { - - private final RandomAccessInput input; - private final boolean withSubKv; - private final RandomAccessInput userAccessInput; - - public KvEntriesInput(RandomAccessInput input, boolean withSubKv) { - this.input = input; - this.withSubKv = withSubKv; - try { - this.userAccessInput = this.input.duplicate(); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public KvEntriesInput(RandomAccessInput input) { - this(input, false); - } - - @Override - public boolean hasNext() { - try { - return this.input.available() > 0; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public KvEntry next() { - return EntriesUtil.kvEntryFromInput(this.input, this.userAccessInput, - true, this.withSubKv); - } - - @Override - public void close() throws IOException { - this.input.close(); - this.userAccessInput.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesWithFirstSubKvInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesWithFirstSubKvInput.java deleted file mode 100644 index ccf2f8bd4..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/KvEntriesWithFirstSubKvInput.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.buffer; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.iterator.CIter; -import org.apache.hugegraph.iterator.MapperIterator; - -public class KvEntriesWithFirstSubKvInput implements EntryIterator { - - private final CIter entries; - - public KvEntriesWithFirstSubKvInput(RandomAccessInput input) { - this.entries = new MapperIterator<>( - new KvEntriesInput(input), - EntriesUtil::kvEntryWithFirstSubKv); - } - - @Override - public boolean hasNext() { - return this.entries.hasNext(); - } - - @Override - public KvEntry next() { - return this.entries.next(); - } - - @Override - public void close() throws Exception { - this.entries.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/SubKvEntriesInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/SubKvEntriesInput.java deleted file mode 100644 index cf9cadaaa..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/buffer/SubKvEntriesInput.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.buffer; - -import java.io.IOException; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class SubKvEntriesInput implements EntryIterator { - - private final RandomAccessInput input; - private final RandomAccessInput useAccessInput; - private int size; - private final boolean useInlinePointer; - - public SubKvEntriesInput(KvEntry kvEntry, boolean useInlinePointer) { - try { - this.input = IOFactory.createBytesInput(kvEntry.value().bytes()); - this.useAccessInput = this.input.duplicate(); - this.size = this.input.readFixedInt(); - this.useInlinePointer = useInlinePointer; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public SubKvEntriesInput(KvEntry kvEntry) { - this(kvEntry, true); - } - - @Override - public boolean hasNext() { - return this.size > 0; - } - - @Override - public KvEntry next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - - this.size--; - return EntriesUtil.subKvEntryFromInput(this.input, this.useAccessInput, - this.useInlinePointer); - } - - @Override - public void close() throws Exception { - this.input.close(); - this.useAccessInput.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/AbstractKvEntry.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/AbstractKvEntry.java deleted file mode 100644 index 0570edeff..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/AbstractKvEntry.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -public abstract class AbstractKvEntry implements KvEntry { - - protected final Pointer key; - protected final Pointer value; - - public AbstractKvEntry(Pointer key, Pointer value) { - this.key = key; - this.value = value; - } - - @Override - public Pointer key() { - return this.key; - } - - @Override - public Pointer value() { - return this.value; - } - - @Override - public int compareTo(KvEntry o) { - return this.key.compareTo(o.key()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/CachedPointer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/CachedPointer.java deleted file mode 100644 index 06798cbb9..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/CachedPointer.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.util.BytesUtil; - -public class CachedPointer implements Pointer { - - private final RandomAccessInput input; - private final long offset; - private final long length; - private byte[] bytes; - - public CachedPointer(RandomAccessInput input, long offset, long length) { - this.input = input; - this.offset = offset; - this.length = length; - this.bytes = null; - } - - @Override - public RandomAccessInput input() { - return this.input; - } - - @Override - public long offset() { - return this.offset; - } - - @Override - public long length() { - return this.length; - } - - @Override - public byte[] bytes() throws IOException { - if (this.bytes == null) { - this.input.seek(this.offset); - this.bytes = this.input.readBytes((int) this.length); - } - return this.bytes; - } - - @Override - public void write(RandomAccessOutput output) throws IOException { - output.writeFixedInt((int) this.length); - output.write(this.bytes()); - } - - @Override - public int compareTo(Pointer other) { - try { - return BytesUtil.compare(this.bytes(), other.bytes()); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/DefaultKvEntry.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/DefaultKvEntry.java deleted file mode 100644 index a13afbc0e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/DefaultKvEntry.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -public class DefaultKvEntry extends AbstractKvEntry { - - private final long numSubEntries; - - public DefaultKvEntry(Pointer key, Pointer value, long numSubEntries) { - super(key, value); - this.numSubEntries = numSubEntries; - } - - public DefaultKvEntry(Pointer key, Pointer value) { - this(key, value, 0L); - } - - @Override - public long numSubEntries() { - return this.numSubEntries; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntriesUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntriesUtil.java deleted file mode 100644 index 03d1abddf..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntriesUtil.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.buffer.SubKvEntriesInput; - -public final class EntriesUtil { - - public static KvEntry kvEntryFromInput(RandomAccessInput input, - RandomAccessInput userAccessInput, - boolean useInlinePointer, - boolean valueWithSubKv) { - try { - if (useInlinePointer) { - return inlinePointerKvEntry(input, valueWithSubKv); - } else { - return cachedPointerKvEntry(input, userAccessInput, - valueWithSubKv); - } - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public static KvEntry kvEntryFromInput(RandomAccessInput input, - boolean useInlinePointer, - boolean valueWithSubKv) { - return kvEntryFromInput(input, input, useInlinePointer, valueWithSubKv); - } - - private static KvEntry cachedPointerKvEntry( - RandomAccessInput input, - RandomAccessInput userAccessInput, - boolean valueWithSubKv) - throws IOException { - int numSubKvEntries = 0; - - // Read key - int keyLength = input.readFixedInt(); - long keyPosition = input.position(); - input.skip(keyLength); - - // Read value - int valueLength = input.readFixedInt(); - long valuePosition = input.position(); - if (valueWithSubKv) { - numSubKvEntries = input.readFixedInt(); - input.skip(valueLength - Integer.BYTES); - } else { - input.skip(valueLength); - } - - Pointer key = new CachedPointer(userAccessInput, keyPosition, - keyLength); - Pointer value = new CachedPointer(userAccessInput, valuePosition, - valueLength); - - return new DefaultKvEntry(key, value, numSubKvEntries); - } - - private static KvEntry inlinePointerKvEntry(RandomAccessInput input, - boolean valueWithSubKv) - throws IOException { - int numSubEntries = 0; - // Read key - int keyLength = input.readFixedInt(); - byte[] keyBytes = input.readBytes(keyLength); - - // Read value - int valueLength = input.readFixedInt(); - byte[] valueBytes = new byte[valueLength]; - if (valueWithSubKv) { - numSubEntries = input.readFixedInt(); - valueBytes[0] = (byte) (numSubEntries & 0xFF); - valueBytes[1] = (byte) ((numSubEntries >> 8) & 0xFF); - valueBytes[2] = (byte) ((numSubEntries >> 16) & 0xFF); - valueBytes[3] = (byte) ((numSubEntries >> 24) & 0xFF); - input.readFully(valueBytes, 4, valueLength - 4); - } else { - input.readFully(valueBytes); - } - - Pointer key = new InlinePointer(keyBytes); - Pointer value = new InlinePointer(valueBytes); - - return new DefaultKvEntry(key, value, numSubEntries); - } - - public static KvEntry subKvEntryFromInput(RandomAccessInput input, - RandomAccessInput userAccessInput, - boolean useInlinePointer) { - try { - Pointer key, value; - if (useInlinePointer) { - byte[] keyBytes = input.readBytes(input.readFixedInt()); - key = new InlinePointer(keyBytes); - - byte[] valueBytes = input.readBytes(input.readFixedInt()); - value = new InlinePointer(valueBytes); - } else { - int keyLength = input.readFixedInt(); - key = new CachedPointer(userAccessInput, input.position(), - keyLength); - input.skip(keyLength); - - int valueLength = input.readFixedInt(); - value = new CachedPointer(userAccessInput, input.position(), - valueLength); - input.skip(valueLength); - } - return new DefaultKvEntry(key, value); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public static KvEntry subKvEntryFromInput(RandomAccessInput input, - boolean useInlinePointer) { - return subKvEntryFromInput(input, input, useInlinePointer); - } - - public static KvEntryWithFirstSubKv kvEntryWithFirstSubKv(KvEntry entry) { - try { - BytesInput input = IOFactory.createBytesInput(entry.value() - .bytes()); - // Read sub-entry size - long subKvNum = input.readFixedInt(); - KvEntry firstSubKv = EntriesUtil.subKvEntryFromInput(input, true); - - return new KvEntryWithFirstSubKv(entry.key(), entry.value(), - firstSubKv, subKvNum); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public static BytesInput inputFromOutput(BytesOutput output) { - return IOFactory.createBytesInput(output.buffer(), - (int) output.position()); - } - - public static EntryIterator subKvIterFromEntry(KvEntry entry) { - return new SubKvEntriesInput(entry); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInputImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInputImpl.java deleted file mode 100644 index dae29884e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInputImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.Readable; - -public class EntryInputImpl implements EntryInput { - - private final RandomAccessInput input; - - public EntryInputImpl(RandomAccessInput input) { - this.input = input; - } - - @Override - public KvEntryReader readEntry(Readable key) throws IOException { - // Read key - this.readData(key); - return new KvEntryReaderImpl(this.input); - } - - @Override - public void readEntry(Readable key, Readable value) throws IOException { - // Read key - this.readData(key); - // Read data - this.readData(value); - } - - private void readData(Readable data) throws IOException { - // Read data length - this.input.readFixedInt(); - // Read data - data.read(this.input); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutput.java deleted file mode 100644 index c28462bfb..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutput.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.Writable; - -public interface EntryOutput { - - /** - * Write entry with multiple sub-key and sub-value. - * Used when write vertex with edges, each sub-key is target id of an edge, - * each sub-value is the properties of an edge. - * The output format: - * | key length | key | total sub-entry length | sub-entry count | - * | sub-key1 length | sub-key1 | sub-value1 length | sub-value1 | - * | sub-key2 length | sub-key2 | sub-value2 length | sub-value2 | - */ - KvEntryWriter writeEntry(Writable key) throws IOException; - - /** - * Write entry with single value. - * Used when write vertex without edges and write message. - * The output format: - * | key length | key | value length | value | - */ - void writeEntry(Writable key, Writable value) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutputImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutputImpl.java deleted file mode 100644 index 3ccec02c6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryOutputImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Writable; - -public class EntryOutputImpl implements EntryOutput { - - private final RandomAccessOutput output; - private final boolean needSortSubKv; - - public EntryOutputImpl(RandomAccessOutput output, - boolean needSortSubKv) { - this.output = output; - this.needSortSubKv = needSortSubKv; - } - - public EntryOutputImpl(RandomAccessOutput output) { - this(output, true); - } - - @Override - public KvEntryWriter writeEntry(Writable key) throws IOException { - // Write key - this.writeData(key); - return new KvEntryWriterImpl(this.output, this.needSortSubKv); - } - - @Override - public void writeEntry(Writable key, Writable value) throws IOException { - // Write key - this.writeData(key); - // Write value - this.writeData(value); - } - - private void writeData(Writable data) throws IOException { - // Write data length placeholder - this.output.writeFixedInt(0); - long position = this.output.position(); - // Write data - data.write(this.output); - // Fill data length placeholder - int dataLength = (int) (this.output.position() - position); - this.output.writeFixedInt(position - Integer.BYTES, dataLength); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/InlinePointer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/InlinePointer.java deleted file mode 100644 index 14b624599..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/InlinePointer.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.util.BytesUtil; - -public class InlinePointer implements Pointer { - - private final long length; - private final byte[] bytes; - - public InlinePointer(byte[] bytes) { - this.length = bytes.length; - this.bytes = bytes; - } - - public InlinePointer(byte[] bytes, long length) { - this.length = length; - this.bytes = bytes; - } - - @Override - public RandomAccessInput input() { - return IOFactory.createBytesInput(this.bytes); - } - - @Override - public byte[] bytes() { - return this.bytes; - } - - @Override - public void write(RandomAccessOutput output) throws IOException { - output.writeFixedInt((int) this.length); - output.write(this.bytes(), 0, (int) this.length); - } - - @Override - public long offset() { - return 0L; - } - - @Override - public long length() { - return this.length; - } - - @Override - public int compareTo(Pointer other) { - try { - return BytesUtil.compare(this.bytes(), (int) this.length, - other.bytes(), (int) other.length()); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntry.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntry.java deleted file mode 100644 index edb8def3e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntry.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -public interface KvEntry extends Comparable { - - Pointer key(); - - Pointer value(); - - long numSubEntries(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReaderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReaderImpl.java deleted file mode 100644 index fee7fef22..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReaderImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.Readable; - -public class KvEntryReaderImpl implements KvEntryReader { - - private final RandomAccessInput input; - private int remaining; - - public KvEntryReaderImpl(RandomAccessInput input) { - this.input = input; - try { - @SuppressWarnings("unused") - int totalLength = input.readFixedInt(); - this.remaining = input.readFixedInt(); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void readSubKv(Readable subKey, Readable subValue) - throws IOException { - this.readDataWithoutLength(subKey); - this.readDataWithoutLength(subValue); - this.remaining--; - } - - @Override - public boolean hasRemaining() throws IOException { - return this.remaining > 0; - } - - private void readDataWithoutLength(Readable data) throws IOException { - // Read data directly - data.read(this.input); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWithFirstSubKv.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWithFirstSubKv.java deleted file mode 100644 index 73a64565d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWithFirstSubKv.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -public class KvEntryWithFirstSubKv extends DefaultKvEntry { - - private final KvEntry firstSubKv; - - public KvEntryWithFirstSubKv(Pointer key, Pointer value, - KvEntry firstSubKv, long subKvNum) { - super(key, value, subKvNum); - this.firstSubKv = firstSubKv; - } - - @Override - public int compareTo(KvEntry o) { - int result = this.key().compareTo(o.key()); - if (result == 0) { - KvEntryWithFirstSubKv other = (KvEntryWithFirstSubKv) o; - result = this.firstSubKv.compareTo(other.firstSubKv); - } - - return result; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriter.java deleted file mode 100644 index afec090d6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.Writable; - -public interface KvEntryWriter { - - void writeSubKv(Writable subKey, Writable subValue) throws IOException; - - void writeFinish() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Pointer.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Pointer.java deleted file mode 100644 index a5a9f8779..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Pointer.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public interface Pointer extends Range, Comparable { - - RandomAccessInput input(); - - byte[] bytes() throws IOException; - - void write(RandomAccessOutput output) throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Range.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Range.java deleted file mode 100644 index 6cf715f2a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/Range.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.entry; - -public interface Range { - - long offset(); - - long length(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryBuilder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryBuilder.java deleted file mode 100644 index 5e185c8a5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.bufferfile; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class BufferFileEntryBuilder implements KvEntryFileWriter { - - private final RandomAccessOutput output; - - public BufferFileEntryBuilder(String path) { - try { - this.output = IOFactory.createFileOutput(new File(path)); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void write(KvEntry entry) throws IOException { - entry.key().write(this.output); - entry.value().write(this.output); - } - - @Override - public void finish() throws IOException { - this.close(); - } - - @Override - public void close() throws IOException { - this.output.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryReader.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryReader.java deleted file mode 100644 index 9d3b43249..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileEntryReader.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.bufferfile; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class BufferFileEntryReader implements KvEntryFileReader { - - private final File file; - private final boolean withSubKv; - - public BufferFileEntryReader(String path, boolean withSubKv) { - this.file = new File(path); - this.withSubKv = withSubKv; - } - - public BufferFileEntryReader(String path) { - this(path, false); - } - - @Override - public EntryIterator iterator() { - return new EntryIter(); - } - - private class EntryIter implements EntryIterator { - - public final RandomAccessInput input; - private final RandomAccessInput userAccessInput; - - public EntryIter() { - try { - this.input = IOFactory.createFileInput( - BufferFileEntryReader.this.file); - this.userAccessInput = this.input.duplicate(); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void close() throws Exception { - this.input.close(); - this.userAccessInput.close(); - } - - @Override - public boolean hasNext() { - try { - return this.input.available() > 0; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public KvEntry next() { - return EntriesUtil.kvEntryFromInput( - this.input, this.userAccessInput, true, - BufferFileEntryReader.this.withSubKv); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileSubEntryReader.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileSubEntryReader.java deleted file mode 100644 index 165abc020..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/bufferfile/BufferFileSubEntryReader.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.bufferfile; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class BufferFileSubEntryReader implements KvEntryFileReader { - - private final File file; - - public BufferFileSubEntryReader(String path) { - this.file = new File(path); - } - - @Override - public EntryIterator iterator() { - return new BufferFileSubEntryReader.EntryIter(); - } - - private class EntryIter implements EntryIterator { - - public final RandomAccessInput input; - private final RandomAccessInput userAccessInput; - - public EntryIter() { - try { - this.input = IOFactory.createFileInput( - BufferFileSubEntryReader.this.file); - this.userAccessInput = this.input.duplicate(); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void close() throws Exception { - this.input.close(); - this.userAccessInput.close(); - } - - @Override - public boolean hasNext() { - try { - return this.input.available() > 0; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public KvEntry next() { - return EntriesUtil.subKvEntryFromInput(this.input, - this.userAccessInput, - true); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/AbstractHgkvFile.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/AbstractHgkvFile.java deleted file mode 100644 index eb78a7700..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/AbstractHgkvFile.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile; - -public abstract class AbstractHgkvFile implements HgkvFile { - - public static final byte MAJOR_VERSION; - public static final byte MINOR_VERSION; - public static final String MAGIC; - - static { - MAJOR_VERSION = 1; - MINOR_VERSION = 0; - MAGIC = "hgkv"; - } - - protected final String path; - protected String magic; - protected long numEntries; - protected long numSubEntries; - protected long dataBlockSize; - protected long indexBlockSize; - protected byte[] max; - protected byte[] min; - protected String version; - - public AbstractHgkvFile(String path) { - this.path = path; - } - - @Override - public String path() { - return this.path; - } - - @Override - public long numEntries() { - return this.numEntries; - } - - @Override - public long numSubEntries() { - return this.numSubEntries; - } - - @Override - public String version() { - return this.version; - } - - @Override - public byte[] max() { - return this.max; - } - - @Override - public byte[] min() { - return this.min; - } - - @Override - public String magic() { - return this.magic; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDir.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDir.java deleted file mode 100644 index 03f56d484..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDir.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile; - -import java.util.List; - -/** - * One HgkvDir consists of segments, and each segment is a HgkvFile. - * one HgkvFile is a complete file, one HgkvDir consists of multiple HgkvFile. - */ -public interface HgkvDir extends HgkvFile { - - /** - * Return the segments in HgkvDir. - * A HgkvDir is a complete file, HgkvDir consists of multiple HgkvFile. - */ - List segments(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDirImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDirImpl.java deleted file mode 100644 index 24957395f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvDirImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.hugegraph.computer.core.io.BufferedFileOutput; -import org.apache.hugegraph.computer.core.util.BytesUtil; -import org.apache.hugegraph.exception.NotSupportException; -import org.apache.hugegraph.util.E; - -public class HgkvDirImpl extends AbstractHgkvFile implements HgkvDir { - - public static final String FILE_NAME_PREFIX = "hgkv_"; - public static final String FILE_EXTEND_NAME = ".hgkv"; - private static final String FILE_NAME_REGEX = - FILE_NAME_PREFIX + "[0-9]+" + FILE_EXTEND_NAME; - private static final Pattern FILE_NUM_PATTERN = Pattern.compile("[0-9]+"); - - private final List segments; - - private HgkvDirImpl(String path) { - this(path, null); - } - - private HgkvDirImpl(String path, List segments) { - super(path); - this.segments = segments; - } - - public static HgkvDir create(String path) throws IOException { - File file = new File(path); - E.checkArgument(!file.exists(), - "Can't create HgkvDir because the " + - "directory already exists: '%s'", file.getPath()); - file.mkdirs(); - return new HgkvDirImpl(path); - } - - public static HgkvDir open(String path) throws IOException { - E.checkArgumentNotNull(path, "Parameter path can't be null"); - File file = new File(path); - E.checkArgument(file.exists(), - "Failed to open path because it does not exists: '%s'", - file.getPath()); - E.checkArgument(file.isDirectory(), - "Failed to open path " + - "because it's not a directory: '%s'", - file.getPath()); - return open(file); - } - - private static File[] scanHgkvFiles(File dir) { - return dir.listFiles((dirName, name) -> name.matches(FILE_NAME_REGEX)); - } - - private static HgkvDir open(File file) throws IOException { - File[] files = scanHgkvFiles(file); - assert files != null && files.length != 0; - - // Open segments - List segments = segmentsFromFiles(files); - - // Set HgkvDir properties - HgkvDirImpl hgkvDir = new HgkvDirImpl(file.getPath(), segments); - hgkvDir.build(); - - return hgkvDir; - } - - private static List segmentsFromFiles(File[] files) - throws IOException { - List segments = new ArrayList<>(); - for (File file : files) { - segments.add(HgkvFileImpl.open(file)); - } - segments.sort((o1, o2) -> { - int id1 = fileNameToSegmentId(o1.path()); - int id2 = fileNameToSegmentId(o2.path()); - return Integer.compare(id1, id2); - }); - return segments; - } - - private static int fileNameToSegmentId(String path) { - String fileName = Paths.get(path).getFileName().toString(); - Matcher matcher = FILE_NUM_PATTERN.matcher(fileName); - E.checkState(matcher.find(), - "Can't get segment id from illegal file name: '%s'", - fileName); - return Integer.parseInt(matcher.group()); - } - - @Override - public void close() throws IOException { - // pass - } - - @Override - public byte[] max() { - return this.max; - } - - @Override - public byte[] min() { - return this.min; - } - - @Override - public List segments() { - return this.segments; - } - - @Override - public BufferedFileOutput output() throws FileNotFoundException { - throw new NotSupportException("Can't get output from HgkvDir"); - } - - private void build() throws IOException { - this.magic = MAGIC; - this.version = MAJOR_VERSION + "." + MINOR_VERSION; - this.numEntries = this.segments.stream() - .mapToLong(HgkvFile::numEntries) - .sum(); - this.numSubEntries = this.segments.stream() - .mapToLong(HgkvFile::numSubEntries) - .sum(); - this.max = this.segments.stream() - .map(HgkvFile::max) - .max(BytesUtil::compare) - .orElse(null); - this.min = this.segments.stream() - .map(HgkvFile::min) - .min(BytesUtil::compare) - .orElse(null); - // Close segments - for (HgkvFile segment : this.segments) { - segment.close(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFile.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFile.java deleted file mode 100644 index 3e4ae3406..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFile.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile; - -import java.io.Closeable; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public interface HgkvFile extends Closeable { - - /** - * The absolute path includes file name. - */ - String path(); - - /** - * Number of entries in file. - */ - long numEntries(); - - /** - * Number of sub entries in file. - */ - long numSubEntries(); - - /** - * File version. - */ - String version(); - - /** - * Max key in file. - */ - byte[] max(); - - /** - * Min key in file. - */ - byte[] min(); - - /** - * File verification string. - */ - String magic(); - - /** - * Output of hgkv file. - */ - RandomAccessOutput output() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/BlockBuilder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/BlockBuilder.java deleted file mode 100644 index d78dd2de4..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/BlockBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface BlockBuilder { - - void add(KvEntry entry) throws IOException; - - long sizeOfEntry(KvEntry entry) throws IOException; - - long size(); - - void finish() throws IOException; - - void reset() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/DataBlockBuilderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/DataBlockBuilderImpl.java deleted file mode 100644 index 90e304d3d..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/DataBlockBuilderImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public class DataBlockBuilderImpl implements BlockBuilder { - - private final RandomAccessOutput output; - private long entriesBytes; - - public DataBlockBuilderImpl(RandomAccessOutput output) { - this.output = output; - this.entriesBytes = 0L; - } - - @Override - public void add(KvEntry entry) throws IOException { - entry.key().write(this.output); - entry.value().write(this.output); - this.entriesBytes += this.sizeOfEntry(entry); - } - - @Override - public long sizeOfEntry(KvEntry entry) { - long keyLength = Integer.BYTES + entry.key().length(); - long valueLength = Integer.BYTES + entry.value().length(); - return keyLength + valueLength; - } - - @Override - public long size() { - return this.entriesBytes; - } - - @Override - public void finish() { - // pass - } - - @Override - public void reset() { - this.entriesBytes = 0L; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvDirBuilderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvDirBuilderImpl.java deleted file mode 100644 index 1a3b17ff6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvDirBuilderImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; -import java.nio.file.Paths; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.util.E; - -public class HgkvDirBuilderImpl implements KvEntryFileWriter { - - private final Config config; - // The max byte size of hgkv-file data - private final long maxEntriesBytes; - - private final HgkvDir dir; - private int segmentId; - private HgkvFileBuilder segmentBuilder; - private boolean buildFinished; - - public HgkvDirBuilderImpl(Config config, String path) { - try { - this.config = config; - this.maxEntriesBytes = config.get( - ComputerOptions.HGKV_MAX_FILE_SIZE); - this.dir = HgkvDirImpl.create(path); - this.segmentId = 0; - this.segmentBuilder = nextSegmentBuilder(config, this.dir, - ++this.segmentId); - this.buildFinished = false; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void write(KvEntry entry) throws IOException { - E.checkState(!this.buildFinished, - "Failed to write entry, builder is finished"); - E.checkArgument(entry != null && entry.key() != null && - entry.value() != null, - "Parameter entry can't be empty"); - - /* - * If the segment size is larger than FILE_MAX_SIZE after add entry - * Stop build of the current segment and create a new segment. - */ - long entrySize = this.segmentBuilder.sizeOfEntry(entry); - long segmentSize = this.segmentBuilder.dataLength(); - if ((entrySize + segmentSize) > this.maxEntriesBytes) { - // Create new hgkvFile. - this.segmentBuilder = nextSegmentBuilder(this.config, this.dir, - ++this.segmentId); - } - this.segmentBuilder.add(entry); - } - - @Override - public void finish() throws IOException { - if (this.buildFinished) { - return; - } - this.segmentBuilder.finish(); - this.buildFinished = true; - } - - @Override - public void close() throws IOException { - this.finish(); - } - - private HgkvFileBuilder nextSegmentBuilder(Config config, HgkvDir dir, - int segmentId) - throws IOException { - if (this.segmentBuilder != null) { - this.segmentBuilder.finish(); - } - String fileName = StringUtils.join(HgkvDirImpl.FILE_NAME_PREFIX, - String.valueOf(segmentId), - HgkvDirImpl.FILE_EXTEND_NAME); - String path = Paths.get(dir.path(), fileName).toString(); - return new HgkvFileBuilderImpl(config, path); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilder.java deleted file mode 100644 index 685c3c6f5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.Closeable; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.store.entry.KvEntry; - -public interface HgkvFileBuilder extends Closeable { - - /** - * Add kv entry to file. - */ - void add(KvEntry entry) throws IOException; - - /** - * Return size of new entry. - */ - long sizeOfEntry(KvEntry entry); - - /** - * Finish build file. - */ - void finish() throws IOException; - - /** - * Return the size of entry in bytes that has been written. - */ - long dataLength(); - - /** - * Return the size of index block length. - */ - long indexLength(); - - /** - * Return the size of header. - */ - int headerLength(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilderImpl.java deleted file mode 100644 index 8f82b5e36..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/HgkvFileBuilderImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFile; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFileImpl; -import org.apache.hugegraph.util.E; - -public class HgkvFileBuilderImpl implements HgkvFileBuilder { - - // Max entries size of a block - private final long maxDataBlockSize; - - private final HgkvFile file; - private final RandomAccessOutput output; - private final BlockBuilder dataBlockBuilder; - private final IndexBlockBuilder indexBlockBuilder; - private boolean buildFinished; - - private final List indexBlock; - private long numEntries; - private long numSubEntries; - private long dataLength; - private int footerLength; - private long maxKeyOffset; - private final long minKeyOffset; - - public HgkvFileBuilderImpl(Config config, String path) throws IOException { - this.maxDataBlockSize = config.get(ComputerOptions.HGKV_DATABLOCK_SIZE); - this.file = HgkvFileImpl.create(path); - this.output = this.file.output(); - this.dataBlockBuilder = new DataBlockBuilderImpl(this.output); - this.indexBlockBuilder = new IndexBlockBuilderImpl(this.output); - this.buildFinished = false; - this.dataLength = 0L; - - this.indexBlock = new ArrayList<>(); - this.numEntries = 0L; - this.numSubEntries = 0L; - this.footerLength = 0; - this.maxKeyOffset = 0L; - this.minKeyOffset = 0L; - } - - @Override - public void add(KvEntry entry) throws IOException { - E.checkState(!this.buildFinished, - "Failed to write entry, builder is finished"); - E.checkArgument(entry != null, - "Parameter entry can't be null"); - - this.blockAddEntry(entry); - this.changeMetaAfterAdd(entry); - } - - @Override - public long sizeOfEntry(KvEntry entry) { - long keySize = Integer.BYTES + entry.key().length(); - long valueSize = Integer.BYTES + entry.value().length(); - return keySize + valueSize; - } - - @Override - public void finish() throws IOException { - if (this.buildFinished) { - return; - } - - this.dataBlockBuilder.finish(); - this.writeIndexBlock(); - this.writeFooter(); - this.output.close(); - this.file.close(); - this.buildFinished = true; - } - - @Override - public long dataLength() { - return this.dataLength; - } - - @Override - public long indexLength() { - return this.indexBlockBuilder.length(); - } - - @Override - public int headerLength() { - return this.footerLength; - } - - @Override - public void close() throws IOException { - this.finish(); - } - - private void changeMetaAfterAdd(KvEntry entry) { - this.numEntries++; - this.numSubEntries += entry.numSubEntries(); - this.maxKeyOffset = this.dataLength; - - this.dataLength += this.sizeOfEntry(entry); - } - - private void blockAddEntry(KvEntry entry) throws IOException { - // Finish and reset builder if the block is full. - long entrySize = this.dataBlockBuilder.sizeOfEntry(entry); - long blockSize = this.dataBlockBuilder.size(); - if ((entrySize + blockSize) >= this.maxDataBlockSize) { - this.dataBlockBuilder.finish(); - this.dataBlockBuilder.reset(); - - this.indexBlock.add(entry.key().bytes()); - } - this.dataBlockBuilder.add(entry); - } - - private void writeIndexBlock() throws IOException { - for (byte[] index : this.indexBlock) { - this.indexBlockBuilder.add(index); - } - this.indexBlockBuilder.finish(); - } - - private void writeFooter() throws IOException { - long startPostion = this.output.position(); - // Write magic - this.output.writeBytes(HgkvFileImpl.MAGIC); - // Write numEntries - this.output.writeLong(this.numEntries); - // Write numSubEntries - this.output.writeLong(this.numSubEntries); - // Write length of dataBlock - this.output.writeLong(this.dataLength); - // Write length of indexBlock - this.output.writeLong(this.indexLength()); - // Write max key offset - this.output.writeLong(this.maxKeyOffset); - // Write min key offset - this.output.writeLong(this.minKeyOffset); - // Write version - this.output.writeShort(HgkvFileImpl.MAJOR_VERSION); - this.output.writeShort(HgkvFileImpl.MINOR_VERSION); - // Write footerLength - this.footerLength = (int) (this.output.position() - startPostion); - this.footerLength += Integer.BYTES; - this.output.writeFixedInt(this.footerLength); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilder.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilder.java deleted file mode 100644 index a7910205f..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; - -public interface IndexBlockBuilder { - - void add(byte[] index) throws IOException; - - void finish(); - - long length(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilderImpl.java deleted file mode 100644 index b769855fd..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/builder/IndexBlockBuilderImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.builder; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; - -public class IndexBlockBuilderImpl implements IndexBlockBuilder { - - private final RandomAccessOutput output; - private long blockSize; - - public IndexBlockBuilderImpl(RandomAccessOutput output) { - this.output = output; - this.blockSize = 0L; - } - - @Override - public void add(byte[] index) throws IOException { - this.output.writeFixedInt(index.length); - this.output.write(index); - this.blockSize += Integer.SIZE + index.length; - } - - @Override - public void finish() { - // pass - } - - @Override - public long length() { - return this.blockSize; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDir4SubKvReaderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDir4SubKvReaderImpl.java deleted file mode 100644 index 45370ceb1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDir4SubKvReaderImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.reader; - -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.iterator.CIter; -import org.apache.hugegraph.iterator.MapperIterator; - -public class HgkvDir4SubKvReaderImpl implements KvEntryFileReader { - - private final KvEntryFileReader reader; - - public HgkvDir4SubKvReaderImpl(String path, boolean useInlinePointer) { - this.reader = new HgkvDirReaderImpl(path, useInlinePointer, true); - } - - public HgkvDir4SubKvReaderImpl(String path) { - this(path, true); - } - - @Override - public EntryIterator iterator() { - return new KvEntryWithFirstSubKvIter(this.reader); - } - - private static class KvEntryWithFirstSubKvIter implements EntryIterator { - - private final CIter entries; - - public KvEntryWithFirstSubKvIter(KvEntryFileReader reader) { - this.entries = new MapperIterator<>(reader.iterator(), entry -> { - return EntriesUtil.kvEntryWithFirstSubKv(entry); - }); - } - - @Override - public boolean hasNext() { - return this.entries.hasNext(); - } - - @Override - public KvEntry next() { - return this.entries.next(); - } - - @Override - public void close() throws Exception { - this.entries.close(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDirReaderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDirReaderImpl.java deleted file mode 100644 index 7c9fe15b0..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvDirReaderImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.reader; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFile; - -public class HgkvDirReaderImpl implements KvEntryFileReader { - - private final HgkvDir hgkvDir; - private final boolean useInlinePointer; - private final boolean withSubKv; - - public HgkvDirReaderImpl(String path, boolean useInlinePointer, - boolean withSubKv) { - try { - this.hgkvDir = HgkvDirImpl.open(path); - this.useInlinePointer = useInlinePointer; - this.withSubKv = withSubKv; - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - public HgkvDirReaderImpl(String path, boolean withSubKv) { - this(path, true, withSubKv); - } - - public HgkvDirReaderImpl(String path) { - this(path, true, false); - } - - @Override - public EntryIterator iterator() { - try { - return new HgkvDirEntryIter(this.hgkvDir, this.useInlinePointer, - this.withSubKv); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - } - - private static class HgkvDirEntryIter implements EntryIterator { - - private final List segments; - private final List segmentsIters; - private int segmentIndex; - private long numEntries; - private EntryIterator kvIter; - private final boolean useInlinePointer; - private final boolean withSubKv; - - public HgkvDirEntryIter(HgkvDir hgkvDir, boolean useInlinePointer, - boolean withSubKv) - throws IOException { - this.segments = hgkvDir.segments(); - this.segmentsIters = new ArrayList<>(); - this.segmentIndex = 0; - this.numEntries = hgkvDir.numEntries(); - this.kvIter = null; - this.useInlinePointer = useInlinePointer; - this.withSubKv = withSubKv; - } - - @Override - public boolean hasNext() { - return this.hasNextKey(); - } - - @Override - public KvEntry next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - - try { - if (this.kvIter == null || !this.kvIter.hasNext()) { - this.kvIter = this.nextKeyIter(); - } - this.numEntries--; - return this.kvIter.next(); - } catch (Exception e) { - throw new ComputerException(e.getMessage(), e); - } - } - - @Override - public void close() throws Exception { - for (EntryIterator iterator : this.segmentsIters) { - iterator.close(); - } - for (HgkvFile segment : this.segments) { - segment.close(); - } - } - - private EntryIterator nextKeyIter() throws Exception { - HgkvFile segment = this.segments.get(this.segmentIndex++); - KvEntryFileReader reader = new HgkvFileReaderImpl( - segment.path(), this.useInlinePointer, - this.withSubKv); - EntryIterator iterator = reader.iterator(); - this.segmentsIters.add(iterator); - return iterator; - } - - private boolean hasNextKey() { - return this.numEntries > 0; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvFileReaderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvFileReaderImpl.java deleted file mode 100644 index 08d049158..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/reader/HgkvFileReaderImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.hgkvfile.reader; - -import java.io.File; -import java.io.IOException; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFile; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFileImpl; - -public class HgkvFileReaderImpl implements KvEntryFileReader { - - private final HgkvFile hgkvFile; - private final boolean useInlinePointer; - private final boolean withSubKv; - - public HgkvFileReaderImpl(String path, boolean useInlinePointer, - boolean withSubKv) - throws IOException { - this.hgkvFile = HgkvFileImpl.open(path); - this.useInlinePointer = useInlinePointer; - this.withSubKv = withSubKv; - } - - public HgkvFileReaderImpl(String path, boolean withSubKv) - throws IOException { - this(path, true, withSubKv); - } - - @Override - public EntryIterator iterator() { - return new EntryIter(this.hgkvFile, this.useInlinePointer, - this.withSubKv); - } - - private static class EntryIter implements EntryIterator { - - private final HgkvFile file; - private final RandomAccessInput input; - private final RandomAccessInput userAccessInput; - private long numEntries; - private final boolean useInlinePointer; - private final boolean withSubKv; - - public EntryIter(HgkvFile hgkvFile, boolean useInlinePointer, - boolean withSubKv) { - this.file = hgkvFile; - this.numEntries = this.file.numEntries(); - File file = new File(this.file.path()); - try { - this.input = IOFactory.createFileInput(file); - this.userAccessInput = this.input.duplicate(); - } catch (IOException e) { - throw new ComputerException(e.getMessage(), e); - } - this.useInlinePointer = useInlinePointer; - this.withSubKv = withSubKv; - } - - @Override - public boolean hasNext() { - return this.numEntries > 0; - } - - @Override - public KvEntry next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - - this.numEntries--; - return EntriesUtil.kvEntryFromInput(this.input, - this.userAccessInput, - this.useInlinePointer, - this.withSubKv); - } - - @Override - public void close() throws IOException { - this.file.close(); - this.input.close(); - this.userAccessInput.close(); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DefaultSelectedFiles.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DefaultSelectedFiles.java deleted file mode 100644 index b180c032a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DefaultSelectedFiles.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.select; - -import java.util.List; - -import com.google.common.collect.ImmutableList; - -public class DefaultSelectedFiles implements SelectedFiles { - - private final List inputs; - private final String output; - - public DefaultSelectedFiles(String output, List inputs) { - this.output = output; - this.inputs = ImmutableList.copyOf(inputs); - } - - @Override - public List inputs() { - return this.inputs; - } - - @Override - public String output() { - return this.output; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DisperseEvenlySelector.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DisperseEvenlySelector.java deleted file mode 100644 index 5484d7e5a..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/DisperseEvenlySelector.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.select; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFile; -import org.apache.hugegraph.util.E; - -import com.google.common.collect.Lists; - -public class DisperseEvenlySelector implements InputFilesSelector { - - @Override - public List selectedByHgkvFile(List inputs, - List outputs) - throws IOException { - E.checkArgument(inputs.size() >= outputs.size(), - "The inputs size of InputFilesSelector must be >= " + - "outputs size, but got %s inputs < %s outputs", - inputs.size(), outputs.size()); - - List inputDirs = new ArrayList<>(); - for (String input : inputs) { - inputDirs.add(HgkvDirImpl.open(input)); - } - /* - * Reverse sort by entries number first - * will make the disperse result more uniform - */ - inputDirs = inputDirs.stream() - .sorted(Comparator.comparingLong( - HgkvFile::numEntries).reversed()) - .collect(Collectors.toList()); - - // Init heap data - List heapNodes = new ArrayList<>(outputs.size()); - int i = 0; - for (; i < outputs.size(); i++) { - HgkvDir inputDir = inputDirs.get(i); - Node heapNode = new Node(inputDir.numEntries(), - Lists.newArrayList(inputDir.path()), - outputs.get(i)); - heapNodes.add(heapNode); - } - Heap heap = new Heap<>(heapNodes, - Comparator.comparingLong(Node::num)); - // Distribute the remaining input - for (; i < inputDirs.size(); i++) { - HgkvDir inputDir = inputDirs.get(i); - Node topNode = heap.top(); - topNode.addInput(inputDir.path()); - topNode.addNum(inputDir.numEntries()); - heap.adjust(0); - } - - List results = new ArrayList<>(); - for (Node node : heapNodes) { - SelectedFiles result = new DefaultSelectedFiles(node.output(), - node.inputs()); - results.add(result); - } - - return results; - } - - @Override - public List selectedByBufferFile(List inputs, - List outputs) { - E.checkArgument(inputs.size() >= outputs.size(), - "The inputs size of InputFilesSelector must be >= " + - "outputs size, but got %s inputs < %s outputs", - inputs.size(), outputs.size()); - - // TODO: design a better way of distribute - int size = outputs.size(); - List> group = new ArrayList<>(size); - for (int i = 0; i < size; i++) { - group.add(new ArrayList<>()); - } - for (int i = 0; i < inputs.size(); i++) { - List item = group.get(i % size); - item.add(inputs.get(i)); - } - List result = new ArrayList<>(); - for (int i = 0; i < size; i++) { - result.add(new DefaultSelectedFiles(outputs.get(i), group.get(i))); - } - - return result; - } - - private static class Heap { - - private final List data; - private final Comparator comparator; - private final int size; - - public Heap(List data, Comparator comparator) { - this.data = data; - this.size = data.size(); - this.comparator = comparator; - - this.buildHeap(this.size); - } - - private void buildHeap(int size) { - for (int index = (size >> 1) - 1; index >= 0; index--) { - this.adjust(index); - } - } - - private void adjust(int index) { - int child; - while ((child = (index << 1) + 1) < this.size) { - if (child < this.size - 1 && - this.compare(this.data.get(child), - this.data.get(child + 1)) > 0) { - child++; - } - if (this.compare(this.data.get(index), - this.data.get(child)) > 0) { - this.swap(index, child); - index = child; - } else { - break; - } - } - } - - private T top() { - return this.data.get(0); - } - - private void swap(int i, int j) { - T tmp = this.data.get(i); - this.data.set(i, this.data.get(j)); - this.data.set(j, tmp); - } - - private int compare(T t1, T t2) { - return this.comparator.compare(t1, t2); - } - } - - private static class Node { - - private long num; - private final List inputs; - private final String output; - - public Node(long numEntries, List inputs, String output) { - this.num = numEntries; - this.inputs = inputs; - this.output = output; - } - - public long num() { - return this.num; - } - - public void addNum(long num) { - this.num += num; - } - - public List inputs() { - return this.inputs; - } - - public void addInput(String input) { - this.inputs.add(input); - } - - public String output() { - return this.output; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/InputFilesSelector.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/InputFilesSelector.java deleted file mode 100644 index ea7306e11..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/InputFilesSelector.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.core.store.file.select; - -import java.io.IOException; -import java.util.List; - -public interface InputFilesSelector { - - /** - * Select the input files to the output files. - * @return key is output file. value is input files. - */ - List selectedByHgkvFile(List inputs, - List outputs) - throws IOException; - - /** - * Select the input files to the output files. - * @return key is output file. value is input files. - */ - List selectedByBufferFile(List inputs, - List outputs) - throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/SelectedFiles.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/SelectedFiles.java deleted file mode 100644 index 2fdf220a1..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/select/SelectedFiles.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.select; - -import java.util.List; - -public interface SelectedFiles { - - List inputs(); - - String output(); -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReader.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReader.java deleted file mode 100644 index 6d72c79ad..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReader.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.Closeable; -import java.io.IOException; - -public interface BitsFileReader extends Closeable { - - /** - * Read 1 boolean from file, file is a directory. - * Use 1 long store 64 booleans, read from low to high. - * @return boolean data - */ - boolean readBoolean() throws IOException; - - void close() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReaderImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReaderImpl.java deleted file mode 100644 index d4d448bee..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileReaderImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.config.Config; - -public class BitsFileReaderImpl implements BitsFileReader { - - private static final int BUFFER_BITS = Long.BYTES << 3; - - private final ValueFileInput input; - private boolean closed; - private long byteBuffer; - private int cursor; - - public BitsFileReaderImpl(Config config, String path) throws IOException { - this(config, new File(path)); - } - - public BitsFileReaderImpl(Config config, File file) throws IOException { - this.input = new ValueFileInput(config, file); - this.closed = false; - - this.byteBuffer = this.input.readLong(); - this.cursor = 0; - } - - @Override - public boolean readBoolean() throws IOException { - if (this.cursor >= BUFFER_BITS) { - this.byteBuffer = this.input.readLong(); - this.cursor = 0; - } - - return (this.byteBuffer >> this.cursor++ & 1) == 1; - } - - @Override - public void close() throws IOException { - if (this.closed) { - return; - } - this.closed = true; - this.input.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriter.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriter.java deleted file mode 100644 index 714da3e32..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriter.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.Closeable; -import java.io.IOException; - -public interface BitsFileWriter extends Closeable { - - /** - * Write 1 boolean to file, file is a directory. - * Use 1 long store 64 booleans, write from low to high. - * @param value boolean data - * @throws IOException - */ - void writeBoolean(boolean value) throws IOException; - - /** - * Write 1 long to buffer when invoke writeBoolean 64 times. - * This method will write the buffer to the file, but the part of written - * not enough 64 times will not be written to the file. - * @throws IOException - */ - void flush() throws IOException; - - void close() throws IOException; -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriterImpl.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriterImpl.java deleted file mode 100644 index acea3e0c6..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/BitsFileWriterImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.config.Config; - -public class BitsFileWriterImpl implements BitsFileWriter { - - private static final int BUFFER_BITS = Long.BYTES << 3; - - private final ValueFileOutput output; - private boolean finished; - private long byteBuffer; - private int cursor; - - public BitsFileWriterImpl(Config config, String dir) throws IOException { - this(config, new File(dir)); - } - - public BitsFileWriterImpl(Config config, File dir) throws IOException { - this.output = new ValueFileOutput(config, dir); - this.finished = false; - - this.byteBuffer = 0L; - this.cursor = 0; - } - - @Override - public void writeBoolean(boolean value) throws IOException { - if (value) { - this.byteBuffer |= (1L << this.cursor); - } - this.cursor++; - - if (this.cursor >= BUFFER_BITS) { - this.output.writeLong(this.byteBuffer); - this.byteBuffer = 0L; - this.cursor = 0; - } - } - - @Override - public void flush() throws IOException { - this.output.flushBuffer(); - } - - @Override - public void close() throws IOException { - if (this.finished) { - return; - } - this.finished = true; - this.output.writeLong(this.byteBuffer); - this.output.close(); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFile.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFile.java deleted file mode 100644 index 7327c7b18..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFile.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.File; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.hugegraph.util.E; - -import com.google.common.collect.Lists; - -public class ValueFile { - - private static final String SEGMENT_NAME_PREFIX = "value_file_"; - private static final String SEGMENT_NAME_REGEX = SEGMENT_NAME_PREFIX + - "[0-9]+"; - private static final Pattern FILE_NUM_PATTERN = Pattern.compile("[0-9]+"); - - private ValueFile() { - // pass - } - - public static List scanSegment(File dir) { - E.checkArgument(dir.isDirectory(), - "The parameter dir must be a directory"); - - File[] segments = dir.listFiles((dirName, name) -> { - return name.matches(SEGMENT_NAME_REGEX); - }); - assert segments != null; - - Arrays.sort(segments, - Comparator.comparingInt(ValueFile::idFromSegment)); - return Lists.newArrayList(segments); - } - - public static File segmentFromId(File dir, int segmentId) { - E.checkArgument(dir.isDirectory(), - "The parameter dir must be a directory"); - String name = SEGMENT_NAME_PREFIX + segmentId; - return Paths.get(dir.getAbsolutePath(), name).toFile(); - } - - public static long fileLength(File dir) { - return ValueFile.scanSegment(dir) - .stream() - .mapToLong(File::length) - .sum(); - } - - private static int idFromSegment(File segment) { - String fileName = segment.getName(); - Matcher matcher = FILE_NUM_PATTERN.matcher(fileName); - E.checkState(matcher.find(), - "Can't get segment id from illegal file name: '%s'", - fileName); - return Integer.parseInt(matcher.group()); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileInput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileInput.java deleted file mode 100644 index 70efbd438..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileInput.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.EOFException; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.List; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.AbstractBufferedFileInput; -import org.apache.hugegraph.computer.core.io.UnsafeBytesInput; -import org.apache.hugegraph.util.E; - -public class ValueFileInput extends AbstractBufferedFileInput { - - private final Config config; - private final long maxSegmentSize; - private final File dir; - private final List segments; - - private int segmentIndex; - private RandomAccessFile currentSegment; - - public ValueFileInput(Config config, File dir) throws IOException { - this(config, dir, Constants.BIG_BUF_SIZE); - } - - public ValueFileInput(Config config, File dir, int bufferCapacity) - throws IOException { - super(bufferCapacity, ValueFile.fileLength(dir)); - - this.config = config; - this.maxSegmentSize = config.get( - ComputerOptions.VALUE_FILE_MAX_SEGMENT_SIZE); - E.checkArgument(bufferCapacity >= 8 && - bufferCapacity <= this.maxSegmentSize, - "The parameter bufferSize must be >= 8 " + - "and <= %s", this.maxSegmentSize); - E.checkArgument(dir.isDirectory(), - "The parameter dir must be a directory"); - this.dir = dir; - this.segments = ValueFile.scanSegment(dir); - E.checkArgument(CollectionUtils.isNotEmpty(this.segments), - "Can't find any segment in dir '%s'", - dir.getAbsolutePath()); - - this.segmentIndex = -1; - this.currentSegment = this.nextSegment(); - this.fileOffset = 0L; - - this.fillBuffer(); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOException { - int bufferRemain = super.remaining(); - int segmentRemain = this.currentSegmentRemain(); - - if (bufferRemain >= len) { - super.readFully(b, off, len); - } else if (this.bufferCapacity() >= len) { - this.shiftAndFillBuffer(); - super.readFully(b, off, len); - } else if ((bufferRemain + segmentRemain) >= len) { - super.readFully(b, off, bufferRemain); - this.currentSegment.readFully(b, off + bufferRemain, - len - bufferRemain); - this.fileOffset += len - bufferRemain; - } else { - int offset = off; - int length = len; - - super.readFully(b, offset, bufferRemain); - offset += bufferRemain; - length -= bufferRemain; - - this.currentSegment.readFully(b, offset, segmentRemain); - offset += segmentRemain; - length -= segmentRemain; - - while (true) { - this.currentSegment.close(); - this.currentSegment = this.nextSegment(); - if (length > this.maxSegmentSize) { - this.currentSegment.readFully(b, offset, - (int) this.maxSegmentSize); - offset += this.maxSegmentSize; - length -= this.maxSegmentSize; - } else { - this.currentSegment.readFully(b, offset, length); - break; - } - } - this.fileOffset += (len - bufferRemain); - } - } - - @Override - public void seek(long position) throws IOException { - if (position == this.position()) { - return; - } - if (position > this.fileLength()) { - throw new EOFException(String.format( - "Can't seek to %s, reach the end of file", - position)); - } - - // Seek position in buffer - long bufferStart = this.fileOffset - this.limit(); - if (bufferStart <= position && position <= this.fileOffset) { - super.seek(position - bufferStart); - return; - } - - /* - * Calculate the segment corresponding to position and - * seek to the corresponding position of the segment - */ - int segmentIndex = (int) (position / this.maxSegmentSize); - if (segmentIndex != this.segmentIndex) { - this.currentSegment.close(); - this.currentSegment = new RandomAccessFile( - this.segments.get(segmentIndex), - Constants.FILE_MODE_READ); - this.segmentIndex = segmentIndex; - } - long seekPosition = position - segmentIndex * this.maxSegmentSize; - this.currentSegment.seek(seekPosition); - - // Reset buffer after seek - super.seek(0L); - this.limit(0); - this.fileOffset = position; - - this.fillBuffer(); - } - - @Override - public void close() throws IOException { - this.currentSegment.close(); - } - - @Override - protected void fillBuffer() throws IOException { - int readLen = Math.min(this.bufferCapacity() - this.limit(), - (int) (this.fileLength() - this.fileOffset)); - int remain = this.currentSegmentRemain(); - if (readLen <= remain) { - this.currentSegment.readFully(this.buffer(), this.limit(), readLen); - } else { - this.currentSegment.readFully(this.buffer(), this.limit(), remain); - this.currentSegment.close(); - this.currentSegment = this.nextSegment(); - this.currentSegment.readFully(this.buffer(), - this.limit() + remain, - readLen - remain); - } - this.fileOffset += readLen; - this.limit(this.limit() + readLen); - } - - @Override - public UnsafeBytesInput duplicate() throws IOException { - ValueFileInput input = new ValueFileInput(this.config, this.dir, - this.bufferCapacity()); - input.seek(this.position()); - return input; - } - - private int currentSegmentRemain() throws IOException { - long remain = this.maxSegmentSize - - this.currentSegment.getFilePointer(); - return (int) remain; - } - - private RandomAccessFile nextSegment() throws FileNotFoundException { - File segment = this.segments.get(++this.segmentIndex); - return new RandomAccessFile(segment, Constants.FILE_MODE_READ); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileOutput.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileOutput.java deleted file mode 100644 index 5630fef02..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/seqfile/ValueFileOutput.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store.file.seqfile; - -import java.io.EOFException; -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.AbstractBufferedFileOutput; -import org.apache.hugegraph.util.E; - -public class ValueFileOutput extends AbstractBufferedFileOutput { - - private final long maxSegmentSize; - private final File dir; - private final List segments; - - private int segmentIndex; - private RandomAccessFile currentSegment; - - public ValueFileOutput(Config config, File dir) throws IOException { - this(config, dir, Constants.BIG_BUF_SIZE); - } - - public ValueFileOutput(Config config, File dir, int bufferCapacity) - throws IOException { - super(bufferCapacity); - - this.maxSegmentSize = config.get( - ComputerOptions.VALUE_FILE_MAX_SEGMENT_SIZE); - E.checkArgument(this.maxSegmentSize <= Integer.MAX_VALUE, - "Max size of segment must be smaller than '%s' " + - "but get '%s'", Integer.MAX_VALUE, this.maxSegmentSize); - E.checkArgument(bufferCapacity >= 8 && - bufferCapacity <= this.maxSegmentSize, - "The parameter bufferCapacity must be >= 8 " + - "and <= %s", this.maxSegmentSize); - E.checkArgument(dir.isDirectory(), - "The parameter dir must be a directory"); - this.dir = dir; - this.segments = ValueFile.scanSegment(dir); - this.segmentIndex = -1; - this.currentSegment = this.nextSegment(); - } - - @Override - public void write(byte[] b) throws IOException { - this.write(b, 0, b.length); - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - if (this.bufferAvailable() >= len) { - super.write(b, off, len); - return; - } - - this.flushBuffer(); - if (this.bufferCapacity() >= len) { - super.write(b, off, len); - return; - } - - int remain = this.currentSegmentRemain(); - if (remain >= len) { - this.currentSegment.write(b, off, len); - } else { - int tempLen = len; - int offset = off; - this.currentSegment.write(b, offset, remain); - - tempLen -= remain; - offset += remain; - - /* - * The read length maybe greater than the size of multiple segments. - * So need to write multiple segments. - */ - while (true) { - this.currentSegment.close(); - this.currentSegment = this.nextSegment(); - if (tempLen > this.maxSegmentSize) { - this.currentSegment.write(b, offset, - (int) this.maxSegmentSize); - tempLen -= this.maxSegmentSize; - offset += this.maxSegmentSize; - } else { - this.currentSegment.write(b, offset, tempLen); - break; - } - } - } - this.fileOffset += len; - } - - @Override - public void seek(long position) throws IOException { - E.checkArgument(position >= 0, - "Parameter position must >= 0, but get '%s'", - position); - if (this.fileOffset <= position && position <= this.position()) { - super.seek(position - this.fileOffset); - return; - } - - int segmentIndex = (int) (position / this.maxSegmentSize); - if (segmentIndex >= this.segments.size()) { - throw new EOFException(String.format( - "Can't seek to %s, reach the end of file", - position)); - } - - this.flushBuffer(); - if (segmentIndex != this.segmentIndex) { - this.currentSegment.close(); - this.currentSegment = new RandomAccessFile( - this.segments.get(segmentIndex), - Constants.FILE_MODE_WRITE); - this.segmentIndex = segmentIndex; - } - long seekPosition = position - segmentIndex * this.maxSegmentSize; - this.currentSegment.seek(seekPosition); - this.fileOffset = position; - } - - @Override - public void close() throws IOException { - this.flushBuffer(); - this.currentSegment.close(); - } - - @Override - public void flushBuffer() throws IOException { - int segmentRemain = this.currentSegmentRemain(); - int bufferSize = super.bufferSize(); - - if (segmentRemain >= bufferSize) { - this.currentSegment.write(super.buffer(), 0, bufferSize); - } else { - this.currentSegment.write(super.buffer(), 0, segmentRemain); - this.currentSegment.close(); - this.currentSegment = this.nextSegment(); - this.currentSegment.write(super.buffer(), segmentRemain, - bufferSize - segmentRemain); - } - this.fileOffset += bufferSize; - super.seek(0L); - } - - private RandomAccessFile nextSegment() throws IOException { - File segment; - if (++this.segmentIndex < this.segments.size()) { - segment = this.segments.get(this.segmentIndex); - } else { - segment = ValueFile.segmentFromId(this.dir, this.segmentIndex); - this.segments.add(segment); - } - - if (!segment.exists()) { - boolean result = segment.createNewFile(); - E.checkState(result, "Failed to create segment '%s'", - segment.getAbsolutePath()); - } - return new RandomAccessFile(segment, Constants.FILE_MODE_WRITE); - } - - private int currentSegmentRemain() throws IOException { - long remain = this.maxSegmentSize - - this.currentSegment.getFilePointer(); - return (int) remain; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtil.java deleted file mode 100644 index 4f3e544ad..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtil.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.allocator.Allocator; -import org.apache.hugegraph.computer.core.allocator.DefaultAllocator; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.config.DefaultConfig; -import org.apache.hugegraph.computer.core.graph.BuiltinGraphFactory; -import org.apache.hugegraph.computer.core.graph.GraphFactory; - -public class ComputerContextUtil { - - public static Config initContext(Map params) { - // Set algorithm's parameters - String algorithmParamsName = params.get( - ComputerOptions.ALGORITHM_PARAMS_CLASS.name()); - AlgorithmParams algorithmParams; - try { - algorithmParams = (AlgorithmParams) Class.forName( - algorithmParamsName).getDeclaredConstructor().newInstance(); - } catch (Exception e) { - throw new ComputerException("Can't create algorithmParams, algorithmParamsName = %s", - algorithmParamsName); - } - algorithmParams.setAlgorithmParameters(params); - - Config config = new DefaultConfig(params); - GraphFactory graphFactory = new BuiltinGraphFactory(); - Allocator allocator = new DefaultAllocator(config, graphFactory); - ComputerContext.initContext(config, graphFactory, allocator); - return config; - } - - public static void initContext(Properties properties) { - initContext(convertToMap(properties)); - } - - public static Map convertToMap(String... options) { - if (options == null || options.length == 0) { - throw new ComputerException("Config options can't be null " + - "or empty"); - } - if ((options.length & 0x01) == 1) { - throw new ComputerException("Config options length must be even"); - } - Map map = new HashMap<>(); - for (int i = 0; i < options.length; i += 2) { - map.put(options[i], options[i + 1]); - } - return map; - } - - public static Map convertToMap(Properties properties) { - if (properties == null) { - throw new ComputerException("Properties can't be null"); - } - - Map map = new HashMap<>(); - for (String key : properties.stringPropertyNames()) { - map.put(key, properties.getProperty(key)); - } - - return map; - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/Consumers.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/Consumers.java deleted file mode 100644 index 9ec6cfca5..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/Consumers.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public final class Consumers { - - private static final int CPU_CORE_NUM = 4; - public static final int THREADS = 4 + CPU_CORE_NUM / 4; - public static final int QUEUE_WORKER_SIZE = 1000; - public static final long CONSUMER_WAKE_PERIOD = 1; - - private static final Logger LOG = Log.logger(Consumers.class); - - private final ExecutorService executor; - private final Consumer consumer; - private final Runnable done; - - private final int workers; - private final int queueSize; - private final CountDownLatch latch; - private final BlockingQueue queue; - - private volatile boolean ending = false; - private volatile Throwable exception = null; - - public Consumers(ExecutorService executor, Consumer consumer) { - this(executor, consumer, null); - } - - public Consumers(ExecutorService executor, - Consumer consumer, Runnable done) { - this.executor = executor; - this.consumer = consumer; - this.done = done; - - int workers = THREADS; - if (this.executor instanceof ThreadPoolExecutor) { - workers = ((ThreadPoolExecutor) this.executor).getCorePoolSize(); - } - this.workers = workers; - this.queueSize = QUEUE_WORKER_SIZE * workers; - this.latch = new CountDownLatch(workers); - this.queue = new ArrayBlockingQueue<>(this.queueSize); - } - - public void start(String name) { - this.ending = false; - this.exception = null; - if (this.executor == null) { - return; - } - LOG.info("Starting {} workers[{}] with queue size {}...", - this.workers, name, this.queueSize); - for (int i = 0; i < this.workers; i++) { - this.executor.execute(this::runAndDone); - } - } - - private void runAndDone() { - try { - this.run(); - } catch (Throwable e) { - // Only the first exception of one thread can be stored - this.exception = e; - if (!(e instanceof StopExecution)) { - LOG.error("Error when running task", e); - } - } finally { - this.done(); - this.latch.countDown(); - } - } - - private void run() { - LOG.debug("Start to work..."); - while (!this.ending) { - this.consume(); - } - assert this.ending; - while (this.consume()) { - - } - - LOG.debug("Worker finished"); - } - - private boolean consume() { - V elem; - try { - elem = this.queue.poll(CONSUMER_WAKE_PERIOD, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - // ignore - return true; - } - if (elem == null) { - return false; - } - // do job - this.consumer.accept(elem); - return true; - } - - private void done() { - if (this.done == null) { - return; - } - - try { - this.done.run(); - } catch (Throwable e) { - if (this.exception == null) { - this.exception = e; - } else { - LOG.warn("Error while calling done()", e); - } - } - } - - private Throwable throwException() { - assert this.exception != null; - Throwable e = this.exception; - this.exception = null; - return e; - } - - public void provide(V v) throws Throwable { - if (this.executor == null) { - assert this.exception == null; - // do job directly if without thread pool - this.consumer.accept(v); - } else if (this.exception != null) { - throw this.throwException(); - } else { - try { - this.queue.put(v); - } catch (InterruptedException e) { - LOG.warn("Interrupted while enqueue", e); - } - } - } - - public void await() throws Throwable { - this.ending = true; - if (this.executor == null) { - // call done() directly if without thread pool - this.done(); - } else { - try { - this.latch.await(); - } catch (InterruptedException e) { - String error = "Interrupted while waiting for consumers"; - this.exception = new ComputerException(error, e); - LOG.warn(error, e); - } - } - - if (this.exception != null) { - throw this.throwException(); - } - } - - public ExecutorService executor() { - return this.executor; - } - - public static RuntimeException wrapException(Throwable e) { - if (e instanceof RuntimeException) { - throw (RuntimeException) e; - } - throw new ComputerException("Error when running task: %s", - ComputerException.rootCause(e).getMessage(), - e); - } - - public static class StopExecution extends ComputerException { - - private static final long serialVersionUID = -371829356182454517L; - - public StopExecution(String message) { - super(message); - } - - public StopExecution(String message, Object... args) { - super(message, args); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/FileUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/FileUtil.java deleted file mode 100644 index 6e014b9ff..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/FileUtil.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.io.File; -import java.util.List; - -import org.apache.commons.io.FileUtils; - -public final class FileUtil { - - public static void deleteFilesQuietly(List files) { - deleteFilesQuietly(files.toArray(new String[0])); - } - - public static void deleteFilesQuietly(String... files) { - for (String file : files) { - FileUtils.deleteQuietly(new File(file)); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtil.java deleted file mode 100644 index 3a86e2860..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtil.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.util.E; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class JsonUtil { - - private static final ObjectMapper OBJECT_MAPPER; - - static { - OBJECT_MAPPER = new ObjectMapper(); - OBJECT_MAPPER.setVisibility(PropertyAccessor.FIELD, - JsonAutoDetect.Visibility.ANY); - } - - public static String toJson(Object obj) { - try { - return OBJECT_MAPPER.writeValueAsString(obj); - } catch (JsonProcessingException e) { - throw new ComputerException("Can't write json: %s", - e, e.getMessage()); - } - } - - public static String toJsonWithClass(Object obj) { - E.checkArgumentNotNull(obj, "The obj can't be null"); - return obj.getClass().getSimpleName() + toJson(obj); - } - - public static T fromJson(String json, Class clazz) { - E.checkState(json != null, - "Json value can't be null for '%s'", - clazz.getSimpleName()); - try { - return OBJECT_MAPPER.readValue(json, clazz); - } catch (JsonProcessingException e) { - throw new ComputerException("Can't read json: %s", - e, e.getMessage()); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtil.java deleted file mode 100644 index 7dfb6d7ce..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtil.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Supplier; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; - -public final class SerializeUtil { - - public static byte[] toBytes(Writable obj) { - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - obj.write(bao); - return bao.toByteArray(); - } catch (IOException e) { - throw new ComputerException( - "Failed to create byte array with writable '%s'", e, obj); - } - } - - public static byte[] toBytes(List list) { - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - bao.writeInt(list.size()); - for (Writable obj : list) { - obj.write(bao); - } - return bao.toByteArray(); - } catch (IOException e) { - throw new ComputerException( - "Failed to create byte array with List '%s'", - e, list); - } - } - - public static void fromBytes(byte[] bytes, Readable obj) { - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - obj.read(bai); - } catch (IOException e) { - throw new ComputerException("Failed to read from byte array", e); - } - } - - public static List fromBytes(byte[] bytes, - Supplier supplier) { - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - int size = bai.readInt(); - List list = new ArrayList<>(size); - for (int i = 0; i < size; i++) { - V obj = supplier.get(); - obj.read(bai); - list.add(obj); - } - return list; - } catch (IOException e) { - throw new ComputerException("Failed to read from byte array", e); - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/StringEncodeUtil.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/StringEncodeUtil.java deleted file mode 100644 index 963f86e03..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/StringEncodeUtil.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.nio.charset.StandardCharsets; -import java.util.Base64; - -public final class StringEncodeUtil { - - private static final byte[] BYTES_EMPTY = new byte[0]; - - private static final Base64.Encoder BASE64_ENCODER = Base64.getEncoder(); - private static final Base64.Decoder BASE64_DECODER = Base64.getDecoder(); - - public static byte[] encode(String value) { - return value.getBytes(StandardCharsets.UTF_8); - } - - public static String decode(byte[] bytes) { - return new String(bytes, StandardCharsets.UTF_8); - } - - public static String decode(byte[] bytes, int offset, int length) { - return new String(bytes, offset, length, StandardCharsets.UTF_8); - } - - public static String encodeBase64(byte[] bytes) { - return BASE64_ENCODER.encodeToString(bytes); - } - - public static byte[] decodeBase64(String value) { - if (value.isEmpty()) { - return BYTES_EMPTY; - } - return BASE64_DECODER.decode(value); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java deleted file mode 100644 index 8d776b327..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerService.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.io.Closeable; -import java.net.InetSocketAddress; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.aggregator.WorkerAggrManager; -import org.apache.hugegraph.computer.core.bsp.Bsp4Worker; -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.compute.ComputeManager; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.SuperstepStat; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.input.WorkerInputManager; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.DataClientManager; -import org.apache.hugegraph.computer.core.network.DataServerManager; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.computer.core.network.connection.TransportConnectionManager; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.rpc.WorkerRpcManager; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SendSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.util.ShutdownHook; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class WorkerService implements Closeable { - - private static final Logger LOG = Log.logger(WorkerService.class); - - private volatile boolean inited; - private volatile boolean closed; - - private final ComputerContext context; - private final Map workers; - private final Managers managers; - private final ShutdownHook shutdownHook; - - private Bsp4Worker bsp4Worker; - private Config config; - private ComputeManager computeManager; - private ContainerInfo workerInfo; - private Combiner combiner; - - private volatile Thread serviceThread; - - public WorkerService() { - this.context = ComputerContext.instance(); - this.managers = new Managers(); - this.workers = new HashMap<>(); - this.inited = false; - this.closed = false; - this.shutdownHook = new ShutdownHook(); - } - - /** - * Init worker service, create the managers used by worker service. - */ - public synchronized void init(Config config) { - try { - LOG.info("{} Prepare to init WorkerService", this); - // TODO: what will happen if init() called by multiple threads? - E.checkArgument(!this.inited, "The %s has been initialized", this); - - this.serviceThread = Thread.currentThread(); - this.registerShutdownHook(); - this.config = config; - this.workerInfo = new ContainerInfo(); - - LOG.info("{} Start to initialize worker", this); - this.bsp4Worker = new Bsp4Worker(this.config, this.workerInfo); - /* - * Keep the waitMasterInitDone() called before initManagers(), - * in order to ensure master init() before worker managers init() - */ - ContainerInfo masterInfo = this.bsp4Worker.waitMasterInitDone(); - InetSocketAddress address = this.initManagers(masterInfo); - this.workerInfo.updateAddress(address); - this.loadComputation(); - - LOG.info("{} register WorkerService", this); - this.bsp4Worker.workerInitDone(); - this.connectToWorkers(); - - this.computeManager = new ComputeManager(this.workerInfo.id(), this.context, - this.managers); - - this.managers.initedAll(this.config); - LOG.info("{} WorkerService initialized", this); - this.inited = true; - } catch (Exception e) { - LOG.error("Error while initializing WorkerService", e); - // TODO: shall we call close() here? - throw e; - } - } - - private void loadComputation() { - Computation computation = this.config.createObject( - ComputerOptions.WORKER_COMPUTATION_CLASS); - LOG.info("Loading computation '{}' in category '{}'", - computation.name(), computation.category()); - - this.combiner = this.config.createObject(ComputerOptions.WORKER_COMBINER_CLASS, false); - if (this.combiner == null) { - LOG.info("None combiner is provided for computation '{}'", computation.name()); - } else { - LOG.info("Combiner '{}' is provided for computation '{}'", - this.combiner.name(), computation.name()); - } - } - - private void connectToWorkers() { - List workers = this.bsp4Worker.waitMasterAllInitDone(); - DataClientManager dm = this.managers.get(DataClientManager.NAME); - for (ContainerInfo worker : workers) { - this.workers.put(worker.id(), worker); - dm.connect(worker.id(), worker.hostname(), worker.dataPort()); - } - } - - private void registerShutdownHook() { - this.shutdownHook.hook(() -> { - this.stopServiceThread(); - this.cleanAndCloseBsp(); - }); - } - - /** - * Stop the worker service. Stop the managers created in {@link #init(Config)}. - */ - @Override - public synchronized void close() { - // TODO: why checkInited() here, if init throws exception, how to close the resource? - //this.checkInited(); - if (this.closed) { - LOG.info("{} WorkerService had closed before", this); - return; - } - - try { - if (this.computeManager != null) { - this.computeManager.close(); - } else { - LOG.warn("The computeManager is null"); - return; - } - } catch (Exception e) { - LOG.error("Error when closing ComputeManager", e); - } - /* - * Seems managers.closeAll() would do the following actions: - * TODO: close the connection to other workers. - * TODO: stop the connection to the master - * TODO: stop the data transportation server. - */ - try { - this.managers.closeAll(this.config); - } catch (Exception e) { - LOG.error("Error while closing managers", e); - } - - try { - this.bsp4Worker.workerCloseDone(); - this.bsp4Worker.close(); - } catch (Exception e) { - LOG.error("Error while closing bsp4Worker", e); - } - try { - this.shutdownHook.unhook(); - } catch (Exception e) { - LOG.error("Error while unhooking shutdownHook", e); - } - - this.closed = true; - LOG.info("{} WorkerService closed", this); - } - - private void stopServiceThread() { - if (this.serviceThread == null) { - return; - } - - try { - this.serviceThread.interrupt(); - } catch (Throwable ignore) { - } - } - - private void cleanAndCloseBsp() { - if (this.bsp4Worker == null) { - return; - } - - this.bsp4Worker.clean(); - this.bsp4Worker.close(); - } - - /** - * Execute the superstep in worker. It first waits master witch superstep - * to start from. And then do the superstep iteration until master's - * superstepStat is inactive. - */ - public void execute() { - LOG.info("{} WorkerService execute", this); - this.checkInited(); - - // TODO: determine superstep if fail over is enabled. - int superstep = this.bsp4Worker.waitMasterResumeDone(); - SuperstepStat superstepStat; - if (superstep == Constants.INPUT_SUPERSTEP) { - superstepStat = this.inputstep(); - superstep++; - } else { - // TODO: Get superstepStat from bsp service. - superstepStat = null; - } - - /* - * The master determine whether to execute the next superstep. The - * superstepStat is active while master decides to execute the next - * superstep. - */ - while (superstepStat.active()) { - WorkerContext context = new SuperstepContext(superstep, superstepStat); - LOG.info("Start computation of superstep {}", superstep); - if (superstep > 0) { - this.computeManager.takeRecvedMessages(); - } - /* - * Call beforeSuperstep() before all workers compute() called. - * - * NOTE: keep computeManager.compute() called after - * managers.beforeSuperstep(). - */ - this.managers.beforeSuperstep(this.config, superstep); - - /* - * Notify the master by each worker, when the master received all - * workers signal, then notify all workers to do compute(). - */ - this.bsp4Worker.workerStepPrepareDone(superstep); - this.bsp4Worker.waitMasterStepPrepareDone(superstep); - WorkerStat workerStat = this.computeManager.compute(context, superstep); - - this.bsp4Worker.workerStepComputeDone(superstep); - this.bsp4Worker.waitMasterStepComputeDone(superstep); - - /* - * Call afterSuperstep() after all workers compute() is done. - * - * NOTE: keep managers.afterSuperstep() called after - * computeManager.compute(), because managers may rely on - * computation, like WorkerAggrManager send aggregators to master - * after called aggregateValue(String name, V value) in computation. - */ - this.managers.afterSuperstep(this.config, superstep); - - this.bsp4Worker.workerStepDone(superstep, workerStat); - LOG.info("End computation of superstep {}", superstep); - - superstepStat = this.bsp4Worker.waitMasterStepDone(superstep); - superstep++; - } - this.outputstep(); - } - - @Override - public String toString() { - Object id = this.workerInfo == null ? "?" + this.hashCode() : this.workerInfo.id(); - return String.format("[worker %s]", id); - } - - private InetSocketAddress initManagers(ContainerInfo masterInfo) { - // Create managers - WorkerRpcManager rpcManager = new WorkerRpcManager(); - this.managers.add(rpcManager); - /* - * NOTE: this init() method will be called twice, will be ignored at - * the 2nd time call. - */ - WorkerRpcManager.updateRpcRemoteServerConfig(this.config, masterInfo.hostname(), - masterInfo.rpcPort()); - rpcManager.init(this.config); - - WorkerAggrManager aggregatorManager = new WorkerAggrManager(this.context); - aggregatorManager.service(rpcManager.aggregateRpcService()); - this.managers.add(aggregatorManager); - FileManager fileManager = new FileManager(); - this.managers.add(fileManager); - - SortManager recvSortManager = new RecvSortManager(this.context); - this.managers.add(recvSortManager); - - MessageRecvManager recvManager = new MessageRecvManager(this.context, - fileManager, recvSortManager); - this.managers.add(recvManager); - - ConnectionManager connManager = new TransportConnectionManager(); - DataServerManager serverManager = new DataServerManager(connManager, recvManager); - this.managers.add(serverManager); - - DataClientManager clientManager = new DataClientManager(connManager, this.context); - this.managers.add(clientManager); - - SortManager sendSortManager = new SendSortManager(this.context); - this.managers.add(sendSortManager); - - MessageSendManager sendManager = new MessageSendManager(this.context, sendSortManager, - clientManager.sender()); - this.managers.add(sendManager); - SnapshotManager snapshotManager = new SnapshotManager(this.context, sendManager, - recvManager, this.workerInfo); - this.managers.add(snapshotManager); - WorkerInputManager inputManager = new WorkerInputManager(this.context, sendManager, - snapshotManager); - inputManager.service(rpcManager.inputSplitService()); - this.managers.add(inputManager); - - // Init all managers - this.managers.initAll(this.config); - - InetSocketAddress address = serverManager.address(); - LOG.info("{} WorkerService initialized managers with data server address '{}'", - this, address); - return address; - } - - private void checkInited() { - E.checkArgument(this.inited, "The %s has not been initialized", this); - } - - /** - * Load vertices and edges from HugeGraph. There are two phases in - * inputstep. The First phase is to get input splits from master, and read the - * vertices and edges from input splits. The second phase is after all - * workers read input splits, the workers merge the vertices and edges to - * get the stats for each partition. - */ - private SuperstepStat inputstep() { - LOG.info("{} WorkerService inputstep started", this); - WorkerInputManager manager = this.managers.get(WorkerInputManager.NAME); - manager.loadGraph(); - - this.bsp4Worker.workerInputDone(); - this.bsp4Worker.waitMasterInputDone(); - - WorkerStat workerStat = this.computeManager.input(); - - this.bsp4Worker.workerStepDone(Constants.INPUT_SUPERSTEP, workerStat); - SuperstepStat superstepStat = this.bsp4Worker.waitMasterStepDone(Constants.INPUT_SUPERSTEP); - manager.close(this.config); - LOG.info("{} WorkerService inputstep finished", this); - return superstepStat; - } - - /** - * Write results back parallel to HugeGraph and signal the master. Be - * called after all superstep iteration finished. After this, this worker - * can exit successfully. - */ - private void outputstep() { - this.computeManager.output(); - this.bsp4Worker.workerOutputDone(); - LOG.info("{} WorkerService outputstep finished", this); - } - - private class SuperstepContext implements WorkerContext { - - private final int superstep; - private final SuperstepStat superstepStat; - private final WorkerAggrManager aggrManager; - private final MessageSendManager sendManager; - - private SuperstepContext(int superstep, SuperstepStat superstepStat) { - this.superstep = superstep; - this.superstepStat = superstepStat; - this.aggrManager = WorkerService.this.managers.get(WorkerAggrManager.NAME); - this.sendManager = WorkerService.this.managers.get(MessageSendManager.NAME); - } - - @Override - public Config config() { - return WorkerService.this.config; - } - - @Override - public Aggregator createAggregator(String name) { - return this.aggrManager.createAggregator(name); - } - - @Override - public void aggregateValue(String name, V value) { - this.aggrManager.aggregateValue(name, value); - } - - @Override - public V aggregatedValue(String name) { - return this.aggrManager.aggregatedValue(name); - } - - @Override - public void sendMessage(Id target, Value value) { - this.sendManager.sendMessage(target, value); - } - - @Override - public void sendMessageToAllEdges(Vertex vertex, Value value) { - for (Edge edge : vertex.edges()) { - this.sendMessage(edge.targetId(), value); - } - } - - @Override - public long totalVertexCount() { - return this.superstepStat.vertexCount(); - } - - @Override - public long totalEdgeCount() { - return this.superstepStat.edgeCount(); - } - - @Override - public int superstep() { - return this.superstep; - } - - /** - * Message combiner. - */ - @Override - @SuppressWarnings("unchecked") - public Combiner combiner() { - return (Combiner) WorkerService.this.combiner; - } - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStat.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStat.java deleted file mode 100644 index 40491f2c8..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStat.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.util.JsonUtil; -import org.apache.hugegraph.util.E; - -public class WorkerStat implements Readable, Writable, Iterable { - - private int workerId; - private List partitionStats; - - public WorkerStat() { - this(0); - } - - public WorkerStat(int workerId) { - this.workerId = workerId; - this.partitionStats = new ArrayList<>(); - } - - public int workerId() { - return this.workerId; - } - - public void add(PartitionStat stat) { - E.checkArgumentNotNull(stat, "The stat can't be null"); - this.partitionStats.add(stat); - } - - public PartitionStat get(int index) { - return this.partitionStats.get(index); - } - - public int size() { - return this.partitionStats.size(); - } - - @Override - public void read(RandomAccessInput in) throws IOException { - this.workerId = in.readInt(); - int size = in.readInt(); - this.partitionStats = new ArrayList<>(size); - for (int i = 0; i < size; i++) { - PartitionStat stat = new PartitionStat(); - stat.read(in); - this.partitionStats.add(stat); - } - } - - @Override - public void write(RandomAccessOutput out) throws IOException { - out.writeInt(this.workerId); - out.writeInt(this.partitionStats.size()); - for (PartitionStat stat : this.partitionStats) { - stat.write(out); - } - } - - @Override - public Iterator iterator() { - return this.partitionStats.iterator(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof WorkerStat)) { - return false; - } - WorkerStat other = (WorkerStat) obj; - return this.workerId == other.workerId && - this.partitionStats.equals(other.partitionStats); - } - - @Override - public int hashCode() { - return Integer.hashCode(this.workerId); - } - - @Override - public String toString() { - return JsonUtil.toJsonWithClass(this); - } -} diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/load/LoadService.java b/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/load/LoadService.java deleted file mode 100644 index 237b02d5e..000000000 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/load/LoadService.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker.load; - -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.vertex.DefaultVertex; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.input.EdgeFetcher; -import org.apache.hugegraph.computer.core.input.GraphFetcher; -import org.apache.hugegraph.computer.core.input.HugeConverter; -import org.apache.hugegraph.computer.core.input.InputFilter; -import org.apache.hugegraph.computer.core.input.InputSourceFactory; -import org.apache.hugegraph.computer.core.input.InputSplit; -import org.apache.hugegraph.computer.core.input.VertexFetcher; -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; -import org.apache.hugegraph.util.E; - -public class LoadService { - - private final GraphFactory graphFactory; - private final Config config; - - // Service proxy on the client - private InputSplitRpcService rpcService; - private final InputFilter inputFilter; - - private final int fetcherNum; - /* - * GraphFetcher include: - * VertexFetcher vertexFetcher; - * EdgeFetcher edgeFetcher; - */ - private final GraphFetcher[] fetchers; - private final AtomicInteger fetcherIdx; - - public LoadService(ComputerContext context) { - this.graphFactory = context.graphFactory(); - this.config = context.config(); - this.rpcService = null; - this.inputFilter = context.config().createObject( - ComputerOptions.INPUT_FILTER_CLASS); - this.fetcherNum = this.config.get(ComputerOptions.INPUT_SEND_THREAD_NUMS); - this.fetchers = new GraphFetcher[this.fetcherNum]; - this.fetcherIdx = new AtomicInteger(0); - } - - public void init() { - assert this.rpcService != null; - // provide different GraphFetcher for each sending thread - for (int i = 0; i < this.fetcherNum; i++) { - this.fetchers[i] = InputSourceFactory.createGraphFetcher(this.config, this.rpcService); - } - } - - public void close() { - for (GraphFetcher fetcher : this.fetchers) { - fetcher.close(); - } - } - - public void rpcService(InputSplitRpcService rpcService) { - E.checkNotNull(rpcService, "rpcService"); - this.rpcService = rpcService; - } - - public Iterator createIteratorFromVertex() { - int currentIdx = this.fetcherIdx.getAndIncrement() % this.fetcherNum; - return new IteratorFromVertex(this.fetchers[currentIdx]); - } - - public Iterator createIteratorFromEdge() { - int currentIdx = this.fetcherIdx.getAndIncrement() % this.fetcherNum; - return new IteratorFromEdge(this.fetchers[currentIdx]); - } - - private class IteratorFromVertex implements Iterator { - - private InputSplit currentSplit; - private GraphFetcher fetcher; - - public IteratorFromVertex(GraphFetcher fetcher) { - this.currentSplit = null; - this.fetcher = fetcher; - } - - @Override - public boolean hasNext() { - VertexFetcher vertexFetcher = this.fetcher.vertexFetcher(); - while (this.currentSplit == null || !vertexFetcher.hasNext()) { - /* - * The first time or the current split is complete, - * need to fetch next input split meta - */ - this.currentSplit = this.fetcher.nextVertexInputSplit(); - if (this.currentSplit.equals(InputSplit.END_SPLIT)) { - return false; - } - vertexFetcher.prepareLoadInputSplit(this.currentSplit); - } - return true; - } - - @Override - public Vertex next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - org.apache.hugegraph.structure.graph.Vertex hugeVertex; - hugeVertex = this.fetcher.vertexFetcher().next(); - return this.convert(hugeVertex); - } - - private Vertex convert(org.apache.hugegraph.structure.graph.Vertex - vertex) { - vertex = inputFilter.filter(vertex); - Id id = HugeConverter.convertId(vertex.id()); - String label = vertex.label(); - Properties properties = HugeConverter.convertProperties( - vertex.properties()); - Vertex computerVertex = graphFactory.createVertex(label, id, null); - computerVertex.properties(properties); - return computerVertex; - } - } - - private class IteratorFromEdge implements Iterator { - - /* - * TODO: If it is an in edge, we should get the data from the in shard; - * if it is a both edge, should get the data from the out, and then - * convert each edge to two vertices. For the time being, only consider - * the case of the out edge. - */ - // private final Direction direction; - private final int maxEdges; - private InputSplit currentSplit; - private Vertex currentVertex; - private GraphFetcher fetcher; - - public IteratorFromEdge(GraphFetcher fetcher) { - // this.direction = config.get(ComputerOptions.EDGE_DIRECTION); - this.maxEdges = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - this.currentSplit = null; - this.currentVertex = null; - this.fetcher = fetcher; - } - - @Override - public boolean hasNext() { - if (InputSplit.END_SPLIT.equals(this.currentSplit)) { - return this.currentVertex != null; - } - EdgeFetcher edgeFetcher = this.fetcher.edgeFetcher(); - while (this.currentSplit == null || !edgeFetcher.hasNext()) { - /* - * The first time or the current split is complete, - * need to fetch next input split meta - */ - this.currentSplit = this.fetcher.nextEdgeInputSplit(); - if (this.currentSplit.equals(InputSplit.END_SPLIT)) { - return this.currentVertex != null; - } - edgeFetcher.prepareLoadInputSplit(this.currentSplit); - } - return true; - } - - @Override - public Vertex next() { - if (!this.hasNext()) { - throw new NoSuchElementException(); - } - - org.apache.hugegraph.structure.graph.Edge hugeEdge; - EdgeFetcher edgeFetcher = this.fetcher.edgeFetcher(); - while (edgeFetcher.hasNext()) { - hugeEdge = edgeFetcher.next(); - Edge edge = this.convert(hugeEdge); - Id sourceId = HugeConverter.convertId(hugeEdge.sourceId()); - if (this.currentVertex == null) { - this.currentVertex = new DefaultVertex(graphFactory, - sourceId, null); - this.currentVertex.addEdge(edge); - } else if (this.currentVertex.id().equals(sourceId) && - this.currentVertex.numEdges() < this.maxEdges) { - /* - * Current edge is the adjacent edge of previous vertex and - * not reached the threshold of one vertex can hold - */ - this.currentVertex.addEdge(edge); - } else { - /* - * Current edge isn't the adjacent edge of previous vertex - * or reached the threshold of one vertex can hold - */ - Vertex vertex = this.currentVertex; - this.currentVertex = new DefaultVertex(graphFactory, - sourceId, null); - this.currentVertex.addEdge(edge); - return vertex; - } - } - assert this.currentVertex != null; - Vertex vertex = this.currentVertex; - this.currentVertex = null; - return vertex; - } - - private Edge convert(org.apache.hugegraph.structure.graph.Edge edge) { - edge = inputFilter.filter(edge); - Id targetId = HugeConverter.convertId(edge.targetId()); - Properties properties = HugeConverter.convertProperties( - edge.properties()); - Edge computerEdge = graphFactory.createEdge(edge.label(), - edge.name(), targetId - ); - computerEdge.label(edge.label()); - computerEdge.properties(properties); - return computerEdge; - } - } -} diff --git a/computer-dist/Dockerfile b/computer-dist/Dockerfile deleted file mode 100644 index 4b07bde8a..000000000 --- a/computer-dist/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# -# 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. -# -FROM openjdk:11-slim -LABEL maintainer="HugeGraph Docker Maintainers " -# use ParallelGC which is more friendly to olap system -ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseParallelGC -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" -COPY ./bin /hugegraph/hugegraph-computer/bin -COPY ./lib /hugegraph/hugegraph-computer/lib -COPY ./algorithm /hugegraph/hugegraph-computer/algorithm -COPY ./conf /hugegraph/hugegraph-computer/conf -WORKDIR /hugegraph/hugegraph-computer -RUN apt-get update && apt-get -y install gettext-base && apt-get -y install wget diff --git a/computer-dist/pom.xml b/computer-dist/pom.xml deleted file mode 100644 index 5ae7a5a3f..000000000 --- a/computer-dist/pom.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-dist - - - ${project.basedir}/src/assembly - ${assembly.dir}/descriptor - ${assembly.dir}/static - - - - - org.apache.hugegraph - computer-algorithm - provided - - - org.apache.hugegraph - computer-core - - - org.apache.hugegraph - computer-k8s-operator - provided - - - org.apache.hugegraph - computer-yarn - provided - - - - - - - maven-assembly-plugin - 2.4 - - - assembly-hugegraph-computer - package - - single - - - false - false - ${top.level.dir} - - ${assembly.descriptor.dir}/assembly.xml - ${final.name} - - - - - - - maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - *.tar.gz - - false - - - ${final.name} - - - - - - - maven-antrun-plugin - - - package - - run - - - - - - - - - - - - - - - - - - diff --git a/computer-dist/release-docs/LICENSE b/computer-dist/release-docs/LICENSE deleted file mode 100644 index c7ae03f9c..000000000 --- a/computer-dist/release-docs/LICENSE +++ /dev/null @@ -1,491 +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. - - - -============================================================================ - APACHE HUGEGRAPH (Incubating) SUBCOMPONENTS: - - The Apache HugeGraph(Incubating) project contains subcomponents with separate copyright - notices and license terms. Your use of the source code for the these - subcomponents is subject to the terms and conditions of the following - licenses. - -======================================================================== -Third party Apache 2.0 licenses -======================================================================== - -The following components are provided under the Apache 2.0 License. - (Apache License, Version 2.0) * ASM based accessors helper used by json-smart(net.minidev:accessors-smart:1.2-http://www.minidev.net/ ) - (Apache License, Version 2.0) * Apache Avro(org.apache.avro:avro:1.7.7-http://avro.apache.org ) - (Apache License, Version 2.0) * Bean Validation API(javax.validation:validation-api:1.1.0.Final-http://beanvalidation.org ) - (Apache License, Version 2.0) * Gson(com.google.code.gson:gson:2.2.4-http://code.google.com/p/google-gson/ ) - (Apache License, Version 2.0) * Commons CLI(commons-cli:commons-cli:1.2-http://commons.apache.org/cli/ ) - (Apache License, Version 2.0) * Apache Commons Collections(commons-collections:commons-collections:3.2.2-http://commons.apache.org/collections/ ) - (Apache License, Version 2.0) * Commons Lang(commons-lang:commons-lang:2.6-http://commons.apache.org/lang/ ) - (Apache License, Version 2.0) * Commons Math(org.apache.commons:commons-math3:3.1.1-http://commons.apache.org/math/ ) - (Apache License, Version 2.0) * Apache Commons Codec(commons-codec:commons-codec:1.11-http://commons.apache.org/proper/commons-codec/ ) - (Apache License, Version 2.0) * Apache Commons Configuration(org.apache.commons:commons-configuration2:2.1.1-http://commons.apache.org/proper/commons-configuration/ ) - (Apache License, Version 2.0) * Apache Commons Crypto(org.apache.commons:commons-crypto:1.0.0-http://commons.apache.org/proper/commons-crypto/ ) - (Apache License, Version 2.0) * Apache Commons Lang(org.apache.commons:commons-lang3:3.9-http://commons.apache.org/proper/commons-lang/ ) - (Apache License, Version 2.0) * Commons Logging(commons-logging:commons-logging:1.1.3-http://commons.apache.org/proper/commons-logging/ ) - (Apache License, Version 2.0) * Apache Commons Net(commons-net:commons-net:3.6-http://commons.apache.org/proper/commons-net/ ) - (Apache License, Version 2.0) * FindBugs-jsr305(com.google.code.findbugs:jsr305:3.0.1-http://findbugs.sourceforge.net/ ) - (Apache License, Version 2.0) * com.alipay.sofa:hessian(com.alipay.sofa:hessian:3.3.7-http://github.com/alipay/sofa-hessian ) - (Apache License, Version 2.0) * Jackson-annotations(com.fasterxml.jackson.core:jackson-annotations:2.12.1-http://github.com/FasterXML/jackson ) - (Apache License, Version 2.0) * jackson-databind(com.fasterxml.jackson.core:jackson-databind:2.12.1-http://github.com/FasterXML/jackson ) - (Apache License, Version 2.0) * Failsafe(net.jodah:failsafe:2.4.0-http://github.com/jhalterman/failsafe/ ) - (Apache License, Version 2.0) * com.alipay.sofa:sofa-rpc-all(com.alipay.sofa:sofa-rpc-all:5.7.6-http://github.com/sofastack/sofa-rpc ) - (Apache License, Version 2.0) * Snappy for Java(org.xerial.snappy:snappy-java:1.0.5-http://github.com/xerial/snappy-java/ ) - (Apache License, Version 2.0) * Apache Groovy(org.codehaus.groovy:groovy-all:2.4.6-http://groovy-lang.org ) - (Apache License, Version 2.0) * htrace-core4(org.apache.htrace:htrace-core4:4.1.0-incubating-http://incubator.apache.org/projects/htrace.html ) - (Apache License, Version 2.0) * Data Mapper for Jackson(org.codehaus.jackson:jackson-mapper-asl:1.9.2-http://jackson.codehaus.org ) - (Apache License, Version 2.0) * Jackson(org.codehaus.jackson:jackson-core-asl:1.9.2-http://jackson.codehaus.org ) - (Apache License, Version 2.0) * commons-configuration(commons-configuration:commons-configuration:1.1-http://jakarta.apache.org/commons/configuration/ ) - (Apache License, Version 2.0) * Disruptor Framework(com.lmax:disruptor:3.3.7-http://lmax-exchange.github.com/disruptor ) - (Apache License, Version 2.0) * Apache Log4j(log4j:log4j:1.2.17-http://logging.apache.org/log4j/1.2/ ) - (Apache License, Version 2.0) * Netty(io.netty:netty:3.10.6.Final-http://netty.io/ ) - (Apache License, Version 2.0) * Google Android Annotations Library(com.google.android:annotations:4.1.1.4-http://source.android.com/ ) - (Apache License, Version 2.0) * Findbugs Annotations under Apache License(com.github.stephenc.findbugs:findbugs-annotations:1.3.9-1-http://stephenc.github.com/findbugs-annotations ) - (Apache License, Version 2.0) * JCIP Annotations under Apache License(com.github.stephenc.jcip:jcip-annotations:1.0-1-http://stephenc.github.com/jcip-annotations ) - (Apache License, Version 2.0) * JSON Small and Fast Parser(net.minidev:json-smart:2.3-http://www.minidev.net/ ) - (Apache License, Version 2.0) * SnakeYAML(org.yaml:snakeyaml:1.18-http://www.snakeyaml.org ) - (Apache License, Version 2.0) * Nimbus JOSE+JWT(com.nimbusds:nimbus-jose-jwt:4.41.1-https://bitbucket.org/connect2id/nimbus-jose-jwt ) - (Apache License, Version 2.0) * Apache Commons BeanUtils(commons-beanutils:commons-beanutils:1.9.3-https://commons.apache.org/proper/commons-beanutils/ ) - (Apache License, Version 2.0) * Apache Commons Compress(org.apache.commons:commons-compress:1.18-https://commons.apache.org/proper/commons-compress/ ) - (Apache License, Version 2.0) * Apache Commons IO(commons-io:commons-io:2.7-https://commons.apache.org/proper/commons-io/ ) - (Apache License, Version 2.0) * Curator Client(org.apache.curator:curator-client:2.13.0-https://curator.apache.org/ ) - (Apache License, Version 2.0) * Curator Framework(org.apache.curator:curator-framework:2.13.0-https://curator.apache.org/ ) - (Apache License, Version 2.0) * Curator Recipes(org.apache.curator:curator-recipes:2.13.0-https://curator.apache.org/ ) - (Apache License, Version 2.0) * Kerb Simple Kdc(org.apache.kerby:kerb-simplekdc:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby ASN1 Project(org.apache.kerby:kerby-asn1:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby Config(org.apache.kerby:kerby-config:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby PKIX Project(org.apache.kerby:kerby-pkix:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby Util(org.apache.kerby:kerby-util:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby XDR Project(org.apache.kerby:kerby-xdr:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Admin(org.apache.kerby:kerb-admin:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Client(org.apache.kerby:kerb-client:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Common(org.apache.kerby:kerb-common:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb core(org.apache.kerby:kerb-core:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Crypto(org.apache.kerby:kerb-crypto:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Identity(org.apache.kerby:kerb-identity:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Server(org.apache.kerby:kerb-server:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Kerby-kerb Util(org.apache.kerby:kerb-util:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * Token provider(org.apache.kerby:token-provider:1.0.1-https://directory.apache.org/kerby/ ) - (Apache License, Version 2.0) * com.alipay.sofa:bolt(com.alipay.sofa:bolt:1.6.2-https://github.com/alipay/sofa-bolt ) - (Apache License, Version 2.0) * Jackson-core(com.fasterxml.jackson.core:jackson-core:2.12.1-https://github.com/FasterXML/jackson-core ) - (Apache License, Version 2.0) * Jackson-dataformat-YAML(com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.2-https://github.com/FasterXML/jackson-dataformats-text ) - (Apache License, Version 2.0) * Jackson module: JAXB Annotations(com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.12.1-https://github.com/FasterXML/jackson-modules-base ) - (Apache License, Version 2.0) * Woodstox(com.fasterxml.woodstox:woodstox-core:5.0.3-https://github.com/FasterXML/woodstox ) - (Apache License, Version 2.0) * AutoService(com.google.auto.service:auto-service-annotations:1.0-rc7-https://github.com/google/auto/tree/master/service ) - (Apache License, Version 2.0) * J2ObjC Annotations(com.google.j2objc:j2objc-annotations:1.1-https://github.com/google/j2objc/ ) - (Apache License, Version 2.0) * proto-google-common-protos(com.google.api.grpc:proto-google-common-protos:1.17.0-https://github.com/googleapis/api-client-staging ) - (Apache License, Version 2.0) * io.grpc:grpc-api(io.grpc:grpc-api:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-context(io.grpc:grpc-context:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-core(io.grpc:grpc-core:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-grpclb(io.grpc:grpc-grpclb:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-netty(io.grpc:grpc-netty:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-protobuf(io.grpc:grpc-protobuf:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-protobuf-lite(io.grpc:grpc-protobuf-lite:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * io.grpc:grpc-stub(io.grpc:grpc-stub:1.33.0-https://github.com/grpc/grpc-java ) - (Apache License, Version 2.0) * hugegraph-client(com.baidu.hugegraph:hugegraph-client:2.0.1-https://github.com/hugegraph/hugegraph-client ) - (Apache License, Version 2.0) * hugegraph-common(com.baidu.hugegraph:hugegraph-common:2.0.1-https://github.com/hugegraph/hugegraph-common ) - (Apache License, Version 2.0) * hugegraph-loader(com.baidu.hugegraph:hugegraph-loader:0.12.0-https://github.com/hugegraph/hugegraph-loader ) - (Apache License, Version 2.0) * perfmark:perfmark-api(io.perfmark:perfmark-api:0.19.0-https://github.com/perfmark/perfmark ) - (Apache License, Version 2.0) * com.alipay.sofa.common:sofa-common-tools(com.alipay.sofa.common:sofa-common-tools:1.0.12-https://github.com/sofastack/sofa-common-tools ) - (Apache License, Version 2.0) * Apache Hadoop Annotations(org.apache.hadoop:hadoop-annotations:3.1.2-https://hadoop.apache.org/ ) - (Apache License, Version 2.0) * Apache Hadoop Auth(org.apache.hadoop:hadoop-auth:3.1.2-https://hadoop.apache.org/ ) - (Apache License, Version 2.0) * Apache Hadoop Common(org.apache.hadoop:hadoop-common:3.1.2-https://hadoop.apache.org/ ) - (Apache License, Version 2.0) * Apache Hadoop HDFS Client(org.apache.hadoop:hadoop-hdfs-client:3.1.2-https://hadoop.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Client(org.apache.hbase:hbase-client:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Common(org.apache.hbase:hbase-common:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Hadoop Compatibility(org.apache.hbase:hbase-hadoop-compat:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Hadoop Two Compatibility(org.apache.hbase:hbase-hadoop2-compat:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - HTTP(org.apache.hbase:hbase-http:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - MapReduce(org.apache.hbase:hbase-mapreduce:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Metrics API(org.apache.hbase:hbase-metrics-api:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Metrics Implementation(org.apache.hbase:hbase-metrics:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Procedure(org.apache.hbase:hbase-procedure:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Protocol(org.apache.hbase:hbase-protocol:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Replication(org.apache.hbase:hbase-replication:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Server(org.apache.hbase:hbase-server:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Shaded - Client(org.apache.hbase:hbase-shaded-client-byo-hadoop:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Shaded Protocol(org.apache.hbase:hbase-protocol-shaded:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * Apache HBase - Zookeeper(org.apache.hbase:hbase-zookeeper:2.2.3-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * hbase-shaded-miscellaneous(org.apache.hbase:hbase-shaded-miscellaneous:2.2.1-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * hbase-shaded-netty(org.apache.hbase:hbase-shaded-netty:2.2.1-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * hbase-shaded-protobuf(org.apache.hbase:hbase-shaded-protobuf:2.2.1-https://hbase.apache.org/ ) - (Apache License, Version 2.0) * jcommander(com.beust:jcommander:1.78-https://jcommander.org ) - (Apache License, Version 2.0) * Joda-Time(joda-time:joda-time:2.10.8-https://www.joda.org/joda-time/ ) - (Apache License, Version 2.0) * Apache Log4j API(org.apache.logging.log4j:log4j-api:2.17.0-none ) - (Apache License, Version 2.0) * Apache Log4j Core(org.apache.logging.log4j:log4j-core:2.17.0-none ) - (Apache License, Version 2.0) * Apache Log4j SLF4J Binding(org.apache.logging.log4j:log4j-slf4j-impl:2.17.0-none ) - (Apache License, Version 2.0) * Apache Yetus - Audience Annotations(org.apache.yetus:audience-annotations:0.5.0-none ) - (Apache License, Version 2.0) * error-prone annotations(com.google.errorprone:error_prone_annotations:2.3.4-none ) - (Apache License, Version 2.0) * Guava ListenableFuture only(com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava-none ) - (Apache License, Version 2.0) * Guava: Google Core Libraries for Java(com.google.guava:guava:25.1-jre-none ) - (Apache License, Version 2.0) * LZ4 and xxHash(org.lz4:lz4-java:1.4.0-none ) - (Apache License, Version 2.0) * Metrics Core(io.dropwizard.metrics:metrics-core:3.2.6-none ) - (Apache License, Version 2.0) * Minio(io.minio:minio:8.5.6-https://min.io ) - (Apache License, Version 2.0) * Netty/All-in-One(io.netty:netty-all:4.1.42.Final-none ) - (Apache License, Version 2.0) * hugegraph-rpc(com.baidu.hugegraph:hugegraph-rpc:2.0.1-none ) - (Apache License, Version 2.0) * Jackson-JAXRS-base(com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.12.1-none ) - (Apache License, Version 2.0) * Jackson-JAXRS-JSON(com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.12.1-none ) - (Apache License, Version 2.0) * JavaBeans Activation Framework API jar(jakarta.activation:jakarta.activation-api:1.2.1-none ) - (Apache License, Version 2.0) * Okio(com.squareup.okio:okio:1.6.0-none ) - (Apache License, Version 2.0) * OpenTracing API(io.opentracing:opentracing-api:0.22.0-none ) - (Apache License, Version 2.0) * OpenTracing-mock(io.opentracing:opentracing-mock:0.22.0-none ) - (Apache License, Version 2.0) * OpenTracing-noop(io.opentracing:opentracing-noop:0.22.0-none ) - (Apache License, Version 2.0) * OpenTracing-util(io.opentracing:opentracing-util:0.22.0-none ) - (Apache License, Version 2.0) * swagger-annotations(io.swagger:swagger-annotations:1.5.18-none ) - (Apache License, Version 2.0) * swagger-core(io.swagger:swagger-core:1.5.18-none ) - (Apache License, Version 2.0) * swagger-models(io.swagger:swagger-models:1.5.18-none ) - (Apache License, Version 2.0) * The Apache Software License, Version 2.0(org.apache.zookeeper:zookeeper:3.4.13-none ) - (Apache License, Version 2.0) * jetcd-common(io.etcd:jetcd-common:0.5.4-none ) - (Apache License, Version 2.0) * jetcd-core(io.etcd:jetcd-core:0.5.4-none ) - (Apache License, Version 2.0) * lookout-api(com.alipay.sofa.lookout:lookout-api:1.4.1-none ) - (Apache License, Version 2.0) * tracer-core(com.alipay.sofa:tracer-core:3.0.8-none ) - (Apache License, Version 2.0) * apiguardian-api(org.apiguardianapiguardian-api1.1.0https://github.com/apiguardian-team/apiguardian) - (Apache License, Version 2.0) * Sundrio :: Annotations :: Builder(io.sundrbuilder-annotations0.13.1https://github.com/sundrio/sundrio) - (Apache License, Version 2.0) * Byte Buddy (without dependencies)(net.bytebuddybyte-buddy1.10.20https://bytebuddy.net/) - (Apache License, Version 2.0) * Apache Commons Text(org.apache.commonscommons-text1.9https://commons.apache.org/proper/commons-text) - (Apache License, Version 2.0) * Generex(com.github.mifmifgenerex1.0.2https://github.com/mifmif/Generex/tree/master) - (Apache License, Version 2.0) * Jackson datatype: JSR310(com.fasterxml.jackson.datatypejackson-datatype-jsr3102.11.2https://github.com/FasterXML/jackson-datatype-jsr310) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes :: Java Client(io.fabric8kubernetes-client5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Admission Registration, Authentication and Authorization(io.fabric8kubernetes-model-admissionregistration5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: API Extensions(io.fabric8kubernetes-model-apiextensions5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Apps(io.fabric8kubernetes-model-apps5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Autoscaling(io.fabric8kubernetes-model-autoscaling5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Batch(io.fabric8kubernetes-model-batch5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Certificates(io.fabric8kubernetes-model-certificates5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Common(io.fabric8kubernetes-model-common5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Coordination(io.fabric8kubernetes-model-coordination5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Core(io.fabric8kubernetes-model-core5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Discovery(io.fabric8kubernetes-model-discovery5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Events(io.fabric8kubernetes-model-events5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Extensions(io.fabric8kubernetes-model-extensions5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: FlowControl(io.fabric8kubernetes-model-flowcontrol5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Metrics(io.fabric8kubernetes-model-metrics5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Networking(io.fabric8kubernetes-model-networking5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Node(io.fabric8kubernetes-model-node5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Policy(io.fabric8kubernetes-model-policy5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: RBAC(io.fabric8kubernetes-model-rbac5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Scheduling(io.fabric8kubernetes-model-scheduling5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes Model :: Storage Class(io.fabric8kubernetes-model-storageclass5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * Fabric8 :: Kubernetes :: Server Mock(io.fabric8kubernetes-server-mock5.6.0http://fabric8.io/) - (Apache License, Version 2.0) * OkHttp Logging Interceptor(com.squareup.okhttp3logging-interceptor3.12.12https://square.github.io/okhttp/) - (Apache License, Version 2.0) * Fabric8 :: Mock Web Server(io.fabric8mockwebserver0.1.8http://fabric8.io/) - (Apache License, Version 2.0) * mvel(org.mvelmvel22.4.13.Finalhttp://mvel.codehaus.org/) - (Apache License, Version 2.0) * objenesis(org.objenesisobjenesis3.1http://objenesis.org) - (Apache License, Version 2.0) * Sundrio :: Annotations :: Resourcecify(io.sundrresourcecify-annotations0.13.1https://github.com/sundrio/sundrio) - (Apache License, Version 2.0) * Sundrio :: Code generation(io.sundrsundr-codegen0.13.1https://github.com/sundrio/sundrio) - (Apache License, Version 2.0) * Sundrio :: Core(io.sundrsundr-core0.13.1https://github.com/sundrio/sundrio) - (Apache License, Version 2.0) * zjsonpatch(com.flipkart.zjsonpatchzjsonpatch0.3.0https://github.com/flipkart-incubator/zjsonpatch/) - (Apache License, Version 2.0) * Jetty :: Http Utility(org.eclipse.jetty:jetty-http:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: IO Utility(org.eclipse.jetty:jetty-io:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Security(org.eclipse.jetty:jetty-security:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Server Core(org.eclipse.jetty:jetty-server:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Servlet Handling(org.eclipse.jetty:jetty-servlet:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Utilities(org.eclipse.jetty:jetty-util:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Webapp Application Support(org.eclipse.jetty:jetty-webapp:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: XML utilities(org.eclipse.jetty:jetty-xml:9.3.24.v20180605-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * Jetty :: Utilities :: Ajax(JSON)(org.eclipse.jetty:jetty-util-ajax:9.3.27.v20190418-http://www.eclipse.org/jetty ) - (Apache License, Version 2.0) * JAX-RS provider for JSON content type(org.codehaus.jackson:jackson-jaxrs:1.9.2-http://jackson.codehaus.org ) - (Apache License, Version 2.0) * Xml Compatibility extensions for Jackson(org.codehaus.jackson:jackson-xc:1.9.2-http://jackson.codehaus.org ) - (Apache License, Version 2.0) * Javassist(org.javassist:javassist:3.21.0-GA-http://www.javassist.org/ ) - (Apache License, Version 2.0) * IntelliJ IDEA Annotations(org.jetbrains:annotations:13.0-http://www.jetbrains.org ) - (Apache License, Version 2.0) * Kotlin Stdlib(org.jetbrains.kotlin:kotlin-stdlib:1.6.20-https://kotlinlang.org/ ) - (Apache License, Version 2.0) * Kotlin Stdlib Common(org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31-https://kotlinlang.org/ ) - (Apache License, Version 2.0) * okhttp(com.squareup.okhttp3:okhttp:4.10.0-https://square.github.io/okhttp/ ) - (Apache License, Version 2.0) * okhttp-logging-interceptor(com.squareup.okhttp3:logging-interceptor:4.10.0-https://square.github.io/okhttp/ ) - (Apache License, Version 2.0) * okio(com.squareup.okio:okio-jvm:3.0.0-https://github.com/square/okio/ ) - (Apache License, Version 2.0) * Simple XML (safe)(com.carrotsearch.thirdparty:simple-xml-safe:2.7.1-https://github.com/dweiss/simplexml ) - -======================================================================== -Third party BSD licenses -======================================================================== - -The following components are provided under the BSD License. -See licenses/ for text of these licenses. - - (The 2-Clause BSD License) * Hamcrest Core(org.hamcrest:hamcrest-core:1.3-http://hamcrest.org/JavaHamcrest/ ) - (The 2-Clause BSD License) * JLine(jline:jline:0.9.94-http://jline.sourceforge.net ) - (The 2-Clause BSD License) * Stax2 API(org.codehaus.woodstox:stax2-api:3.1.4-http://wiki.fasterxml.com/WoodstoxStax2 ) - (The 2-Clause BSD License) * JSch(com.jcraft:jsch:0.1.54-http://www.jcraft.com/jsch/ ) - (The 2-Clause BSD License) * Repackaged OW2 ASM Core(org.simpleflatmapper:ow2-asm:6.2-https://asm.ow2.io/ ) - (The 2-Clause BSD License) * ParaNamer Core(com.thoughtworks.paranamer:paranamer:2.3-https://github.com/paul-hammant/paranamer ) - (The 2-Clause BSD License) * ASM Core(org.ow2.asm:asm:5.0.4-none ) - (The 3-Clause BSD License) * Protocol Buffers [Core](com.google.protobuf:protobuf-java:3.12.0-none ) - (The 3-Clause BSD License) * Protocol Buffers [Util](com.google.protobuf:protobuf-java-util:3.12.0-none ) - (The 3-Clause BSD License) * Automaton(dk.brics.automaton:automaton:1.11-8-https://mvnrepository.com/artifact/dk.brics.automaton/automaton/1.11-8) - -======================================================================== -Third party CDDL licenses -======================================================================== - -The following components are provided under the CDDL License. -See licenses/ for text of these licenses. - - (CDDL) * jsp-api(javax.servlet.jsp:jsp-api:2.1-none ) - (CDDL) * Java Servlet API(javax.servlet:javax.servlet-api:3.1.0-http://servlet-spec.java.net ) - (CDDL) * javax.inject:1 as OSGi bundle(org.glassfish.hk2.external:javax.inject:2.5.0-b32-https://hk2.java.net/external/javax.inject ) - (CDDL) * jersey-container-servlet-core(org.glassfish.jersey.containers:jersey-container-servlet-core:2.25.1-https://jersey.java.net/project/jersey-container-servlet-core/ ) - -======================================================================== -Third party EPL licenses -======================================================================== - -The following components are provided under the EPL License. -See licenses/ for text of these licenses. - - (EPL1.0) * JUnit(junit:junit:4.12-http://junit.org ) - (EPL1.0) * Jakarta Activation(com.sun.activation:jakarta.activation:2.0.1-https://jakarta.ee/ ) - (EPL1.0) * Jakarta Activation API jar(jakarta.activation:jakarta.activation-api:1.2.2-https://jakarta.ee/specifications/activation/1.2/ ) - (EPL1.0) * Old JAXB Core(com.sun.xml.bind:jaxb-core:3.0.2-https://eclipse-ee4j.github.io/jaxb-ri/ ) - -======================================================================== -Third party MIT licenses -======================================================================== - -The following components are provided under the MIT License. -See licenses/ for text of these licenses. - - (The MIT License) * Checker Qual(org.checkerframework:checker-qual:2.0.0-http://checkerframework.org ) - (The MIT License) * lightning-csv(org.simpleflatmapper:lightning-csv:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/lightning-csv ) - (The MIT License) * sfm-converter(org.simpleflatmapper:sfm-converter:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-converter ) - (The MIT License) * sfm-csv(org.simpleflatmapper:sfm-csv:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-csv ) - (The MIT License) * sfm-map(org.simpleflatmapper:sfm-map:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-map ) - (The MIT License) * sfm-reflect(org.simpleflatmapper:sfm-reflect:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-reflect ) - (The MIT License) * sfm-tuples(org.simpleflatmapper:sfm-tuples:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-tuples ) - (The MIT License) * sfm-util(org.simpleflatmapper:sfm-util:8.2.1-http://github.com/arnaudroger/SimpleFlatMapper/sfm-util ) - (The MIT License) * SLF4J API Module(org.slf4j:slf4j-api:1.7.31-http://www.slf4j.org ) - (The MIT License) * SLF4J LOG4J-12 Binding(org.slf4j:slf4j-log4j12:1.7.25-http://www.slf4j.org ) - (The MIT License) * org.codehaus.mojo:animal-sniffer-annotations(org.codehaus.mojo:animal-sniffer-annotations:1.14-none ) - (The MIT License) * Joni(org.jruby.joni:joni:2.1.11-none ) - (The MIT License) * JCodings(org.jruby.jcodings:jcodings:1.0.18-none ) - (The MIT License) * mockito-core(org.mockito:mockito-core:3.8.0-mockito.org ) - (The MIT License) * bcprov-jdk18on(org.bouncycastle:bcprov-jdk18on:1.74- https://www.bouncycastle.org/java.html) - -======================================================================== -Third party MPL2.0 licenses -======================================================================== - -The following components are provided under the MPL2.0 License. -See licenses/ for text of these licenses. - - (MPL2.0) * jamon-runtime(org.jamon:jamon-runtime:2.4.1-none ) - -======================================================================== -Third party Public Domain licenses -======================================================================== - -The following components are provided under the Public Domain License. - - (Public Domain, per Creative Commons CC0) * XZ for Java(org.tukaani:xz:1.8-https://tukaani.org/xz/java.html ) - -======================================================================== -Third party Go license -======================================================================== - -The following components are provided under The Go license. - - (The Go license) * re2j(com.google.re2j:re2j:1.1-http://github.com/google/re2j ) diff --git a/computer-dist/release-docs/NOTICE b/computer-dist/release-docs/NOTICE deleted file mode 100644 index 0502f23b1..000000000 --- a/computer-dist/release-docs/NOTICE +++ /dev/null @@ -1,3824 +0,0 @@ -Apache HugeGraph(incubating) -Copyright 2022-2023 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -The initial codebase was donated to the ASF by HugeGraph Authors, copyright 2017-2021. - -======================================================================== - -Apache Avro -Copyright 2009-2014 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== -Apache Commons BeanUtils -Copyright 2000-2016 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== -Apache Commons Codec -Copyright 2002-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java -contains test data from http://aspell.net/test/orig/batch0.tab. -Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - -=============================================================================== - -The content of package org.apache.commons.codec.language.bm has been translated -from the original php source code available at http://stevemorse.org/phoneticinfo.htm -with permission from the original authors. -Original source copyright: -Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - - -======================================================================== -Apache Commons Collections -Copyright 2001-2015 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== -Apache Commons Compress -Copyright 2002-2018 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (https://www.apache.org/). - -The files in the package org.apache.commons.compress.archivers.sevenz -were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/), -which has been placed in the public domain: - -"LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html) - - -======================================================================== -Apache Commons Configuration -Copyright 2001-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== - -Apache Commons Net -Copyright 2001-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -The binary distribution of this product bundles binaries of -org.iq80.leveldb:leveldb-api (https://github.com/dain/leveldb), which has the -following notices: -* Copyright 2011 Dain Sundstrom -* Copyright 2011 FuseSource Corp. http://fusesource.com - -The binary distribution of this product bundles binaries of -AWS SDK for Java - Bundle 1.11.271, -AWS Java SDK for AWS KMS 1.11.271, -AWS Java SDK for Amazon S3 1.11.271, -AWS Java SDK for AWS STS 1.11.271, -JMES Path Query library 1.0, -which has the following notices: - * This software includes third party software subject to the following - copyrights: - XML parsing and utility functions from JetS3t - Copyright - 2006-2009 James Murty. - JSON parsing and utility functions from JSON.org - - Copyright 2002 JSON.org. - PKCS#1 PEM encoded private key parsing and utility - functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. - -The binary distribution of this product bundles binaries of -Gson 2.2.4, -which has the following notices: - - The Netty Project - ================= - -Please visit the Netty web site for more information: - - * http://netty.io/ - -Copyright 2014 The Netty Project - -The Netty Project 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. - -Also, please refer to each LICENSE..txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- -This product contains the extensions to Java Collections Framework which has -been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: - - * LICENSE: - * license/LICENSE.jsr166y.txt (Public Domain) - * HOMEPAGE: - * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ - * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ - -This product contains a modified version of Robert Harder's Public Domain -Base64 Encoder and Decoder, which can be obtained at: - - * LICENSE: - * license/LICENSE.base64.txt (Public Domain) - * HOMEPAGE: - * http://iharder.sourceforge.net/current/java/base64/ - -This product contains a modified portion of 'Webbit', an event based -WebSocket and HTTP server, which can be obtained at: - - * LICENSE: - * license/LICENSE.webbit.txt (BSD License) - * HOMEPAGE: - * https://github.com/joewalnes/webbit - -This product contains a modified portion of 'SLF4J', a simple logging -facade for Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.slf4j.txt (MIT License) - * HOMEPAGE: - * http://www.slf4j.org/ - -This product contains a modified portion of 'ArrayDeque', written by Josh -Bloch of Google, Inc: - - * LICENSE: - * license/LICENSE.deque.txt (Public Domain) - -This product contains a modified portion of 'Apache Harmony', an open source -Java SE, which can be obtained at: - - * LICENSE: - * license/LICENSE.harmony.txt (Apache License 2.0) - * HOMEPAGE: - * http://archive.apache.org/dist/harmony/ - -This product contains a modified version of Roland Kuhn's ASL2 -AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue. -It can be obtained at: - - * LICENSE: - * license/LICENSE.abstractnodequeue.txt (Public Domain) - * HOMEPAGE: - * https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java - -This product contains a modified portion of 'jbzip2', a Java bzip2 compression -and decompression library written by Matthew J. Francis. It can be obtained at: - - * LICENSE: - * license/LICENSE.jbzip2.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jbzip2/ - -This product contains a modified portion of 'libdivsufsort', a C API library to construct -the suffix array and the Burrows-Wheeler transformed string for any input string of -a constant-size alphabet written by Yuta Mori. It can be obtained at: - - * LICENSE: - * license/LICENSE.libdivsufsort.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/libdivsufsort/ - -This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, - which can be obtained at: - - * LICENSE: - * license/LICENSE.jctools.txt (ASL2 License) - * HOMEPAGE: - * https://github.com/JCTools/JCTools - -This product optionally depends on 'JZlib', a re-implementation of zlib in -pure Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.jzlib.txt (BSD style License) - * HOMEPAGE: - * http://www.jcraft.com/jzlib/ - -This product optionally depends on 'Compress-LZF', a Java library for encoding and -decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: - - * LICENSE: - * license/LICENSE.compress-lzf.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/ning/compress - -This product optionally depends on 'lz4', a LZ4 Java compression -and decompression library written by Adrien Grand. It can be obtained at: - - * LICENSE: - * license/LICENSE.lz4.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jpountz/lz4-java - -This product optionally depends on 'lzma-java', a LZMA Java compression -and decompression library, which can be obtained at: - - * LICENSE: - * license/LICENSE.lzma-java.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jponge/lzma-java - -This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression -and decompression library written by William Kinney. It can be obtained at: - - * LICENSE: - * license/LICENSE.jfastlz.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jfastlz/ - -This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: - - * LICENSE: - * license/LICENSE.protobuf.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/protobuf/ - -This product optionally depends on 'Bouncy Castle Crypto APIs' to generate -a temporary self-signed X.509 certificate when the JVM does not provide the -equivalent functionality. It can be obtained at: - - * LICENSE: - * license/LICENSE.bouncycastle.txt (MIT License) - * HOMEPAGE: - * http://www.bouncycastle.org/ - -This product optionally depends on 'Snappy', a compression library produced -by Google Inc, which can be obtained at: - - * LICENSE: - * license/LICENSE.snappy.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/snappy/ - -This product optionally depends on 'JBoss Marshalling', an alternative Java -serialization API, which can be obtained at: - -This product optionally depends on 'Caliper', Google's micro- -benchmarking framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.caliper.txt (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/caliper/ - -This product optionally depends on 'Apache Commons Logging', a logging -framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-logging.txt (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging/ - -This product optionally depends on 'Apache Log4J', a logging framework, which -can be obtained at: - - * LICENSE: - * license/LICENSE.log4j.txt (Apache License 2.0) - * HOMEPAGE: - * http://logging.apache.org/log4j/ - -This product optionally depends on 'Aalto XML', an ultra-high performance -non-blocking XML processor, which can be obtained at: - - * LICENSE: - * license/LICENSE.aalto-xml.txt (Apache License 2.0) - * HOMEPAGE: - * http://wiki.fasterxml.com/AaltoHome - -This product contains a modified version of 'HPACK', a Java implementation of -the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: - - * LICENSE: - * license/LICENSE.hpack.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/twitter/hpack - -This product contains a modified portion of 'Apache Commons Lang', a Java library -provides utilities for the java.lang API, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-lang.txt (Apache License 2.0) - * HOMEPAGE: - * https://commons.apache.org/proper/commons-lang/ - -This product contains a modified portion of 'JDOM 1.1', which can be obtained at: - - * LICENSE: - * https://github.com/hunterhacker/jdom/blob/jdom-1.1/core/LICENSE.txt - * HOMEPAGE: - * http://www.jdom.org/ - -The binary distribution of this product bundles binaries of -Commons Codec 1.4, -which has the following notices: - * src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.javacontains test data from http://aspell.net/test/orig/batch0.tab.Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - =============================================================================== - The content of package org.apache.commons.codec.language.bm has been translated - from the original php source code available at http://stevemorse.org/phoneticinfo.htm - with permission from the original authors. - Original source copyright:Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - -The binary distribution of this product bundles binaries of -Commons Lang 2.6, -which has the following notices: - * This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - -The binary distribution of this product bundles binaries of -Apache Log4j 1.2.17, -which has the following notices: - * ResolverUtil.java - Copyright 2005-2006 Tim Fennell - Dumbster SMTP test server - Copyright 2004 Jason Paul Kitchen - TypeUtil.java - Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams - -The binary distribution of this product bundles binaries of -"Java Concurrency in Practice" book annotations 1.0, -which has the following notices: - * Copyright (c) 2005 Brian Goetz and Tim Peierls Released under the Creative - Commons Attribution License (http://creativecommons.org/licenses/by/2.5) - Official home: http://www.jcip.net Any republication or derived work - distributed in source code form must include this copyright and license - notice. - -The binary distribution of this product bundles binaries of -Jetty :: Http Utility 9.3.19., -Jetty :: IO Utility 9.3.19., -Jetty :: Security 9.3.19., -Jetty :: Server Core 9.3.19., -Jetty :: Servlet Handling 9.3.19., -Jetty :: Utilities 9.3.19., -Jetty :: Utilities :: Ajax, -Jetty :: Webapp Application Support 9.3.19., -Jetty :: XML utilities 9.3.19., -which has the following notices: - * ============================================================== - Jetty Web Container - Copyright 1995-2016 Mort Bay Consulting Pty Ltd. - ============================================================== - - The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd - unless otherwise noted. - - Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - - Jetty may be distributed under either license. - - ------ - Eclipse - - The following artifacts are EPL. - * org.eclipse.jetty.orbit:org.eclipse.jdt.core - - The following artifacts are EPL and ASL2. - * org.eclipse.jetty.orbit:javax.security.auth.message - - - The following artifacts are EPL and CDDL 1.0. - * org.eclipse.jetty.orbit:javax.mail.glassfish - - ------ - OW2 - - The following artifacts are licensed by the OW2 Foundation according to the - terms of http://asm.ow2.org/license.html - - org.ow2.asm:asm-commons - org.ow2.asm:asm - - - ------ - Apache - - The following artifacts are ASL2 licensed. - - org.apache.taglibs:taglibs-standard-spec - org.apache.taglibs:taglibs-standard-impl - - - ------ - MortBay - - The following artifacts are ASL2 licensed. Based on selected classes from - following Apache Tomcat jars, all ASL2 licensed. - - org.mortbay.jasper:apache-jsp - org.apache.tomcat:tomcat-jasper - org.apache.tomcat:tomcat-juli - org.apache.tomcat:tomcat-jsp-api - org.apache.tomcat:tomcat-el-api - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-api - org.apache.tomcat:tomcat-util-scan - org.apache.tomcat:tomcat-util - - org.mortbay.jasper:apache-el - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-el-api - - - ------ - Mortbay - - The following artifacts are CDDL - - org.eclipse.jetty.toolchain:jetty-schemas - - ------ - Assorted - - The UnixCrypt.java code implements the one way cryptography used by - Unix systems for simple password protection. Copyright 1996 Aki Yoshida, - modified April 2001 by Iris Van den Broeke, Daniel Deville. - Permission to use, copy, modify and distribute UnixCrypt - for non-commercial or commercial purposes and without fee is - granted provided that the copyright notice appears in all copies./ - -The binary distribution of this product bundles binaries of -Snappy for Java 1.0.4.1, -which has the following notices: - * This product includes software developed by Google - Snappy: http://code.google.com/p/snappy/ (New BSD License) - - This product includes software developed by Apache - PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ - (Apache 2.0 license) - - This library containd statically linked libstdc++. This inclusion is allowed by - "GCC RUntime Library Exception" - http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html - - == Contributors == - * Tatu Saloranta - * Providing benchmark suite - * Alec Wysoker - * Performance and memory usage improvement - -The binary distribution of this product bundles binaries of -Xerces2 Java Parser 2.9.1, -which has the following notices: - * ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xerces Java distribution. == - ========================================================================= - - Apache Xerces Java - Copyright 1999-2007 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. - -The binary distribution of this product bundles binaries of -Logback Classic Module 1.1.2, -Logback Core Module 1.1.2, -which has the following notices: - * Logback: the reliable, generic, fast and flexible logging framework. - Copyright (C) 1999-2012, QOS.ch. All rights reserved. - -The binary distribution of this product bundles binaries of -Apache HBase - Annotations 1.2.6, -Apache HBase - Client 1.2.6, -Apache HBase - Common 1.2.6, -Apache HBase - Hadoop Compatibility 1.2.6, -Apache HBase - Hadoop Two Compatibility 1.2.6, -Apache HBase - Prefix Tree 1.2.6, -Apache HBase - Procedure 1.2.6, -Apache HBase - Protocol 1.2.6, -Apache HBase - Server 1.2.6, -which has the following notices: - * Apache HBase - Copyright 2007-2015 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - -- - This product incorporates portions of the 'Hadoop' project - - Copyright 2007-2009 The Apache Software Foundation - - Licensed under the Apache License v2.0 - - -- - This product includes portions of the Bootstrap project v3.0.0 - - Copyright 2013 Twitter, Inc. - - Licensed under the Apache License v2.0 - - This product uses the Glyphicons Halflings icon set. - - http://glyphicons.com/ - - Copyright Jan Kovařík - - Licensed under the Apache License v2.0 as a part of the Bootstrap project. - - -- - This product includes portions of the Guava project v14, specifically - 'hbase-common/src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java' - - Copyright (C) 2007 The Guava Authors - - Licensed under the Apache License, Version 2.0 - -The binary distribution of this product bundles binaries of -Phoenix Core 4.7.0, -which has the following notices: - Apache Phoenix - Copyright 2013-2016 The Apache Software Foundation - - This product includes software developed by The Apache Software - Foundation (http://www.apache.org/). - - This also includes: - - The phoenix-spark module has been adapted from the phoenix-spark library - distributed under the terms of the Apache 2 license. Original source copyright: - Copyright 2014 Simply Measured, Inc. - Copyright 2015 Interset Software Inc. - - The file bin/daemon.py is based on the file of the same name in python-daemon 2.0.5 - (https://pypi.python.org/pypi/python-daemon/). Original source copyright: - # Copyright © 2008–2015 Ben Finney - # Copyright © 2007–2008 Robert Niederreiter, Jens Klein - # Copyright © 2004–2005 Chad J. Schroeder - # Copyright © 2003 Clark Evans - # Copyright © 2002 Noah Spurrier - # Copyright © 2001 Jürgen Hermann - -The binary distribution of this product bundles binaries of -Plexus Cipher: encryption/decryption Component 1.4, -which has the following notices: - * The code in this component contains a class - Base64 taken from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/Base64.java - which is Apache license: http://www.apache.org/licenses/LICENSE-2.0 - - The PBE key processing routine PBECipher.createCipher() is adopted from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/OpenSSL.java - which is also Apache APL-2.0 license: http://www.apache.org/licenses/LICENSE-2.0 - -The binary distribution of this product bundles binaries of -software.amazon.ion:ion-java 1.0.1, -which has the following notices: - * Amazon Ion Java Copyright 2007-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -The binary distribution of this product bundles binaries of -joda-time:joda-time:2.9.9 -which has the following notices: - * ============================================================================= - = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = - ============================================================================= - This product includes software developed by - Joda.org (http://www.joda.org/). - -The binary distribution of this product bundles binaries of -Ehcache 3.3.1, -which has the following notices: - * Ehcache V3 Copyright 2014-2016 Terracotta, Inc. - -The binary distribution of this product bundles binaries of -snakeyaml (https://bitbucket.org/asomov/snakeyaml), -which has the following notices: - * Copyright (c) 2008, http://www.snakeyaml.org - -The binary distribution of this product bundles binaries of -swagger-annotations (https://github.com/swagger-api/swagger-core), -which has the following notices: - * Copyright 2016 SmartBear Software - -The binary distribution of this product bundles binaries of -metrics-core 3.2.4 -which has the following notices: - * Copyright 2010-2013 Coda Hale and Yammer, Inc. - - This product includes software developed by Coda Hale and Yammer, Inc. - - This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64, - LongAdder), which was released with the following comments: - - Written by Doug Lea with assistance from members of JCP JSR-166 - Expert Group and released to the public domain, as explained at - http://creativecommons.org/publicdomain/zero/1.0/ - - -======================================================================== -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -The binary distribution of this product bundles binaries of -org.iq80.leveldb:leveldb-api (https://github.com/dain/leveldb), which has the -following notices: -* Copyright 2011 Dain Sundstrom -* Copyright 2011 FuseSource Corp. http://fusesource.com - -The binary distribution of this product bundles binaries of -AWS SDK for Java - Bundle 1.11.271, -AWS Java SDK for AWS KMS 1.11.271, -AWS Java SDK for Amazon S3 1.11.271, -AWS Java SDK for AWS STS 1.11.271, -JMES Path Query library 1.0, -which has the following notices: - * This software includes third party software subject to the following - copyrights: - XML parsing and utility functions from JetS3t - Copyright - 2006-2009 James Murty. - JSON parsing and utility functions from JSON.org - - Copyright 2002 JSON.org. - PKCS#1 PEM encoded private key parsing and utility - functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. - -The binary distribution of this product bundles binaries of -Gson 2.2.4, -which has the following notices: - - The Netty Project - ================= - -Please visit the Netty web site for more information: - - * http://netty.io/ - -Copyright 2014 The Netty Project - -The Netty Project 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. - -Also, please refer to each LICENSE..txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- -This product contains the extensions to Java Collections Framework which has -been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: - - * LICENSE: - * license/LICENSE.jsr166y.txt (Public Domain) - * HOMEPAGE: - * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ - * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ - -This product contains a modified version of Robert Harder's Public Domain -Base64 Encoder and Decoder, which can be obtained at: - - * LICENSE: - * license/LICENSE.base64.txt (Public Domain) - * HOMEPAGE: - * http://iharder.sourceforge.net/current/java/base64/ - -This product contains a modified portion of 'Webbit', an event based -WebSocket and HTTP server, which can be obtained at: - - * LICENSE: - * license/LICENSE.webbit.txt (BSD License) - * HOMEPAGE: - * https://github.com/joewalnes/webbit - -This product contains a modified portion of 'SLF4J', a simple logging -facade for Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.slf4j.txt (MIT License) - * HOMEPAGE: - * http://www.slf4j.org/ - -This product contains a modified portion of 'ArrayDeque', written by Josh -Bloch of Google, Inc: - - * LICENSE: - * license/LICENSE.deque.txt (Public Domain) - -This product contains a modified portion of 'Apache Harmony', an open source -Java SE, which can be obtained at: - - * LICENSE: - * license/LICENSE.harmony.txt (Apache License 2.0) - * HOMEPAGE: - * http://archive.apache.org/dist/harmony/ - -This product contains a modified version of Roland Kuhn's ASL2 -AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue. -It can be obtained at: - - * LICENSE: - * license/LICENSE.abstractnodequeue.txt (Public Domain) - * HOMEPAGE: - * https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java - -This product contains a modified portion of 'jbzip2', a Java bzip2 compression -and decompression library written by Matthew J. Francis. It can be obtained at: - - * LICENSE: - * license/LICENSE.jbzip2.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jbzip2/ - -This product contains a modified portion of 'libdivsufsort', a C API library to construct -the suffix array and the Burrows-Wheeler transformed string for any input string of -a constant-size alphabet written by Yuta Mori. It can be obtained at: - - * LICENSE: - * license/LICENSE.libdivsufsort.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/libdivsufsort/ - -This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, - which can be obtained at: - - * LICENSE: - * license/LICENSE.jctools.txt (ASL2 License) - * HOMEPAGE: - * https://github.com/JCTools/JCTools - -This product optionally depends on 'JZlib', a re-implementation of zlib in -pure Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.jzlib.txt (BSD style License) - * HOMEPAGE: - * http://www.jcraft.com/jzlib/ - -This product optionally depends on 'Compress-LZF', a Java library for encoding and -decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: - - * LICENSE: - * license/LICENSE.compress-lzf.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/ning/compress - -This product optionally depends on 'lz4', a LZ4 Java compression -and decompression library written by Adrien Grand. It can be obtained at: - - * LICENSE: - * license/LICENSE.lz4.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jpountz/lz4-java - -This product optionally depends on 'lzma-java', a LZMA Java compression -and decompression library, which can be obtained at: - - * LICENSE: - * license/LICENSE.lzma-java.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jponge/lzma-java - -This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression -and decompression library written by William Kinney. It can be obtained at: - - * LICENSE: - * license/LICENSE.jfastlz.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jfastlz/ - -This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: - - * LICENSE: - * license/LICENSE.protobuf.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/protobuf/ - -This product optionally depends on 'Bouncy Castle Crypto APIs' to generate -a temporary self-signed X.509 certificate when the JVM does not provide the -equivalent functionality. It can be obtained at: - - * LICENSE: - * license/LICENSE.bouncycastle.txt (MIT License) - * HOMEPAGE: - * http://www.bouncycastle.org/ - -This product optionally depends on 'Snappy', a compression library produced -by Google Inc, which can be obtained at: - - * LICENSE: - * license/LICENSE.snappy.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/snappy/ - -This product optionally depends on 'Caliper', Google's micro- -benchmarking framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.caliper.txt (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/caliper/ - -This product optionally depends on 'Apache Commons Logging', a logging -framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-logging.txt (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging/ - -This product optionally depends on 'Apache Log4J', a logging framework, which -can be obtained at: - - * LICENSE: - * license/LICENSE.log4j.txt (Apache License 2.0) - * HOMEPAGE: - * http://logging.apache.org/log4j/ - -This product optionally depends on 'Aalto XML', an ultra-high performance -non-blocking XML processor, which can be obtained at: - - * LICENSE: - * license/LICENSE.aalto-xml.txt (Apache License 2.0) - * HOMEPAGE: - * http://wiki.fasterxml.com/AaltoHome - -This product contains a modified version of 'HPACK', a Java implementation of -the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: - - * LICENSE: - * license/LICENSE.hpack.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/twitter/hpack - -This product contains a modified portion of 'Apache Commons Lang', a Java library -provides utilities for the java.lang API, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-lang.txt (Apache License 2.0) - * HOMEPAGE: - * https://commons.apache.org/proper/commons-lang/ - -This product contains a modified portion of 'JDOM 1.1', which can be obtained at: - - * LICENSE: - * https://github.com/hunterhacker/jdom/blob/jdom-1.1/core/LICENSE.txt - * HOMEPAGE: - * http://www.jdom.org/ - -The binary distribution of this product bundles binaries of -Commons Codec 1.4, -which has the following notices: - * src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.javacontains test data from http://aspell.net/test/orig/batch0.tab.Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - =============================================================================== - The content of package org.apache.commons.codec.language.bm has been translated - from the original php source code available at http://stevemorse.org/phoneticinfo.htm - with permission from the original authors. - Original source copyright:Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - -The binary distribution of this product bundles binaries of -Commons Lang 2.6, -which has the following notices: - * This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - -The binary distribution of this product bundles binaries of -Apache Log4j 1.2.17, -which has the following notices: - * ResolverUtil.java - Copyright 2005-2006 Tim Fennell - Dumbster SMTP test server - Copyright 2004 Jason Paul Kitchen - TypeUtil.java - Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams - -The binary distribution of this product bundles binaries of -"Java Concurrency in Practice" book annotations 1.0, -which has the following notices: - * Copyright (c) 2005 Brian Goetz and Tim Peierls Released under the Creative - Commons Attribution License (http://creativecommons.org/licenses/by/2.5) - Official home: http://www.jcip.net Any republication or derived work - distributed in source code form must include this copyright and license - notice. - -The binary distribution of this product bundles binaries of -Jetty :: Http Utility 9.3.19., -Jetty :: IO Utility 9.3.19., -Jetty :: Security 9.3.19., -Jetty :: Server Core 9.3.19., -Jetty :: Servlet Handling 9.3.19., -Jetty :: Utilities 9.3.19., -Jetty :: Utilities :: Ajax, -Jetty :: Webapp Application Support 9.3.19., -Jetty :: XML utilities 9.3.19., -which has the following notices: - * ============================================================== - Jetty Web Container - Copyright 1995-2016 Mort Bay Consulting Pty Ltd. - ============================================================== - - The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd - unless otherwise noted. - - Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - - Jetty may be distributed under either license. - - ------ - Eclipse - - The following artifacts are EPL. - * org.eclipse.jetty.orbit:org.eclipse.jdt.core - - The following artifacts are EPL and ASL2. - * org.eclipse.jetty.orbit:javax.security.auth.message - - - The following artifacts are EPL and CDDL 1.0. - * org.eclipse.jetty.orbit:javax.mail.glassfish - - ------ - OW2 - - The following artifacts are licensed by the OW2 Foundation according to the - terms of http://asm.ow2.org/license.html - - org.ow2.asm:asm-commons - org.ow2.asm:asm - - - ------ - Apache - - The following artifacts are ASL2 licensed. - - org.apache.taglibs:taglibs-standard-spec - org.apache.taglibs:taglibs-standard-impl - - - ------ - MortBay - - The following artifacts are ASL2 licensed. Based on selected classes from - following Apache Tomcat jars, all ASL2 licensed. - - org.mortbay.jasper:apache-jsp - org.apache.tomcat:tomcat-jasper - org.apache.tomcat:tomcat-juli - org.apache.tomcat:tomcat-jsp-api - org.apache.tomcat:tomcat-el-api - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-api - org.apache.tomcat:tomcat-util-scan - org.apache.tomcat:tomcat-util - - org.mortbay.jasper:apache-el - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-el-api - - - ------ - Mortbay - - The following artifacts are CDDL - - org.eclipse.jetty.toolchain:jetty-schemas - - ------ - Assorted - - The UnixCrypt.java code implements the one way cryptography used by - Unix systems for simple password protection. Copyright 1996 Aki Yoshida, - modified April 2001 by Iris Van den Broeke, Daniel Deville. - Permission to use, copy, modify and distribute UnixCrypt - for non-commercial or commercial purposes and without fee is - granted provided that the copyright notice appears in all copies./ - -The binary distribution of this product bundles binaries of -Snappy for Java 1.0.4.1, -which has the following notices: - * This product includes software developed by Google - Snappy: http://code.google.com/p/snappy/ (New BSD License) - - This product includes software developed by Apache - PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ - (Apache 2.0 license) - - This library containd statically linked libstdc++. This inclusion is allowed by - "GCC RUntime Library Exception" - http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html - - == Contributors == - * Tatu Saloranta - * Providing benchmark suite - * Alec Wysoker - * Performance and memory usage improvement - -The binary distribution of this product bundles binaries of -Xerces2 Java Parser 2.9.1, -which has the following notices: - * ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xerces Java distribution. == - ========================================================================= - - Apache Xerces Java - Copyright 1999-2007 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. - -The binary distribution of this product bundles binaries of -Logback Classic Module 1.1.2, -Logback Core Module 1.1.2, -which has the following notices: - * Logback: the reliable, generic, fast and flexible logging framework. - Copyright (C) 1999-2012, QOS.ch. All rights reserved. - -The binary distribution of this product bundles binaries of -Apache HBase - Annotations 1.2.6, -Apache HBase - Client 1.2.6, -Apache HBase - Common 1.2.6, -Apache HBase - Hadoop Compatibility 1.2.6, -Apache HBase - Hadoop Two Compatibility 1.2.6, -Apache HBase - Prefix Tree 1.2.6, -Apache HBase - Procedure 1.2.6, -Apache HBase - Protocol 1.2.6, -Apache HBase - Server 1.2.6, -which has the following notices: - * Apache HBase - Copyright 2007-2015 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - -- - This product incorporates portions of the 'Hadoop' project - - Copyright 2007-2009 The Apache Software Foundation - - Licensed under the Apache License v2.0 - - -- - This product includes portions of the Bootstrap project v3.0.0 - - Copyright 2013 Twitter, Inc. - - Licensed under the Apache License v2.0 - - This product uses the Glyphicons Halflings icon set. - - http://glyphicons.com/ - - Copyright Jan Kovařík - - Licensed under the Apache License v2.0 as a part of the Bootstrap project. - - -- - This product includes portions of the Guava project v14, specifically - 'hbase-common/src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java' - - Copyright (C) 2007 The Guava Authors - - Licensed under the Apache License, Version 2.0 - -The binary distribution of this product bundles binaries of -Phoenix Core 4.7.0, -which has the following notices: - Apache Phoenix - Copyright 2013-2016 The Apache Software Foundation - - This product includes software developed by The Apache Software - Foundation (http://www.apache.org/). - - This also includes: - - The phoenix-spark module has been adapted from the phoenix-spark library - distributed under the terms of the Apache 2 license. Original source copyright: - Copyright 2014 Simply Measured, Inc. - Copyright 2015 Interset Software Inc. - - The file bin/daemon.py is based on the file of the same name in python-daemon 2.0.5 - (https://pypi.python.org/pypi/python-daemon/). Original source copyright: - # Copyright © 2008–2015 Ben Finney - # Copyright © 2007–2008 Robert Niederreiter, Jens Klein - # Copyright © 2004–2005 Chad J. Schroeder - # Copyright © 2003 Clark Evans - # Copyright © 2002 Noah Spurrier - # Copyright © 2001 Jürgen Hermann - -The binary distribution of this product bundles binaries of -Plexus Cipher: encryption/decryption Component 1.4, -which has the following notices: - * The code in this component contains a class - Base64 taken from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/Base64.java - which is Apache license: http://www.apache.org/licenses/LICENSE-2.0 - - The PBE key processing routine PBECipher.createCipher() is adopted from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/OpenSSL.java - which is also Apache APL-2.0 license: http://www.apache.org/licenses/LICENSE-2.0 - -The binary distribution of this product bundles binaries of -software.amazon.ion:ion-java 1.0.1, -which has the following notices: - * Amazon Ion Java Copyright 2007-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -The binary distribution of this product bundles binaries of -joda-time:joda-time:2.9.9 -which has the following notices: - * ============================================================================= - = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = - ============================================================================= - This product includes software developed by - Joda.org (http://www.joda.org/). - -The binary distribution of this product bundles binaries of -Ehcache 3.3.1, -which has the following notices: - * Ehcache V3 Copyright 2014-2016 Terracotta, Inc. - -The binary distribution of this product bundles binaries of -snakeyaml (https://bitbucket.org/asomov/snakeyaml), -which has the following notices: - * Copyright (c) 2008, http://www.snakeyaml.org - -The binary distribution of this product bundles binaries of -swagger-annotations (https://github.com/swagger-api/swagger-core), -which has the following notices: - * Copyright 2016 SmartBear Software - -The binary distribution of this product bundles binaries of -metrics-core 3.2.4 -which has the following notices: - * Copyright 2010-2013 Coda Hale and Yammer, Inc. - - This product includes software developed by Coda Hale and Yammer, Inc. - - This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64, - LongAdder), which was released with the following comments: - - Written by Doug Lea with assistance from members of JCP JSR-166 - Expert Group and released to the public domain, as explained at - http://creativecommons.org/publicdomain/zero/1.0/ - - -======================================================================== -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -The binary distribution of this product bundles binaries of -org.iq80.leveldb:leveldb-api (https://github.com/dain/leveldb), which has the -following notices: -* Copyright 2011 Dain Sundstrom -* Copyright 2011 FuseSource Corp. http://fusesource.com - -The binary distribution of this product bundles binaries of -AWS SDK for Java - Bundle 1.11.271, -AWS Java SDK for AWS KMS 1.11.271, -AWS Java SDK for Amazon S3 1.11.271, -AWS Java SDK for AWS STS 1.11.271, -JMES Path Query library 1.0, -which has the following notices: - * This software includes third party software subject to the following - copyrights: - XML parsing and utility functions from JetS3t - Copyright - 2006-2009 James Murty. - JSON parsing and utility functions from JSON.org - - Copyright 2002 JSON.org. - PKCS#1 PEM encoded private key parsing and utility - functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. - -The binary distribution of this product bundles binaries of -Gson 2.2.4, -which has the following notices: - - The Netty Project - ================= - -Please visit the Netty web site for more information: - - * http://netty.io/ - -Copyright 2014 The Netty Project - -The Netty Project 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. - -Also, please refer to each LICENSE..txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- -This product contains the extensions to Java Collections Framework which has -been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: - - * LICENSE: - * license/LICENSE.jsr166y.txt (Public Domain) - * HOMEPAGE: - * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ - * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ - -This product contains a modified version of Robert Harder's Public Domain -Base64 Encoder and Decoder, which can be obtained at: - - * LICENSE: - * license/LICENSE.base64.txt (Public Domain) - * HOMEPAGE: - * http://iharder.sourceforge.net/current/java/base64/ - -This product contains a modified portion of 'Webbit', an event based -WebSocket and HTTP server, which can be obtained at: - - * LICENSE: - * license/LICENSE.webbit.txt (BSD License) - * HOMEPAGE: - * https://github.com/joewalnes/webbit - -This product contains a modified portion of 'SLF4J', a simple logging -facade for Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.slf4j.txt (MIT License) - * HOMEPAGE: - * http://www.slf4j.org/ - -This product contains a modified portion of 'ArrayDeque', written by Josh -Bloch of Google, Inc: - - * LICENSE: - * license/LICENSE.deque.txt (Public Domain) - -This product contains a modified portion of 'Apache Harmony', an open source -Java SE, which can be obtained at: - - * LICENSE: - * license/LICENSE.harmony.txt (Apache License 2.0) - * HOMEPAGE: - * http://archive.apache.org/dist/harmony/ - -This product contains a modified version of Roland Kuhn's ASL2 -AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue. -It can be obtained at: - - * LICENSE: - * license/LICENSE.abstractnodequeue.txt (Public Domain) - * HOMEPAGE: - * https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java - -This product contains a modified portion of 'jbzip2', a Java bzip2 compression -and decompression library written by Matthew J. Francis. It can be obtained at: - - * LICENSE: - * license/LICENSE.jbzip2.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jbzip2/ - -This product contains a modified portion of 'libdivsufsort', a C API library to construct -the suffix array and the Burrows-Wheeler transformed string for any input string of -a constant-size alphabet written by Yuta Mori. It can be obtained at: - - * LICENSE: - * license/LICENSE.libdivsufsort.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/libdivsufsort/ - -This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, - which can be obtained at: - - * LICENSE: - * license/LICENSE.jctools.txt (ASL2 License) - * HOMEPAGE: - * https://github.com/JCTools/JCTools - -This product optionally depends on 'JZlib', a re-implementation of zlib in -pure Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.jzlib.txt (BSD style License) - * HOMEPAGE: - * http://www.jcraft.com/jzlib/ - -This product optionally depends on 'Compress-LZF', a Java library for encoding and -decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: - - * LICENSE: - * license/LICENSE.compress-lzf.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/ning/compress - -This product optionally depends on 'lz4', a LZ4 Java compression -and decompression library written by Adrien Grand. It can be obtained at: - - * LICENSE: - * license/LICENSE.lz4.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jpountz/lz4-java - -This product optionally depends on 'lzma-java', a LZMA Java compression -and decompression library, which can be obtained at: - - * LICENSE: - * license/LICENSE.lzma-java.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jponge/lzma-java - -This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression -and decompression library written by William Kinney. It can be obtained at: - - * LICENSE: - * license/LICENSE.jfastlz.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jfastlz/ - -This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: - - * LICENSE: - * license/LICENSE.protobuf.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/protobuf/ - -This product optionally depends on 'Bouncy Castle Crypto APIs' to generate -a temporary self-signed X.509 certificate when the JVM does not provide the -equivalent functionality. It can be obtained at: - - * LICENSE: - * license/LICENSE.bouncycastle.txt (MIT License) - * HOMEPAGE: - * http://www.bouncycastle.org/ - -This product optionally depends on 'Snappy', a compression library produced -by Google Inc, which can be obtained at: - - * LICENSE: - * license/LICENSE.snappy.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/snappy/ - -This product optionally depends on 'Caliper', Google's micro- -benchmarking framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.caliper.txt (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/caliper/ - -This product optionally depends on 'Apache Commons Logging', a logging -framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-logging.txt (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging/ - -This product optionally depends on 'Apache Log4J', a logging framework, which -can be obtained at: - - * LICENSE: - * license/LICENSE.log4j.txt (Apache License 2.0) - * HOMEPAGE: - * http://logging.apache.org/log4j/ - -This product optionally depends on 'Aalto XML', an ultra-high performance -non-blocking XML processor, which can be obtained at: - - * LICENSE: - * license/LICENSE.aalto-xml.txt (Apache License 2.0) - * HOMEPAGE: - * http://wiki.fasterxml.com/AaltoHome - -This product contains a modified version of 'HPACK', a Java implementation of -the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: - - * LICENSE: - * license/LICENSE.hpack.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/twitter/hpack - -This product contains a modified portion of 'Apache Commons Lang', a Java library -provides utilities for the java.lang API, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-lang.txt (Apache License 2.0) - * HOMEPAGE: - * https://commons.apache.org/proper/commons-lang/ - -This product contains a modified portion of 'JDOM 1.1', which can be obtained at: - - * LICENSE: - * https://github.com/hunterhacker/jdom/blob/jdom-1.1/core/LICENSE.txt - * HOMEPAGE: - * http://www.jdom.org/ - -The binary distribution of this product bundles binaries of -Commons Codec 1.4, -which has the following notices: - * src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.javacontains test data from http://aspell.net/test/orig/batch0.tab.Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - =============================================================================== - The content of package org.apache.commons.codec.language.bm has been translated - from the original php source code available at http://stevemorse.org/phoneticinfo.htm - with permission from the original authors. - Original source copyright:Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - -The binary distribution of this product bundles binaries of -Commons Lang 2.6, -which has the following notices: - * This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - -The binary distribution of this product bundles binaries of -Apache Log4j 1.2.17, -which has the following notices: - * ResolverUtil.java - Copyright 2005-2006 Tim Fennell - Dumbster SMTP test server - Copyright 2004 Jason Paul Kitchen - TypeUtil.java - Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams - -The binary distribution of this product bundles binaries of -"Java Concurrency in Practice" book annotations 1.0, -which has the following notices: - * Copyright (c) 2005 Brian Goetz and Tim Peierls Released under the Creative - Commons Attribution License (http://creativecommons.org/licenses/by/2.5) - Official home: http://www.jcip.net Any republication or derived work - distributed in source code form must include this copyright and license - notice. - -The binary distribution of this product bundles binaries of -Jetty :: Http Utility 9.3.19., -Jetty :: IO Utility 9.3.19., -Jetty :: Security 9.3.19., -Jetty :: Server Core 9.3.19., -Jetty :: Servlet Handling 9.3.19., -Jetty :: Utilities 9.3.19., -Jetty :: Utilities :: Ajax, -Jetty :: Webapp Application Support 9.3.19., -Jetty :: XML utilities 9.3.19., -which has the following notices: - * ============================================================== - Jetty Web Container - Copyright 1995-2016 Mort Bay Consulting Pty Ltd. - ============================================================== - - The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd - unless otherwise noted. - - Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - - Jetty may be distributed under either license. - - ------ - Eclipse - - The following artifacts are EPL. - * org.eclipse.jetty.orbit:org.eclipse.jdt.core - - The following artifacts are EPL and ASL2. - * org.eclipse.jetty.orbit:javax.security.auth.message - - - The following artifacts are EPL and CDDL 1.0. - * org.eclipse.jetty.orbit:javax.mail.glassfish - - ------ - OW2 - - The following artifacts are licensed by the OW2 Foundation according to the - terms of http://asm.ow2.org/license.html - - org.ow2.asm:asm-commons - org.ow2.asm:asm - - - ------ - Apache - - The following artifacts are ASL2 licensed. - - org.apache.taglibs:taglibs-standard-spec - org.apache.taglibs:taglibs-standard-impl - - - ------ - MortBay - - The following artifacts are ASL2 licensed. Based on selected classes from - following Apache Tomcat jars, all ASL2 licensed. - - org.mortbay.jasper:apache-jsp - org.apache.tomcat:tomcat-jasper - org.apache.tomcat:tomcat-juli - org.apache.tomcat:tomcat-jsp-api - org.apache.tomcat:tomcat-el-api - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-api - org.apache.tomcat:tomcat-util-scan - org.apache.tomcat:tomcat-util - - org.mortbay.jasper:apache-el - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-el-api - - - ------ - Mortbay - - The following artifacts are CDDL - - org.eclipse.jetty.toolchain:jetty-schemas - - ------ - Assorted - - The UnixCrypt.java code implements the one way cryptography used by - Unix systems for simple password protection. Copyright 1996 Aki Yoshida, - modified April 2001 by Iris Van den Broeke, Daniel Deville. - Permission to use, copy, modify and distribute UnixCrypt - for non-commercial or commercial purposes and without fee is - granted provided that the copyright notice appears in all copies./ - -The binary distribution of this product bundles binaries of -Snappy for Java 1.0.4.1, -which has the following notices: - * This product includes software developed by Google - Snappy: http://code.google.com/p/snappy/ (New BSD License) - - This product includes software developed by Apache - PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ - (Apache 2.0 license) - - This library containd statically linked libstdc++. This inclusion is allowed by - "GCC RUntime Library Exception" - http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html - - == Contributors == - * Tatu Saloranta - * Providing benchmark suite - * Alec Wysoker - * Performance and memory usage improvement - -The binary distribution of this product bundles binaries of -Xerces2 Java Parser 2.9.1, -which has the following notices: - * ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xerces Java distribution. == - ========================================================================= - - Apache Xerces Java - Copyright 1999-2007 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. - -The binary distribution of this product bundles binaries of -Logback Classic Module 1.1.2, -Logback Core Module 1.1.2, -which has the following notices: - * Logback: the reliable, generic, fast and flexible logging framework. - Copyright (C) 1999-2012, QOS.ch. All rights reserved. - -The binary distribution of this product bundles binaries of -Apache HBase - Annotations 1.2.6, -Apache HBase - Client 1.2.6, -Apache HBase - Common 1.2.6, -Apache HBase - Hadoop Compatibility 1.2.6, -Apache HBase - Hadoop Two Compatibility 1.2.6, -Apache HBase - Prefix Tree 1.2.6, -Apache HBase - Procedure 1.2.6, -Apache HBase - Protocol 1.2.6, -Apache HBase - Server 1.2.6, -which has the following notices: - * Apache HBase - Copyright 2007-2015 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - -- - This product incorporates portions of the 'Hadoop' project - - Copyright 2007-2009 The Apache Software Foundation - - Licensed under the Apache License v2.0 - - -- - This product includes portions of the Bootstrap project v3.0.0 - - Copyright 2013 Twitter, Inc. - - Licensed under the Apache License v2.0 - - This product uses the Glyphicons Halflings icon set. - - http://glyphicons.com/ - - Copyright Jan Kovařík - - Licensed under the Apache License v2.0 as a part of the Bootstrap project. - - -- - This product includes portions of the Guava project v14, specifically - 'hbase-common/src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java' - - Copyright (C) 2007 The Guava Authors - - Licensed under the Apache License, Version 2.0 - -The binary distribution of this product bundles binaries of -Phoenix Core 4.7.0, -which has the following notices: - Apache Phoenix - Copyright 2013-2016 The Apache Software Foundation - - This product includes software developed by The Apache Software - Foundation (http://www.apache.org/). - - This also includes: - - The phoenix-spark module has been adapted from the phoenix-spark library - distributed under the terms of the Apache 2 license. Original source copyright: - Copyright 2014 Simply Measured, Inc. - Copyright 2015 Interset Software Inc. - - The file bin/daemon.py is based on the file of the same name in python-daemon 2.0.5 - (https://pypi.python.org/pypi/python-daemon/). Original source copyright: - # Copyright © 2008–2015 Ben Finney - # Copyright © 2007–2008 Robert Niederreiter, Jens Klein - # Copyright © 2004–2005 Chad J. Schroeder - # Copyright © 2003 Clark Evans - # Copyright © 2002 Noah Spurrier - # Copyright © 2001 Jürgen Hermann - -The binary distribution of this product bundles binaries of -Plexus Cipher: encryption/decryption Component 1.4, -which has the following notices: - * The code in this component contains a class - Base64 taken from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/Base64.java - which is Apache license: http://www.apache.org/licenses/LICENSE-2.0 - - The PBE key processing routine PBECipher.createCipher() is adopted from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/OpenSSL.java - which is also Apache APL-2.0 license: http://www.apache.org/licenses/LICENSE-2.0 - -The binary distribution of this product bundles binaries of -software.amazon.ion:ion-java 1.0.1, -which has the following notices: - * Amazon Ion Java Copyright 2007-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -The binary distribution of this product bundles binaries of -joda-time:joda-time:2.9.9 -which has the following notices: - * ============================================================================= - = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = - ============================================================================= - This product includes software developed by - Joda.org (http://www.joda.org/). - -The binary distribution of this product bundles binaries of -Ehcache 3.3.1, -which has the following notices: - * Ehcache V3 Copyright 2014-2016 Terracotta, Inc. - -The binary distribution of this product bundles binaries of -snakeyaml (https://bitbucket.org/asomov/snakeyaml), -which has the following notices: - * Copyright (c) 2008, http://www.snakeyaml.org - -The binary distribution of this product bundles binaries of -swagger-annotations (https://github.com/swagger-api/swagger-core), -which has the following notices: - * Copyright 2016 SmartBear Software - -The binary distribution of this product bundles binaries of -metrics-core 3.2.4 -which has the following notices: - * Copyright 2010-2013 Coda Hale and Yammer, Inc. - - This product includes software developed by Coda Hale and Yammer, Inc. - - This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64, - LongAdder), which was released with the following comments: - - Written by Doug Lea with assistance from members of JCP JSR-166 - Expert Group and released to the public domain, as explained at - http://creativecommons.org/publicdomain/zero/1.0/ - - -======================================================================== -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -The binary distribution of this product bundles binaries of -org.iq80.leveldb:leveldb-api (https://github.com/dain/leveldb), which has the -following notices: -* Copyright 2011 Dain Sundstrom -* Copyright 2011 FuseSource Corp. http://fusesource.com - -The binary distribution of this product bundles binaries of -AWS SDK for Java - Bundle 1.11.271, -AWS Java SDK for AWS KMS 1.11.271, -AWS Java SDK for Amazon S3 1.11.271, -AWS Java SDK for AWS STS 1.11.271, -JMES Path Query library 1.0, -which has the following notices: - * This software includes third party software subject to the following - copyrights: - XML parsing and utility functions from JetS3t - Copyright - 2006-2009 James Murty. - JSON parsing and utility functions from JSON.org - - Copyright 2002 JSON.org. - PKCS#1 PEM encoded private key parsing and utility - functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. - -The binary distribution of this product bundles binaries of -Gson 2.2.4, -which has the following notices: - - The Netty Project - ================= - -Please visit the Netty web site for more information: - - * http://netty.io/ - -Copyright 2014 The Netty Project - -The Netty Project 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. - -Also, please refer to each LICENSE..txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- -This product contains the extensions to Java Collections Framework which has -been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: - - * LICENSE: - * license/LICENSE.jsr166y.txt (Public Domain) - * HOMEPAGE: - * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ - * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ - -This product contains a modified version of Robert Harder's Public Domain -Base64 Encoder and Decoder, which can be obtained at: - - * LICENSE: - * license/LICENSE.base64.txt (Public Domain) - * HOMEPAGE: - * http://iharder.sourceforge.net/current/java/base64/ - -This product contains a modified portion of 'Webbit', an event based -WebSocket and HTTP server, which can be obtained at: - - * LICENSE: - * license/LICENSE.webbit.txt (BSD License) - * HOMEPAGE: - * https://github.com/joewalnes/webbit - -This product contains a modified portion of 'SLF4J', a simple logging -facade for Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.slf4j.txt (MIT License) - * HOMEPAGE: - * http://www.slf4j.org/ - -This product contains a modified portion of 'ArrayDeque', written by Josh -Bloch of Google, Inc: - - * LICENSE: - * license/LICENSE.deque.txt (Public Domain) - -This product contains a modified portion of 'Apache Harmony', an open source -Java SE, which can be obtained at: - - * LICENSE: - * license/LICENSE.harmony.txt (Apache License 2.0) - * HOMEPAGE: - * http://archive.apache.org/dist/harmony/ - -This product contains a modified version of Roland Kuhn's ASL2 -AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue. -It can be obtained at: - - * LICENSE: - * license/LICENSE.abstractnodequeue.txt (Public Domain) - * HOMEPAGE: - * https://github.com/akka/akka/blob/wip-2.2.3-for-scala-2.11/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java - -This product contains a modified portion of 'jbzip2', a Java bzip2 compression -and decompression library written by Matthew J. Francis. It can be obtained at: - - * LICENSE: - * license/LICENSE.jbzip2.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jbzip2/ - -This product contains a modified portion of 'libdivsufsort', a C API library to construct -the suffix array and the Burrows-Wheeler transformed string for any input string of -a constant-size alphabet written by Yuta Mori. It can be obtained at: - - * LICENSE: - * license/LICENSE.libdivsufsort.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/libdivsufsort/ - -This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM, - which can be obtained at: - - * LICENSE: - * license/LICENSE.jctools.txt (ASL2 License) - * HOMEPAGE: - * https://github.com/JCTools/JCTools - -This product optionally depends on 'JZlib', a re-implementation of zlib in -pure Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.jzlib.txt (BSD style License) - * HOMEPAGE: - * http://www.jcraft.com/jzlib/ - -This product optionally depends on 'Compress-LZF', a Java library for encoding and -decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: - - * LICENSE: - * license/LICENSE.compress-lzf.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/ning/compress - -This product optionally depends on 'lz4', a LZ4 Java compression -and decompression library written by Adrien Grand. It can be obtained at: - - * LICENSE: - * license/LICENSE.lz4.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jpountz/lz4-java - -This product optionally depends on 'lzma-java', a LZMA Java compression -and decompression library, which can be obtained at: - - * LICENSE: - * license/LICENSE.lzma-java.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/jponge/lzma-java - -This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression -and decompression library written by William Kinney. It can be obtained at: - - * LICENSE: - * license/LICENSE.jfastlz.txt (MIT License) - * HOMEPAGE: - * https://code.google.com/p/jfastlz/ - -This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: - - * LICENSE: - * license/LICENSE.protobuf.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/protobuf/ - -This product optionally depends on 'Bouncy Castle Crypto APIs' to generate -a temporary self-signed X.509 certificate when the JVM does not provide the -equivalent functionality. It can be obtained at: - - * LICENSE: - * license/LICENSE.bouncycastle.txt (MIT License) - * HOMEPAGE: - * http://www.bouncycastle.org/ - -This product optionally depends on 'Snappy', a compression library produced -by Google Inc, which can be obtained at: - - * LICENSE: - * license/LICENSE.snappy.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/snappy/ - -This product optionally depends on 'Caliper', Google's micro- -benchmarking framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.caliper.txt (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/caliper/ - -This product optionally depends on 'Apache Commons Logging', a logging -framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-logging.txt (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging/ - -This product optionally depends on 'Apache Log4J', a logging framework, which -can be obtained at: - - * LICENSE: - * license/LICENSE.log4j.txt (Apache License 2.0) - * HOMEPAGE: - * http://logging.apache.org/log4j/ - -This product optionally depends on 'Aalto XML', an ultra-high performance -non-blocking XML processor, which can be obtained at: - - * LICENSE: - * license/LICENSE.aalto-xml.txt (Apache License 2.0) - * HOMEPAGE: - * http://wiki.fasterxml.com/AaltoHome - -This product contains a modified version of 'HPACK', a Java implementation of -the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: - - * LICENSE: - * license/LICENSE.hpack.txt (Apache License 2.0) - * HOMEPAGE: - * https://github.com/twitter/hpack - -This product contains a modified portion of 'Apache Commons Lang', a Java library -provides utilities for the java.lang API, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-lang.txt (Apache License 2.0) - * HOMEPAGE: - * https://commons.apache.org/proper/commons-lang/ - -This product contains a modified portion of 'JDOM 1.1', which can be obtained at: - - * LICENSE: - * https://github.com/hunterhacker/jdom/blob/jdom-1.1/core/LICENSE.txt - * HOMEPAGE: - * http://www.jdom.org/ - -The binary distribution of this product bundles binaries of -Commons Codec 1.4, -which has the following notices: - * src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.javacontains test data from http://aspell.net/test/orig/batch0.tab.Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - =============================================================================== - The content of package org.apache.commons.codec.language.bm has been translated - from the original php source code available at http://stevemorse.org/phoneticinfo.htm - with permission from the original authors. - Original source copyright:Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - -The binary distribution of this product bundles binaries of -Commons Lang 2.6, -which has the following notices: - * This product includes software from the Spring Framework,under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - -The binary distribution of this product bundles binaries of -Apache Log4j 1.2.17, -which has the following notices: - * ResolverUtil.java - Copyright 2005-2006 Tim Fennell - Dumbster SMTP test server - Copyright 2004 Jason Paul Kitchen - TypeUtil.java - Copyright 2002-2012 Ramnivas Laddad, Juergen Hoeller, Chris Beams - -The binary distribution of this product bundles binaries of -"Java Concurrency in Practice" book annotations 1.0, -which has the following notices: - * Copyright (c) 2005 Brian Goetz and Tim Peierls Released under the Creative - Commons Attribution License (http://creativecommons.org/licenses/by/2.5) - Official home: http://www.jcip.net Any republication or derived work - distributed in source code form must include this copyright and license - notice. - -The binary distribution of this product bundles binaries of -Jetty :: Http Utility 9.3.19., -Jetty :: IO Utility 9.3.19., -Jetty :: Security 9.3.19., -Jetty :: Server Core 9.3.19., -Jetty :: Servlet Handling 9.3.19., -Jetty :: Utilities 9.3.19., -Jetty :: Utilities :: Ajax, -Jetty :: Webapp Application Support 9.3.19., -Jetty :: XML utilities 9.3.19., -which has the following notices: - * ============================================================== - Jetty Web Container - Copyright 1995-2016 Mort Bay Consulting Pty Ltd. - ============================================================== - - The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd - unless otherwise noted. - - Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - - Jetty may be distributed under either license. - - ------ - Eclipse - - The following artifacts are EPL. - * org.eclipse.jetty.orbit:org.eclipse.jdt.core - - The following artifacts are EPL and ASL2. - * org.eclipse.jetty.orbit:javax.security.auth.message - - - The following artifacts are EPL and CDDL 1.0. - * org.eclipse.jetty.orbit:javax.mail.glassfish - - ------ - OW2 - - The following artifacts are licensed by the OW2 Foundation according to the - terms of http://asm.ow2.org/license.html - - org.ow2.asm:asm-commons - org.ow2.asm:asm - - - ------ - Apache - - The following artifacts are ASL2 licensed. - - org.apache.taglibs:taglibs-standard-spec - org.apache.taglibs:taglibs-standard-impl - - - ------ - MortBay - - The following artifacts are ASL2 licensed. Based on selected classes from - following Apache Tomcat jars, all ASL2 licensed. - - org.mortbay.jasper:apache-jsp - org.apache.tomcat:tomcat-jasper - org.apache.tomcat:tomcat-juli - org.apache.tomcat:tomcat-jsp-api - org.apache.tomcat:tomcat-el-api - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-api - org.apache.tomcat:tomcat-util-scan - org.apache.tomcat:tomcat-util - - org.mortbay.jasper:apache-el - org.apache.tomcat:tomcat-jasper-el - org.apache.tomcat:tomcat-el-api - - - ------ - Mortbay - - The following artifacts are CDDL - - org.eclipse.jetty.toolchain:jetty-schemas - - ------ - Assorted - - The UnixCrypt.java code implements the one way cryptography used by - Unix systems for simple password protection. Copyright 1996 Aki Yoshida, - modified April 2001 by Iris Van den Broeke, Daniel Deville. - Permission to use, copy, modify and distribute UnixCrypt - for non-commercial or commercial purposes and without fee is - granted provided that the copyright notice appears in all copies./ - -The binary distribution of this product bundles binaries of -Snappy for Java 1.0.4.1, -which has the following notices: - * This product includes software developed by Google - Snappy: http://code.google.com/p/snappy/ (New BSD License) - - This product includes software developed by Apache - PureJavaCrc32C from apache-hadoop-common http://hadoop.apache.org/ - (Apache 2.0 license) - - This library containd statically linked libstdc++. This inclusion is allowed by - "GCC RUntime Library Exception" - http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html - - == Contributors == - * Tatu Saloranta - * Providing benchmark suite - * Alec Wysoker - * Performance and memory usage improvement - -The binary distribution of this product bundles binaries of -Xerces2 Java Parser 2.9.1, -which has the following notices: - * ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xerces Java distribution. == - ========================================================================= - - Apache Xerces Java - Copyright 1999-2007 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. - -The binary distribution of this product bundles binaries of -Logback Classic Module 1.1.2, -Logback Core Module 1.1.2, -which has the following notices: - * Logback: the reliable, generic, fast and flexible logging framework. - Copyright (C) 1999-2012, QOS.ch. All rights reserved. - -The binary distribution of this product bundles binaries of -Apache HBase - Annotations 1.2.6, -Apache HBase - Client 1.2.6, -Apache HBase - Common 1.2.6, -Apache HBase - Hadoop Compatibility 1.2.6, -Apache HBase - Hadoop Two Compatibility 1.2.6, -Apache HBase - Prefix Tree 1.2.6, -Apache HBase - Procedure 1.2.6, -Apache HBase - Protocol 1.2.6, -Apache HBase - Server 1.2.6, -which has the following notices: - * Apache HBase - Copyright 2007-2015 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - -- - This product incorporates portions of the 'Hadoop' project - - Copyright 2007-2009 The Apache Software Foundation - - Licensed under the Apache License v2.0 - - -- - This product includes portions of the Bootstrap project v3.0.0 - - Copyright 2013 Twitter, Inc. - - Licensed under the Apache License v2.0 - - This product uses the Glyphicons Halflings icon set. - - http://glyphicons.com/ - - Copyright Jan Kovařík - - Licensed under the Apache License v2.0 as a part of the Bootstrap project. - - -- - This product includes portions of the Guava project v14, specifically - 'hbase-common/src/main/java/org/apache/hadoop/hbase/io/LimitInputStream.java' - - Copyright (C) 2007 The Guava Authors - - Licensed under the Apache License, Version 2.0 - -The binary distribution of this product bundles binaries of -Phoenix Core 4.7.0, -which has the following notices: - Apache Phoenix - Copyright 2013-2016 The Apache Software Foundation - - This product includes software developed by The Apache Software - Foundation (http://www.apache.org/). - - This also includes: - - The phoenix-spark module has been adapted from the phoenix-spark library - distributed under the terms of the Apache 2 license. Original source copyright: - Copyright 2014 Simply Measured, Inc. - Copyright 2015 Interset Software Inc. - - The file bin/daemon.py is based on the file of the same name in python-daemon 2.0.5 - (https://pypi.python.org/pypi/python-daemon/). Original source copyright: - # Copyright © 2008–2015 Ben Finney - # Copyright © 2007–2008 Robert Niederreiter, Jens Klein - # Copyright © 2004–2005 Chad J. Schroeder - # Copyright © 2003 Clark Evans - # Copyright © 2002 Noah Spurrier - # Copyright © 2001 Jürgen Hermann - -The binary distribution of this product bundles binaries of -Plexus Cipher: encryption/decryption Component 1.4, -which has the following notices: - * The code in this component contains a class - Base64 taken from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/Base64.java - which is Apache license: http://www.apache.org/licenses/LICENSE-2.0 - - The PBE key processing routine PBECipher.createCipher() is adopted from http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.10/src/java/org/apache/commons/ssl/OpenSSL.java - which is also Apache APL-2.0 license: http://www.apache.org/licenses/LICENSE-2.0 - -The binary distribution of this product bundles binaries of -software.amazon.ion:ion-java 1.0.1, -which has the following notices: - * Amazon Ion Java Copyright 2007-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -The binary distribution of this product bundles binaries of -joda-time:joda-time:2.9.9 -which has the following notices: - * ============================================================================= - = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = - ============================================================================= - This product includes software developed by - Joda.org (http://www.joda.org/). - -The binary distribution of this product bundles binaries of -Ehcache 3.3.1, -which has the following notices: - * Ehcache V3 Copyright 2014-2016 Terracotta, Inc. - -The binary distribution of this product bundles binaries of -snakeyaml (https://bitbucket.org/asomov/snakeyaml), -which has the following notices: - * Copyright (c) 2008, http://www.snakeyaml.org - -The binary distribution of this product bundles binaries of -swagger-annotations (https://github.com/swagger-api/swagger-core), -which has the following notices: - * Copyright 2016 SmartBear Software - -The binary distribution of this product bundles binaries of -metrics-core 3.2.4 -which has the following notices: - * Copyright 2010-2013 Coda Hale and Yammer, Inc. - - This product includes software developed by Coda Hale and Yammer, Inc. - - This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64, - LongAdder), which was released with the following comments: - - Written by Doug Lea with assistance from members of JCP JSR-166 - Expert Group and released to the public domain, as explained at - http://creativecommons.org/publicdomain/zero/1.0/ - - -======================================================================== - -Apache HBase - Client -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Common -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Hadoop Compatibility -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Hadoop Two Compatibility -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - HTTP -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - MapReduce -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Metrics API -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Metrics Implementation -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Procedure -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Protocol -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Replication -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Server -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Shaded - Client -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). -==== -Apache HBase - Shaded - Client contained works - -This product contains additional works that are distributed under licenses -other than ASL v2. See LICENSE for full details - --- -This product includes portions of the Bootstrap project v3.0.0 - -Copyright 2013 Twitter, Inc. - -Licensed under the Apache License v2.0 - -This product uses the Glyphicons Halflings icon set. - -http://glyphicons.com/ - -Copyright Jan Kovařík - -Licensed under the Apache License v2.0 as a part of the Bootstrap project. - --- -This product includes the 'Findbugs Annotations under Apache License' project -(https://github.com/stephenc/findbugs-annotations), version 1.3.9-1 -licensed under the Apache Software License, version 2.0. --- -This product includes findbugs-annotations - -Licensed under Apache License, Version 2.0, see LICENSE for details. - -incorporated from com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1 - -For source see 'http://stephenc.github.com/findbugs-annotations/findbugs-annotations'. --- -This product includes error_prone_annotations - -incorporated from com.google.errorprone:error_prone_annotations:jar:2.3.3 - -For source see 'http://nexus.sonatype.org/oss-repository-hosting.html/error_prone_parent/error_prone_annotations/error_prone_annotations'. --- -This product includes commons-codec - -incorporated from commons-codec:commons-codec:jar:1.10 - -For source see 'http://commons.apache.org/proper/commons-codec/commons-codec'. --- -This product includes commons-io - -incorporated from commons-io:commons-io:jar:2.5 - -For source see 'http://commons.apache.org/proper/commons-io/commons-io'. --- -This product includes metrics-core - -incorporated from io.dropwizard.metrics:metrics-core:jar:3.2.6 - -For source see 'http://metrics.dropwizard.io/metrics-core/metrics-core'. --- -This product includes 'Apache log4j' -Copyright 2010 The Apache Software Foundation - --- -This product includes log4j - -incorporated from log4j:log4j:jar:1.2.17 - -For source see 'http://logging.apache.org/log4j/1.2/log4j'. --- -This product includes Apache Commons Crypto - -incorporated from org.apache.commons:commons-crypto:jar:1.0.0 - -For source see 'http://commons.apache.org/proper/commons-crypto/'. --- -This product includes software from the Spring Framework, -under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - --- -This product includes Apache Commons Lang - -incorporated from org.apache.commons:commons-lang3:jar:3.6 - -For source see 'http://commons.apache.org/proper/commons-lang/'. --- -This product includes Apache HBase - Client - -incorporated from org.apache.hbase:hbase-client:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-client'. --- -This product includes Apache HBase - Common - -incorporated from org.apache.hbase:hbase-common:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-common'. --- -This product includes Apache HBase - Hadoop Compatibility - -incorporated from org.apache.hbase:hbase-hadoop-compat:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-hadoop-compat'. --- -This product includes Apache HBase - Hadoop Two Compatibility - -incorporated from org.apache.hbase:hbase-hadoop2-compat:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-hadoop2-compat'. --- -This product includes Apache HBase - Metrics Implementation - -incorporated from org.apache.hbase:hbase-metrics:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-metrics'. --- -This product includes Apache HBase - Metrics API - -incorporated from org.apache.hbase:hbase-metrics-api:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-metrics-api'. --- -This product includes Apache HBase - Protocol - -incorporated from org.apache.hbase:hbase-protocol:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-protocol'. --- -This product includes Apache HBase - Shaded Protocol - -incorporated from org.apache.hbase:hbase-protocol-shaded:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-protocol-shaded'. --- -This product includes Apache HBase - Resource Bundle - -incorporated from org.apache.hbase:hbase-resource-bundle:jar:2.2.3 - -For source see 'https://hbase.apache.org/hbase-build-configuration/hbase-resource-bundle'. --- -This product includes Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs - -incorporated from org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:jar:2.2.1 - -For source see 'http://hbase.apache.org/hbase-shaded-miscellaneous'. --- -This product includes Apache HBase Relocated (Shaded) Netty Libs - -incorporated from org.apache.hbase.thirdparty:hbase-shaded-netty:jar:2.2.1 - -For source see 'http://hbase.apache.org/hbase-shaded-netty'. --- -This product includes Apache HBase Patched & Relocated (Shaded) Protobuf - -incorporated from org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:2.2.1 - -For source see 'http://hbase.apache.org/hbase-shaded-protobuf'. --- -This product includes htrace-core4 - -incorporated from org.apache.htrace:htrace-core4:jar:4.2.0-incubating - -For source see 'http://incubator.apache.org/projects/htrace.html/htrace-core4'. --- -This product includes Apache Yetus - Audience Annotations - -incorporated from org.apache.yetus:audience-annotations:jar:0.5.0 - -For source see 'https://yetus.apache.org/audience-annotations'. --- -This product includes 'Apache ZooKeeper' -Copyright 2009-2012 The Apache Software Foundation - --- -This product includes zookeeper - -incorporated from org.apache.zookeeper:zookeeper:jar:3.4.10 - -For source see '${dep.url}'. - ----- ----- -Incorporated NOTICE files from bundled works below. ----- - -Apache HBase - Client -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase Patched & Relocated (Shaded) Protobuf -Copyright 2017-2019 The Apache Software Foundation - ---- - -Apache HBase - Common -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Hadoop Compatibility -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Metrics API -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Hadoop Two Compatibility -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Metrics Implementation -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Shaded Protocol -Copyright 2007-2020 The Apache Software Foundation - -Apache HBase - Protocol -Copyright 2007-2020 The Apache Software Foundation - -Apache Commons Codec -Copyright 2002-2014 The Apache Software Foundation - -src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java -contains test data from http://aspell.net/test/orig/batch0.tab. -Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) - -=============================================================================== - -The content of package org.apache.commons.codec.language.bm has been translated -from the original php source code available at http://stevemorse.org/phoneticinfo.htm -with permission from the original authors. -Original source copyright: -Copyright (c) 2008 Alexander Beider & Stephen P. Morse. - -Apache Commons IO -Copyright 2002-2016 The Apache Software Foundation - -Apache Commons Lang -Copyright 2001-2017 The Apache Software Foundation - -This product includes software from the Spring Framework, -under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - -Apache Commons Collections -Copyright 2001-2018 The Apache Software Foundation - -Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs -Copyright 2017-2019 The Apache Software Foundation - -Apache Commons CLI -Copyright 2001-2017 The Apache Software Foundation - -Apache HBase Relocated (Shaded) Netty Libs -Copyright 2017-2019 The Apache Software Foundation - - - -======================================================================== - -Apache HBase - Shaded Protocol -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache HBase - Zookeeper -Copyright 2007-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Apache log4j -Copyright 2007 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== - -Apache Yetus - Audience Annotations -Copyright 2015-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== -# Notices for Eclipse Project for JAXB - -This content is produced and maintained by the Eclipse Project for JAXB project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jaxb - -## Trademarks - -Eclipse Project for JAXB is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Distribution License v. 1.0 which is available -at http://www.eclipse.org/org/documents/edl-v10.php. - -SPDX-License-Identifier: BSD-3-Clause - -## Source Code - -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jaxb-api - -## Third-party Content - -This project leverages the following third party content. - -None - -## Cryptography - -Content may contain encryption software. The country in which you are currently -may have restrictions on the import, possession, and use, and/or re-export to -another country, of encryption software. BEFORE using any encryption software, -please check the country's laws, regulations and policies concerning the import, -possession, or use, and re-export of encryption software, to see if this is -permitted. - - -======================================================================== -Apache Commons CLI -Copyright 2001-2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== -Apache Commons Lang -Copyright 2001-2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - - -======================================================================== -Apache Commons Logging -Copyright 2003-2013 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - -======================================================================== -Apache Commons Math -Copyright 2001-2012 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -=============================================================================== - -The BracketFinder (package org.apache.commons.math3.optimization.univariate) -and PowellOptimizer (package org.apache.commons.math3.optimization.general) -classes are based on the Python code in module "optimize.py" (version 0.5) -developed by Travis E. Oliphant for the SciPy library (http://www.scipy.org/) -Copyright © 2003-2009 SciPy Developers. -=============================================================================== - -The LinearConstraint, LinearObjectiveFunction, LinearOptimizer, -RelationShip, SimplexSolver and SimplexTableau classes in package -org.apache.commons.math3.optimization.linear include software developed by -Benjamin McCann (http://www.benmccann.com) and distributed with -the following copyright: Copyright 2009 Google Inc. -=============================================================================== - -This product includes software developed by the -University of Chicago, as Operator of Argonne National -Laboratory. -The LevenbergMarquardtOptimizer class in package -org.apache.commons.math3.optimization.general includes software -translated from the lmder, lmpar and qrsolv Fortran routines -from the Minpack package -Minpack Copyright Notice (1999) University of Chicago. All rights reserved -=============================================================================== - -The GraggBulirschStoerIntegrator class in package -org.apache.commons.math3.ode.nonstiff includes software translated -from the odex Fortran routine developed by E. Hairer and G. Wanner. -Original source copyright: -Copyright (c) 2004, Ernst Hairer -=============================================================================== - -The EigenDecompositionImpl class in package -org.apache.commons.math3.linear includes software translated -from some LAPACK Fortran routines. Original source copyright: -Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. -=============================================================================== - -The MersenneTwister class in package org.apache.commons.math3.random -includes software translated from the 2002-01-26 version of -the Mersenne-Twister generator written in C by Makoto Matsumoto and Takuji -Nishimura. Original source copyright: -Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, -All rights reserved -=============================================================================== - -The LocalizedFormatsTest class in the unit tests is an adapted version of -the OrekitMessagesTest class from the orekit library distributed under the -terms of the Apache 2 licence. Original source copyright: -Copyright 2010 CS Systèmes d'Information -=============================================================================== - -The HermiteInterpolator class and its corresponding test have been imported from -the orekit library distributed under the terms of the Apache 2 licence. Original -source copyright: -Copyright 2010-2012 CS Systèmes d'Information -=============================================================================== - -The creation of the package "o.a.c.m.analysis.integration.gauss" was inspired -by an original code donated by Sébastien Brisard. -=============================================================================== - - -The complete text of licenses and disclaimers associated with the the original -sources enumerated above at the time of code translation are in the LICENSE.txt -file. - - -======================================================================== - -Curator Client -Copyright 2011-2018 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Curator Framework -Copyright 2011-2018 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== - -Curator Recipes -Copyright 2011-2018 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - - -======================================================================== -This product currently only contains code developed by authors -of specific components, as identified by the source code files; -if such notes are missing files have been created by -Tatu Saloranta. - -For additional credits (generally to people who reported problems) -see CREDITS file. - -======================================================================== - -htrace-core4 -Copyright 2016 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== -This product currently only contains code developed by authors -of specific components, as identified by the source code files; -if such notes are missing files have been created by -Tatu Saloranta. - -For additional credits (generally to people who reported problems) -see CREDITS file. - -======================================================================== - -# Notices for Eclipse Project for JAF - -This content is produced and maintained by the Eclipse Project for JAF project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jaf - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Distribution License v. 1.0, -which is available at http://www.eclipse.org/org/documents/edl-v10.php. - -SPDX-License-Identifier: BSD-3-Clause - -## Source Code - -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jaf - -## Third-party Content - -This project leverages the following third party content. - -JUnit (4.12) - -* License: Eclipse Public License - -======================================================================== -This product currently only contains code developed by authors -of specific components, as identified by the source code files; -if such notes are missing files have been created by -Tatu Saloranta. - -For additional credits (generally to people who reported problems) -see CREDITS file. - -======================================================================== -# Notice for Jersey -This content is produced and maintained by the Eclipse Jersey project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jersey - -## Trademarks -Eclipse Jersey is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Public License v. 2.0 which is available at -http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made -available under the following Secondary Licenses when the conditions for such -availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU -General Public License, version 2 with the GNU Classpath Exception which is -available at https://www.gnu.org/software/classpath/license.html. - -SPDX-License-Identifier: EPL-2.0 - -## Source Code -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jersey - -## Third-party Content - -Angular JS, v1.6.6 -* License MIT (http://www.opensource.org/licenses/mit-license.php) -* Project: http://angularjs.org -* Coyright: (c) 2010-2017 Google, Inc. - -Bean Validation API 3.0.0 -* License: Apache License, 2.0 -* Project: http://beanvalidation.org/1.1/ -* Copyright: 2009, Red Hat, Inc. and/or its affiliates, and individual contributors -* by the @authors tag. - -Hibernate Validator CDI, 7.0.0.Final -* License: Apache License, 2.0 -* Project: https://beanvalidation.org/ -* Repackaged in org.glassfish.jersey.server.validation.internal.hibernate - -Bootstrap v3.3.7 -* License: MIT license (https://github.com/twbs/bootstrap/blob/master/LICENSE) -* Project: http://getbootstrap.com -* Copyright: 2011-2016 Twitter, Inc - -Google Guava Version 18.0 -* License: Apache License, 2.0 -* Copyright (C) 2009 The Guava Authors - -javax.inject Version: 1 -* License: Apache License, 2.0 -* Copyright (C) 2009 The JSR-330 Expert Group - -Javassist Version 3.25.0-GA -* License: Apache License, 2.0 -* Project: http://www.javassist.org/ -* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved. - -Jackson JAX-RS Providers Version 2.11.3 -* License: Apache License, 2.0 -* Project: https://github.com/FasterXML/jackson-jaxrs-providers -* Copyright: (c) 2009-2011 FasterXML, LLC. All rights reserved unless otherwise indicated. - -jQuery v1.12.4 -* License: jquery.org/license -* Project: jquery.org -* Copyright: (c) jQuery Foundation - -jQuery Barcode plugin 0.3 -* License: MIT (http://www.opensource.org/licenses/mit-license.php) -* Project: http://www.pasella.it/projects/jQuery/barcode -* Copyright: (c) 2009 Antonello Pasella antonello.pasella@gmail.com - -JSR-166 Extension - JEP 266 -* License: CC0 -* No copyright -* Written by Doug Lea with assistance from members of JCP JSR-166 Expert Group and released to the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/ - -KineticJS, v4.7.1 -* License: MIT license (http://www.opensource.org/licenses/mit-license.php) -* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS -* Copyright: Eric Rowell - -org.objectweb.asm Version 9.0 -* License: Modified BSD (http://asm.objectweb.org/license.html) -* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved. - -org.osgi.core version 6.0.0 -* License: Apache License, 2.0 -* Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved. - -org.glassfish.jersey.server.internal.monitoring.core -* License: Apache License, 2.0 -* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved. -* Copyright 2010-2013 Coda Hale and Yammer, Inc. - -W3.org documents -* License: W3C License -* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ - -======================================================================== -# Notice for Jersey -This content is produced and maintained by the Eclipse Jersey project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jersey - -## Trademarks -Eclipse Jersey is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Public License v. 2.0 which is available at -http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made -available under the following Secondary Licenses when the conditions for such -availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU -General Public License, version 2 with the GNU Classpath Exception which is -available at https://www.gnu.org/software/classpath/license.html. - -SPDX-License-Identifier: EPL-2.0 - -## Source Code -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jersey - -## Third-party Content - -Angular JS, v1.6.6 -* License MIT (http://www.opensource.org/licenses/mit-license.php) -* Project: http://angularjs.org -* Coyright: (c) 2010-2017 Google, Inc. - -Bean Validation API 3.0.0 -* License: Apache License, 2.0 -* Project: http://beanvalidation.org/1.1/ -* Copyright: 2009, Red Hat, Inc. and/or its affiliates, and individual contributors -* by the @authors tag. - -Hibernate Validator CDI, 7.0.0.Final -* License: Apache License, 2.0 -* Project: https://beanvalidation.org/ -* Repackaged in org.glassfish.jersey.server.validation.internal.hibernate - -Bootstrap v3.3.7 -* License: MIT license (https://github.com/twbs/bootstrap/blob/master/LICENSE) -* Project: http://getbootstrap.com -* Copyright: 2011-2016 Twitter, Inc - -Google Guava Version 18.0 -* License: Apache License, 2.0 -* Copyright (C) 2009 The Guava Authors - -javax.inject Version: 1 -* License: Apache License, 2.0 -* Copyright (C) 2009 The JSR-330 Expert Group - -Javassist Version 3.25.0-GA -* License: Apache License, 2.0 -* Project: http://www.javassist.org/ -* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved. - -Jackson JAX-RS Providers Version 2.11.3 -* License: Apache License, 2.0 -* Project: https://github.com/FasterXML/jackson-jaxrs-providers -* Copyright: (c) 2009-2011 FasterXML, LLC. All rights reserved unless otherwise indicated. - -jQuery v1.12.4 -* License: jquery.org/license -* Project: jquery.org -* Copyright: (c) jQuery Foundation - -jQuery Barcode plugin 0.3 -* License: MIT (http://www.opensource.org/licenses/mit-license.php) -* Project: http://www.pasella.it/projects/jQuery/barcode -* Copyright: (c) 2009 Antonello Pasella antonello.pasella@gmail.com - -JSR-166 Extension - JEP 266 -* License: CC0 -* No copyright -* Written by Doug Lea with assistance from members of JCP JSR-166 Expert Group and released to the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/ - -KineticJS, v4.7.1 -* License: MIT license (http://www.opensource.org/licenses/mit-license.php) -* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS -* Copyright: Eric Rowell - -org.objectweb.asm Version 9.0 -* License: Modified BSD (http://asm.objectweb.org/license.html) -* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved. - -org.osgi.core version 6.0.0 -* License: Apache License, 2.0 -* Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved. - -org.glassfish.jersey.server.internal.monitoring.core -* License: Apache License, 2.0 -* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved. -* Copyright 2010-2013 Coda Hale and Yammer, Inc. - -W3.org documents -* License: W3C License -* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ - - -============================================================================= -= NOTICE file corresponding to section 4d of the Apache License Version 2.0 = -============================================================================= -This product includes software developed by -Joda.org (https://www.joda.org/). - -======================================================================== - -Kerb Simple Kdc -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby ASN1 Project -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby Config -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby PKIX Project -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby Util -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby XDR Project -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Admin -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Client -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Common -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb core -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Crypto -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Identity -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Server -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Kerby-kerb Util -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - - The Netty Project - ================= - -Please visit the Netty web site for more information: - - * http://netty.io/ - -Copyright 2011 The Netty Project - -The Netty Project 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. - -Also, please refer to each LICENSE..txt file, which is located in -the 'license' directory of the distribution file, for the license terms of the -components that this product depends on. - -------------------------------------------------------------------------------- -This product contains the extensions to Java Collections Framework which has -been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: - - * LICENSE: - * license/LICENSE.jsr166y.txt (Public Domain) - * HOMEPAGE: - * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ - * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ - -This product contains a modified version of Robert Harder's Public Domain -Base64 Encoder and Decoder, which can be obtained at: - - * LICENSE: - * license/LICENSE.base64.txt (Public Domain) - * HOMEPAGE: - * http://iharder.sourceforge.net/current/java/base64/ - -This product contains a modified version of 'JZlib', a re-implementation of -zlib in pure Java, which can be obtained at: - - * LICENSE: - * license/LICENSE.jzlib.txt (BSD Style License) - * HOMEPAGE: - * http://www.jcraft.com/jzlib/ - -This product contains a modified version of 'Webbit', a Java event based -WebSocket and HTTP server: - - * LICENSE: - * license/LICENSE.webbit.txt (BSD License) - * HOMEPAGE: - * https://github.com/joewalnes/webbit - -This product optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: - - * LICENSE: - * license/LICENSE.protobuf.txt (New BSD License) - * HOMEPAGE: - * http://code.google.com/p/protobuf/ - -This product optionally depends on 'Bouncy Castle Crypto APIs' to generate -a temporary self-signed X.509 certificate when the JVM does not provide the -equivalent functionality. It can be obtained at: - - * LICENSE: - * license/LICENSE.bouncycastle.txt (MIT License) - * HOMEPAGE: - * http://www.bouncycastle.org/ - -This product optionally depends on 'SLF4J', a simple logging facade for Java, -which can be obtained at: - - * LICENSE: - * license/LICENSE.slf4j.txt (MIT License) - * HOMEPAGE: - * http://www.slf4j.org/ - -This product optionally depends on 'Apache Commons Logging', a logging -framework, which can be obtained at: - - * LICENSE: - * license/LICENSE.commons-logging.txt (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging/ - -This product optionally depends on 'Apache Log4J', a logging framework, -which can be obtained at: - - * LICENSE: - * license/LICENSE.log4j.txt (Apache License 2.0) - * HOMEPAGE: - * http://logging.apache.org/log4j/ - -This product optionally depends on 'Apache Felix', an open source OSGi -framework implementation, which can be obtained at: - - * LICENSE: - * license/LICENSE.felix.txt (Apache License 2.0) - * HOMEPAGE: - * http://felix.apache.org/ - -======================================================================== - -Token provider -Copyright 2014-2017 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== -This product currently only contains code developed by authors -of specific components, as identified by the source code files; -if such notes are missing files have been created by -Tatu Saloranta. - -For additional credits (generally to people who reported problems) -see CREDITS file. - -======================================================================== - -Apache Commons Collections -Copyright 2001-2018 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs -Copyright 2017-2019 The Apache Software Foundation - -Apache Commons CLI -Copyright 2001-2017 The Apache Software Foundation - -======================================================================== - -Apache HBase Relocated (Shaded) Netty Libs -Copyright 2017-2019 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -Apache HBase Patched & Relocated (Shaded) Protobuf -Copyright 2017-2019 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - - ---- - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -======================================================================== -Copyright 2014 - ${current.year} Rafael Winterhalter - -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. - -======================================================================== -Apache Commons Text -Copyright 2014-2020 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (https://www.apache.org/). - -======================================================================== -# Notices for Jakarta Activation - -This content is produced and maintained by Jakarta Activation project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jaf - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Distribution License v. 1.0, -which is available at http://www.eclipse.org/org/documents/edl-v10.php. - -SPDX-License-Identifier: BSD-3-Clause - -## Source Code - -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jaf - -======================================================================== - -# Notices for Eclipse Implementation of JAXB - -This content is produced and maintained by the Eclipse Implementation of JAXB -project. - -* Project home: https://projects.eclipse.org/projects/ee4j.jaxb-impl - -## Trademarks - -Eclipse Implementation of JAXB is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -This program and the accompanying materials are made available under the terms -of the Eclipse Distribution License v. 1.0 which is available at -http://www.eclipse.org/org/documents/edl-v10.php. - -SPDX-License-Identifier: BSD-3-Clause - -## Source Code - -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jaxb-ri -* https://github.com/eclipse-ee4j/jaxb-istack-commons -* https://github.com/eclipse-ee4j/jaxb-dtd-parser -* https://github.com/eclipse-ee4j/jaxb-fi -* https://github.com/eclipse-ee4j/jaxb-stax-ex -* https://github.com/eclipse-ee4j/jax-rpc-ri - -## Third-party Content - -This project leverages the following third party content. - -Apache Ant (1.10.2) - -* License: Apache-2.0 AND W3C AND LicenseRef-Public-Domain - -Apache Ant (1.10.2) - -* License: Apache-2.0 AND W3C AND LicenseRef-Public-Domain - -Apache Felix (1.2.0) - -* License: Apache License, 2.0 - -args4j (2.33) - -* License: MIT License - -dom4j (1.6.1) - -* License: Custom license based on Apache 1.1 - -file-management (3.0.0) - -* License: Apache-2.0 -* Project: https://maven.apache.org/shared/file-management/ -* Source: - https://svn.apache.org/viewvc/maven/shared/tags/file-management-3.0.0/ - -JUnit (4.12) - -* License: Eclipse Public License - -JUnit (4.12) - -* License: Eclipse Public License - -maven-compat (3.5.2) - -* License: Apache-2.0 -* Project: https://maven.apache.org/ref/3.5.2/maven-compat/ -* Source: - https://mvnrepository.com/artifact/org.apache.maven/maven-compat/3.5.2 - -maven-core (3.5.2) - -* License: Apache-2.0 -* Project: https://maven.apache.org/ref/3.5.2/maven-core/index.html -* Source: https://mvnrepository.com/artifact/org.apache.maven/maven-core/3.5.2 - -maven-plugin-annotations (3.5) - -* License: Apache-2.0 -* Project: https://maven.apache.org/plugin-tools/maven-plugin-annotations/ -* Source: - https://github.com/apache/maven-plugin-tools/tree/master/maven-plugin-annotations - -maven-plugin-api (3.5.2) - -* License: Apache-2.0 - -maven-resolver-api (1.1.1) - -* License: Apache-2.0 - -maven-resolver-api (1.1.1) - -* License: Apache-2.0 - -maven-resolver-connector-basic (1.1.1) - -* License: Apache-2.0 - -maven-resolver-impl (1.1.1) - -* License: Apache-2.0 - -maven-resolver-spi (1.1.1) - -* License: Apache-2.0 - -maven-resolver-transport-file (1.1.1) - -* License: Apache-2.0 -* Project: https://maven.apache.org/resolver/maven-resolver-transport-file/ -* Source: - https://github.com/apache/maven-resolver/tree/master/maven-resolver-transport-file - -maven-resolver-util (1.1.1) - -* License: Apache-2.0 - -maven-settings (3.5.2) - -* License: Apache-2.0 -* Source: - https://mvnrepository.com/artifact/org.apache.maven/maven-settings/3.5.2 - -OSGi Service Platform Core Companion Code (6.0) - -* License: Apache License, 2.0 - -plexus-archiver (3.5) - -* License: Apache-2.0 -* Project: https://codehaus-plexus.github.io/plexus-archiver/ -* Source: https://github.com/codehaus-plexus/plexus-archiver - -plexus-io (3.0.0) - -* License: Apache-2.0 - -plexus-utils (3.1.0) - -* License: Apache- 2.0 or Apache- 1.1 or BSD or Public Domain or Indiana - University Extreme! Lab Software License V1.1.1 (Apache 1.1 style) - -relaxng-datatype (1.0) - -* License: New BSD license - -Sax (0.2) - -* License: SAX-PD -* Project: http://www.megginson.com/downloads/SAX/ -* Source: http://sourceforge.net/project/showfiles.php?group_id=29449 - -testng (6.14.2) - -* License: Apache-2.0 AND (MIT) -* Project: https://testng.org/doc/index.html -* Source: https://github.com/cbeust/testng - -wagon-http-lightweight (3.0.0) - -* License: Pending -* Project: https://maven.apache.org/wagon/ -* Source: - https://mvnrepository.com/artifact/org.apache.maven.wagon/wagon-http-lightweight/3.0.0 - -xz for java (1.8) - -* License: LicenseRef-Public-Domain - -## Cryptography - -Content may contain encryption software. The country in which you are currently -may have restrictions on the import, possession, and use, and/or re-export to -another country, of encryption software. BEFORE using any encryption software, -please check the country's laws, regulations and policies concerning the import, -possession, or use, and re-export of encryption software, to see if this is -permitted. - -======================================================================== - -// ------------------------------------------------------------------ -// NOTICE file corresponding to the section 4d of The Apache License, -// Version 2.0, in this case for Objenesis -// ------------------------------------------------------------------ - -Objenesis -Copyright 2006-2019 Joe Walnes, Henri Tremblay, Leonardo Mesquita - -======================================================================== - -Apache Commons Collections -Copyright 2001-2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -======================================================================== - -kotlin NOTICE - -======================================================================== - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - == in this case for the Kotlin Compiler distribution. == - ========================================================================= - - Kotlin Compiler - Copyright 2010-2023 JetBrains s.r.o and respective authors and developers - - diff --git a/computer-dist/release-docs/licenses/LICENSE-accessors-smart.txt b/computer-dist/release-docs/licenses/LICENSE-accessors-smart.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-accessors-smart.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-activation.txt b/computer-dist/release-docs/licenses/LICENSE-activation.txt deleted file mode 100644 index 55ce20ab1..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-activation.txt +++ /dev/null @@ -1,119 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - -1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. - -1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. - -1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. - -1.4. Executable means the Covered Software in any form other than Source Code. - -1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. - -1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - -1.7. License means this document. - -1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - -1.9. Modifications means the Source Code and Executable form of any of the following: - -A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; - -B. Any new file that contains any part of the Original Software or previous Modification; or - -C. Any new file that is contributed or otherwise made available under the terms of this License. - -1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. - -1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. - -1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. - -1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)�the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)�ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants. - -2.1. The Initial Developer Grant. -Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: -(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). -(c) The licenses granted in Sections�2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. -(d) Notwithstanding Section�2.1(b) above, no patent license is granted: (1)�for code that You delete from the Original Software, or (2)�for infringements caused by: (i)�the modification of the Original Software, or (ii)�the combination of the Original Software with other software or devices. - -2.2. Contributor Grant. -Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: -(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)�Modifications made by that Contributor (or portions thereof); and (2)�the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). -(c) The licenses granted in Sections�2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. -(d) Notwithstanding Section�2.2(b) above, no patent license is granted: (1)�for any code that Contributor has deleted from the Contributor Version; (2)�for infringements caused by: (i)�third party modifications of Contributor Version, or (ii)�the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)�under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. - -Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. - -3.2. Modifications. - -The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. - -3.3. Required Notices. -You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. - -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - -3.5. Distribution of Executable Versions. -You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - -3.6. Larger Works. -You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. -Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. - -4.2. Effect of New Versions. - -You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. -4.3. Modified Versions. - -When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)�rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)�otherwise make it clear that the license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - -6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections�2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. - -6.3. In the event of termination under Sections�6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a commercial item, as that term is defined in 48�C.F.R.�2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48�C.F.R.�12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) -The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. - - - diff --git a/computer-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt deleted file mode 100644 index fab239059..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt +++ /dev/null @@ -1,8 +0,0 @@ -Copyright - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/computer-dist/release-docs/licenses/LICENSE-apiguardian-api.txt b/computer-dist/release-docs/licenses/LICENSE-apiguardian-api.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-apiguardian-api.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-audience-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-audience-annotations.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-audience-annotations.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-auto-service-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-auto-service-annotations.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-auto-service-annotations.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-automaton.txt b/computer-dist/release-docs/licenses/LICENSE-automaton.txt deleted file mode 100644 index 0fc25c4e3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-automaton.txt +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2001-2022 Anders Moeller -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-avro.txt b/computer-dist/release-docs/licenses/LICENSE-avro.txt deleted file mode 100644 index 0333373a6..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-avro.txt +++ /dev/null @@ -1,387 +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. - - -APACHE COMMONS MATH DERIVATIVE WORKS: - -The Apache commons-math library includes a number of subcomponents -whose implementation is derived from original sources written -in C or Fortran. License terms of the original sources -are reproduced below. - -=============================================================================== -For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in -the LevenbergMarquardtOptimizer class in package -org.apache.commons.math3.optimization.general -Original source copyright and license statement: - -Minpack Copyright Notice (1999) University of Chicago. All rights reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. -=============================================================================== - -Copyright and license statement for the odex Fortran routine developed by -E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class -in package org.apache.commons.math3.ode.nonstiff: - - -Copyright (c) 2004, Ernst Hairer - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original lapack fortran routines -translated in EigenDecompositionImpl class in package -org.apache.commons.math3.linear: - -Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original Mersenne twister C -routines translated in MersenneTwister class in package -org.apache.commons.math3.random: - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=============================================================================== - -The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" is -an adapted version of "OrekitMessagesTest" test class for the Orekit library -The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator" -has been imported from the Orekit space flight dynamics library. - -Th Orekit library is described at: - https://www.orekit.org/forge/projects/orekit -The original files are distributed under the terms of the Apache 2 license -which is: Copyright 2010 CS Communication & Systèmes diff --git a/computer-dist/release-docs/licenses/LICENSE-bcprov-jdk18on.txt b/computer-dist/release-docs/licenses/LICENSE-bcprov-jdk18on.txt deleted file mode 100644 index c300d6164..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-bcprov-jdk18on.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -Copyright (c) 2000-2023 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) -

-Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: -

-The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - diff --git a/computer-dist/release-docs/licenses/LICENSE-bolt.txt b/computer-dist/release-docs/licenses/LICENSE-bolt.txt deleted file mode 100644 index b0ff39019..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-bolt.txt +++ /dev/null @@ -1,201 +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 2018 Ant Financial Services Group Co., Ltd. - - 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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-builder-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-builder-annotations.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-builder-annotations.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-byte-buddy.txt b/computer-dist/release-docs/licenses/LICENSE-byte-buddy.txt deleted file mode 100644 index 3dd2c50e8..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-byte-buddy.txt +++ /dev/null @@ -1,180 +0,0 @@ -This product bundles ASM 9.0, which is available under a "3-clause BSD" -license. For details, see licenses/ASM. For more information visit https://asm.ow2.io. - -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 - diff --git a/computer-dist/release-docs/licenses/LICENSE-checker-qual.txt b/computer-dist/release-docs/licenses/LICENSE-checker-qual.txt deleted file mode 100644 index 7b59b5c98..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-checker-qual.txt +++ /dev/null @@ -1,22 +0,0 @@ -Checker Framework qualifiers -Copyright 2004-present by the Checker Framework developers - -MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-beanutils.txt b/computer-dist/release-docs/licenses/LICENSE-commons-beanutils.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-beanutils.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-cli.txt b/computer-dist/release-docs/licenses/LICENSE-commons-cli.txt deleted file mode 100644 index 57bc88a15..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-cli.txt +++ /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. - diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-codec.txt b/computer-dist/release-docs/licenses/LICENSE-commons-codec.txt deleted file mode 100644 index 75b52484e..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-codec.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-collections.txt b/computer-dist/release-docs/licenses/LICENSE-commons-collections.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-collections.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-compress.txt b/computer-dist/release-docs/licenses/LICENSE-commons-compress.txt deleted file mode 100644 index 0333373a6..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-compress.txt +++ /dev/null @@ -1,387 +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. - - -APACHE COMMONS MATH DERIVATIVE WORKS: - -The Apache commons-math library includes a number of subcomponents -whose implementation is derived from original sources written -in C or Fortran. License terms of the original sources -are reproduced below. - -=============================================================================== -For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in -the LevenbergMarquardtOptimizer class in package -org.apache.commons.math3.optimization.general -Original source copyright and license statement: - -Minpack Copyright Notice (1999) University of Chicago. All rights reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. -=============================================================================== - -Copyright and license statement for the odex Fortran routine developed by -E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class -in package org.apache.commons.math3.ode.nonstiff: - - -Copyright (c) 2004, Ernst Hairer - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original lapack fortran routines -translated in EigenDecompositionImpl class in package -org.apache.commons.math3.linear: - -Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original Mersenne twister C -routines translated in MersenneTwister class in package -org.apache.commons.math3.random: - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=============================================================================== - -The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" is -an adapted version of "OrekitMessagesTest" test class for the Orekit library -The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator" -has been imported from the Orekit space flight dynamics library. - -Th Orekit library is described at: - https://www.orekit.org/forge/projects/orekit -The original files are distributed under the terms of the Apache 2 license -which is: Copyright 2010 CS Communication & Systèmes diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-configuration.txt b/computer-dist/release-docs/licenses/LICENSE-commons-configuration.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-configuration.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-configuration2.txt b/computer-dist/release-docs/licenses/LICENSE-commons-configuration2.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-configuration2.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-crypto.txt b/computer-dist/release-docs/licenses/LICENSE-commons-crypto.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-crypto.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-io.txt b/computer-dist/release-docs/licenses/LICENSE-commons-io.txt deleted file mode 100644 index 43e91eb0b..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-io.txt +++ /dev/null @@ -1,203 +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. - diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-lang.txt b/computer-dist/release-docs/licenses/LICENSE-commons-lang.txt deleted file mode 100644 index 75b52484e..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-lang.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-lang3.txt b/computer-dist/release-docs/licenses/LICENSE-commons-lang3.txt deleted file mode 100644 index 0333373a6..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-lang3.txt +++ /dev/null @@ -1,387 +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. - - -APACHE COMMONS MATH DERIVATIVE WORKS: - -The Apache commons-math library includes a number of subcomponents -whose implementation is derived from original sources written -in C or Fortran. License terms of the original sources -are reproduced below. - -=============================================================================== -For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in -the LevenbergMarquardtOptimizer class in package -org.apache.commons.math3.optimization.general -Original source copyright and license statement: - -Minpack Copyright Notice (1999) University of Chicago. All rights reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. -=============================================================================== - -Copyright and license statement for the odex Fortran routine developed by -E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class -in package org.apache.commons.math3.ode.nonstiff: - - -Copyright (c) 2004, Ernst Hairer - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original lapack fortran routines -translated in EigenDecompositionImpl class in package -org.apache.commons.math3.linear: - -Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original Mersenne twister C -routines translated in MersenneTwister class in package -org.apache.commons.math3.random: - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=============================================================================== - -The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" is -an adapted version of "OrekitMessagesTest" test class for the Orekit library -The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator" -has been imported from the Orekit space flight dynamics library. - -Th Orekit library is described at: - https://www.orekit.org/forge/projects/orekit -The original files are distributed under the terms of the Apache 2 license -which is: Copyright 2010 CS Communication & Systèmes diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-logging.txt b/computer-dist/release-docs/licenses/LICENSE-commons-logging.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-logging.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-math3.txt b/computer-dist/release-docs/licenses/LICENSE-commons-math3.txt deleted file mode 100644 index 0333373a6..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-math3.txt +++ /dev/null @@ -1,387 +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. - - -APACHE COMMONS MATH DERIVATIVE WORKS: - -The Apache commons-math library includes a number of subcomponents -whose implementation is derived from original sources written -in C or Fortran. License terms of the original sources -are reproduced below. - -=============================================================================== -For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in -the LevenbergMarquardtOptimizer class in package -org.apache.commons.math3.optimization.general -Original source copyright and license statement: - -Minpack Copyright Notice (1999) University of Chicago. All rights reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. -=============================================================================== - -Copyright and license statement for the odex Fortran routine developed by -E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class -in package org.apache.commons.math3.ode.nonstiff: - - -Copyright (c) 2004, Ernst Hairer - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original lapack fortran routines -translated in EigenDecompositionImpl class in package -org.apache.commons.math3.linear: - -Copyright (c) 1992-2008 The University of Tennessee. All rights reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== - -Copyright and license statement for the original Mersenne twister C -routines translated in MersenneTwister class in package -org.apache.commons.math3.random: - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=============================================================================== - -The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" is -an adapted version of "OrekitMessagesTest" test class for the Orekit library -The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator" -has been imported from the Orekit space flight dynamics library. - -Th Orekit library is described at: - https://www.orekit.org/forge/projects/orekit -The original files are distributed under the terms of the Apache 2 license -which is: Copyright 2010 CS Communication & Systèmes diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-text.txt b/computer-dist/release-docs/licenses/LICENSE-commons-text.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-commons-text.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-curator-client.txt b/computer-dist/release-docs/licenses/LICENSE-curator-client.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-curator-client.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-curator-recipes.txt b/computer-dist/release-docs/licenses/LICENSE-curator-recipes.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-curator-recipes.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-disruptor.txt b/computer-dist/release-docs/licenses/LICENSE-disruptor.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-disruptor.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt b/computer-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-failsafe.txt b/computer-dist/release-docs/licenses/LICENSE-failsafe.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-failsafe.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-generex.txt b/computer-dist/release-docs/licenses/LICENSE-generex.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-generex.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-groovy-all.txt b/computer-dist/release-docs/licenses/LICENSE-groovy-all.txt deleted file mode 100644 index 4d50ed94d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-groovy-all.txt +++ /dev/null @@ -1,250 +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. - ------------------------------------------------------------------------- - -ANTLR 2 License - -Antlr2 is released in the public domain. -See licenses/antlr2-license.txt for details. - ------------------------------------------------------------------------- - -ASM 4 License - -ASM 4 uses a 3-clause BSD license. For details, see licenses/asm-license.txt. - ------------------------------------------------------------------------- - -JLine2 Patch License - -The following class within this product: - - org.codehaus.groovy.tools.shell.completion.FileNameCompleter - -was derived from JLine 2.12, and the following patch: -https://github.com/jline/jline2/issues/90 -JLine2 is made available under a BSD License. -For details, see licenses/jline2-license. - ------------------------------------------------------------------------- - -JSR223 License - -The following classes within this product: - - org.codehaus.groovy.jsr223.GroovyCompiledScript - org.codehaus.groovy.jsr223.GroovyScriptEngineFactory - org.codehaus.groovy.jsr223.GroovyScriptEngineImpl - -were derived from reference implementation files developed by Sun in -collaboration with the Groovy community. The reference implementation -has a BSD-style license. Details can be found in: licenses/jsr223-license.txt - ------------------------------------------------------------------------- - -normalize.css License - -The stylesheet.css file (originally normalize.css) is used by the -groovydoc and docgenerator components for groovy-jdk/gapi documentation. -It is made available under a MIT License. Details: licenses/normalize-stylesheet-license.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-api.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-api.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-api.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-context.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-context.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-context.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-grpclb.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-grpclb.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-grpclb.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-netty.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-netty.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-netty.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-stub.txt b/computer-dist/release-docs/licenses/LICENSE-grpc-stub.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-grpc-stub.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-gson.txt b/computer-dist/release-docs/licenses/LICENSE-gson.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-gson.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-guava.txt b/computer-dist/release-docs/licenses/LICENSE-guava.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-guava.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hadoop-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-hadoop-annotations.txt deleted file mode 100644 index d99b2ed73..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hadoop-annotations.txt +++ /dev/null @@ -1,1834 +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. - - -APACHE HADOOP SUBCOMPONENTS: - -The Apache Hadoop project contains subcomponents with separate copyright -notices and license terms. Your use of the source code for the these -subcomponents is subject to the terms and conditions of the following -licenses. - -For the org.apache.hadoop.util.bloom.* classes: - -/** - * - * Copyright (c) 2005, European Commission project OneLab under contract - * 034819 (http://www.one-lab.org) - * All rights reserved. - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * - Neither the name of the University Catholique de Louvain - UCL - * nor the names of its contributors may be used to endorse or - * promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -For portions of the native implementation of slicing-by-8 CRC calculation -in src/main/native/src/org/apache/hadoop/util: - -Copyright (c) 2008,2009,2010 Massachusetts Institute of Technology. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of the Massachusetts Institute of Technology nor - the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Other portions are under the same license from Intel: -http://sourceforge.net/projects/slicing-by-8/ -/*++ - * - * Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved - * - * This software program is licensed subject to the BSD License, - * available at http://www.opensource.org/licenses/bsd-license.html - * - * Abstract: The main routine - * - --*/ - -For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,lz4hc.c}, - -/* - LZ4 - Fast LZ compression algorithm - Header File - Copyright (C) 2011-2014, Yann Collet. - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - LZ4 source repository : http://code.google.com/p/lz4/ - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c -*/ - - -For hadoop-common-project/hadoop-common/src/main/native/gtest ---------------------------------------------------------------------- -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -re2j 1.1 ---------------------------------------------------------------------- -(GO license) -This is a work derived from Russ Cox's RE2 in Go, whose license -http://golang.org/LICENSE is as follows: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/util/tree.h ---------------------------------------------------------------------- -Copyright 2002 Niels Provos -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of leveldbjni -(https://github.com/fusesource/leveldbjni), which is available under the -following license: - -Copyright (c) 2011 FuseSource Corp. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of FuseSource Corp. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/compat/{fstatat|openat|unlinkat}.h: - -Copyright (c) 2012 The FreeBSD Foundation -All rights reserved. - -This software was developed by Pawel Jakub Dawidek under sponsorship from -the FreeBSD Foundation. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -============= - -The binary distribution of this product bundles binaries of leveldb -(http://code.google.com/p/leveldb/), which is available under the following -license: - -Copyright (c) 2011 The LevelDB Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of snappy -(http://code.google.com/p/snappy/), which is available under the following -license: - -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.css -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery.dataTables.min.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/dt-1.10.7/ --------------------------------------------------------------------------------- -Copyright (C) 2008-2016, SpryMedia Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-full-2.0.0.min.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-helpers-1.1.1.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2010 Aleksander Williams - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/moment.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -The binary distribution of this product bundles these dependencies under the -following license: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.3.7 -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/bootstrap.min.js -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap.min.css -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap-responsive.min.css -bootstrap v3.3.6 -broccoli-asset-rev v2.4.2 -broccoli-funnel v1.0.1 -datatables v1.10.8 -em-helpers v0.5.13 -em-table v0.1.6 -ember v2.2.0 -ember-array-contains-helper v1.0.2 -ember-bootstrap v0.5.1 -ember-cli v1.13.13 -ember-cli-app-version v1.0.0 -ember-cli-babel v5.1.6 -ember-cli-content-security-policy v0.4.0 -ember-cli-dependency-checker v1.2.0 -ember-cli-htmlbars v1.0.2 -ember-cli-htmlbars-inline-precompile v0.3.1 -ember-cli-ic-ajax v0.2.1 -ember-cli-inject-live-reload v1.4.0 -ember-cli-jquery-ui v0.0.20 -ember-cli-qunit v1.2.1 -ember-cli-release v0.2.8 -ember-cli-shims v0.0.6 -ember-cli-sri v1.2.1 -ember-cli-test-loader v0.2.1 -ember-cli-uglify v1.2.0 -ember-d3 v0.1.0 -ember-data v2.1.0 -ember-disable-proxy-controllers v1.0.1 -ember-export-application-global v1.0.5 -ember-load-initializers v0.1.7 -ember-qunit v0.4.16 -ember-qunit-notifications v0.1.0 -ember-resolver v2.0.3 -ember-spin-spinner v0.2.3 -ember-truth-helpers v1.2.0 -jquery v2.1.4 -jquery-ui v1.11.4 -loader.js v3.3.0 -momentjs v2.10.6 -qunit v1.19.0 -select2 v4.0.0 -snippet-ss v1.11.0 -spin.js v2.3.2 -Azure Data Lake Store - Java client SDK 2.0.11 -JCodings 1.0.8 -Joni 2.1.2 -Mockito 1.8.5 -JUL to SLF4J bridge 1.7.25 -SLF4J API Module 1.7.25 -SLF4J LOG4J-12 Binding 1.7.25 --------------------------------------------------------------------------------- - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery-3.3.1.min.js -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/jquery.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jquery -Apache HBase - Server which contains JQuery minified javascript library version 1.8.3 -Microsoft JDBC Driver for SQLServer - version 6.2.1.jre7 --------------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2003-2017 Optimatika - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For: -oj! Algorithms - version 43.0 --------------------------------------------------------------------------------- - -Copyright 2005, 2012, 2013 jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/jquery - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. - -For: -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jt/jquery.jstree.js --------------------------------------------------------------------------------- - -Copyright (c) 2014 Ivan Bozhanov - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js --------------------------------------------------------------------------------- - -D3 is available under a 3-clause BSD license. For details, see: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE - -The binary distribution of this product bundles these dependencies under the -following license: -HSQLDB Database 2.3.4 --------------------------------------------------------------------------------- -(HSQL License) -"COPYRIGHTS AND LICENSES (based on BSD License) - -For work developed by the HSQL Development Group: - -Copyright (c) 2001-2016, The HSQL Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the HSQL Development Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -For work originally developed by the Hypersonic SQL Group: - -Copyright (c) 1995-2000 by the Hypersonic SQL Group. -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the Hypersonic SQL Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals on behalf of the -Hypersonic SQL Group." - -The binary distribution of this product bundles these dependencies under the -following license: -Java Servlet API 3.1.0 -servlet-api 2.5 -jsp-api 2.1 -jsr311-api 1.1.1 -Glassfish Jasper 6.1.14 -Servlet Specification 2.5 API 6.1.14 --------------------------------------------------------------------------------- -(CDDL 1.0) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -1. Definitions.  - -1.1. Contributor means each individual or entity -that creates or contributes to the creation of -Modifications.  - -1.2. Contributor Version means the combination of the -Original Software, prior Modifications used by a Contributor (if any), and the -Modifications made by that particular Contributor.  - -1.3. Covered -Software means (a) the Original Software, or (b) Modifications, or (c) the -combination of files containing Original Software with files containing -Modifications, in each case including portions -thereof.  - -1.4. Executable means the Covered Software in any form other -than Source Code.  - -1.5. Initial Developer means the individual or entity -that first makes Original Software available under this -License.  - -1.6. Larger Work means a work which combines Covered Software or -portions thereof with code not governed by the terms of this -License.  - -1.7. License means this document.  - -1.8. Licensable means -having the right to grant, to the maximum extent possible, whether at the time -of the initial grant or subsequently acquired, any and all of the rights -conveyed herein.  - -1.9. Modifications means the Source Code and Executable -form of any of the following: -A. Any file that results from an addition to, -deletion from or modification of the contents of a file containing Original -Software or previous Modifications; -B. Any new file that contains any part of the Original Software -or previous Modification; or -C. Any new file that is contributed or otherwise made available -under the terms of this License.  - -1.10. Original Software means the Source Code and Executable form of -computer software code that is originally released under this License.  - -1.11. Patent Claims means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and apparatus -claims, in any patent Licensable by grantor.  - -1.12. Source Code means (a) the common form of computer software code in which -modifications are made and (b) associated documentation included in or -with such code.  - -1.13. You (or Your) means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -You includes any entity which controls, is controlled by, or is under common control -with You. For purposes of this definition, control means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (b) ownership of more than fifty percent (50%) of the -outstanding shares or beneficial ownership of such entity.  - -2. License Grants. - -2.1. The Initial Developer Grant. Conditioned upon Your compliance -with Section 3.1 below and subject to third party intellectual property claims, -the Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license:  - -(a) under intellectual property rights (other than -patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, -display, perform, sublicense and distribute the Original Software (or portions -thereof), with or without Modifications, and/or as part of a Larger Work; -and  - -(b) under Patent Claims infringed by the making, using or selling of -Original Software, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Software (or portions -thereof); - -(c) The licenses granted in Sections 2.1(a) and (b) are -effective on the date Initial Developer first distributes or otherwise makes the -Original Software available to a third party under the terms of this -License; - -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or -(ii) the combination of the Original Software with other software or -devices.  - -2.2. Contributor Grant. Conditioned upon Your compliance with -Section 3.1 below and subject to third party intellectual property claims, each -Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license:  - -(a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such Contributor -(or portions thereof), either on an unmodified basis, with other Modifications, -as Covered Software and/or as part of a Larger Work; and  - -(b) under Patent -Claims infringed by the making, using, or selling of Modifications made by that -Contributor either alone and/or in combination with its Contributor Version (or -portions of such combination), to make, use, sell, offer for sale, have made, -and/or otherwise dispose of: (1) Modifications made by that Contributor (or -portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such -combination).  - -(c) The licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first distributes or otherwise makes the -Modifications available to a third party. - -(d) Notwithstanding Section 2.2(b) -above, no patent license is granted: (1) for any code that Contributor has -deleted from the Contributor Version; (2) for infringements caused by: -(i) third party modifications of Contributor Version, or (ii) the combination -of Modifications made by that Contributor with other software (except as part of -the Contributor Version) or other devices; or (3) under Patent Claims infringed -by Covered Software in the absence of Modifications made by that -Contributor.  - -3. Distribution Obligations.  - -3.1. Availability of Source -Code. Any Covered Software that You distribute or otherwise make available in -Executable form must also be made available in Source Code form and that Source -Code form must be distributed only under the terms of this License. You must -include a copy of this License with every copy of the Source Code form of the -Covered Software You distribute or otherwise make available. You must inform -recipients of any such Covered Software in Executable form as to how they can -obtain such Covered Software in Source Code form in a reasonable manner on or -through a medium customarily used for software exchange.  - -3.2. -Modifications. The Modifications that You create or to which You contribute are -governed by the terms of this License. You represent that You believe Your -Modifications are Your original creation(s) and/or You have sufficient rights to -grant the rights conveyed by this License.  - -3.3. Required Notices. You must -include a notice in each of Your Modifications that identifies You as the -Contributor of the Modification. You may not remove or alter any copyright, -patent or trademark notices contained within the Covered Software, or any -notices of licensing or any descriptive text giving attribution to any -Contributor or the Initial Developer.  - -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source Code -form that alters or restricts the applicable version of this License or the -recipients rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. - -3.5. Distribution of Executable Versions. You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipients rights in the Source Code form from the rights set forth in this -License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer.  - -3.6. Larger Works. You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software.  - -4. Versions of the License.  - -4.1. -New Versions. Sun Microsystems, Inc. is the initial license steward and may -publish revised and/or new versions of this License from time to time. Each -version will be given a distinguishing version number. Except as provided in -Section 4.3, no one other than the license steward has the right to modify this -License.  - -4.2. Effect of New Versions. You may always continue to use, -distribute or otherwise make the Covered Software available under the terms of -the version of the License under which You originally received the Covered -Software. If the Initial Developer includes a notice in the Original Software -prohibiting it from being distributed or otherwise made available under any -subsequent version of the License, You must distribute and make the Covered -Software available under the terms of the version of the License under which You -originally received the Covered Software. Otherwise, You may also choose to use, -distribute or otherwise make the Covered Software available under the terms of -any subsequent version of the License published by the license -steward.  - -4.3. Modified Versions. When You are an Initial Developer and You -want to create a new license for Your Original Software, You may create and use -a modified version of this License if You: (a) rename the license and remove -any references to the name of the license steward (except to note that the -license differs from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License.  - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, -MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY -COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER -OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER -THIS DISCLAIMER.  - -6. TERMINATION.  - -6.1. This License and the rights -granted hereunder will terminate automatically if You fail to comply with terms -herein and fail to cure such breach within 30 days of becoming aware of the -breach. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive.  - -6.2. If You assert a patent -infringement claim (excluding declaratory judgment actions) against Initial -Developer or a Contributor (the Initial Developer or Contributor against whom -You assert such claim is referred to as Participant) alleging that the -Participant Software (meaning the Contributor Version where the Participant is a -Contributor or the Original Software where the Participant is the Initial -Developer) directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial Developer -(if the Initial Developer is not the Participant) and all Contributors under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from -Participant terminate prospectively and automatically at the expiration of such -60 day notice period, unless if within such 60 day period You withdraw Your -claim with respect to the Participant Software against such Participant either -unilaterally or pursuant to a written agreement with Participant.  - -6.3. In -the event of termination under Sections 6.1 or 6.2 above, all end user licenses -that have been validly granted by You or any distributor hereunder prior to -termination (excluding licenses granted to You by any distributor) shall survive -termination.  - -7. LIMITATION OF LIABILITY. -UNDER NO CIRCUMSTANCES AND UNDER -NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, -SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF -COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY -PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY -CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE -POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO -LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO -THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT -ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO -THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.  - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a commercial item, as that term is defined in -48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as -that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer -software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. -1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software -with only those rights set forth herein. This U.S. Government Rights clause is -in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision -that addresses Government rights in computer software under this -License.  - -9. MISCELLANEOUS. -This License represents the complete agreement -concerning subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdictions conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software.  - -10. RESPONSIBILITY FOR CLAIMS. -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability.  - -The binary distribution of this product bundles these dependencies under the -following license: -jersey-client 1.19 -jersey-core 1.19 -jersey-grizzly2 1.19 -jersey-grizzly2-servlet 1.19 -jersey-json 1.19 -jersey-server 1.19 -jersey-servlet 1.19 -jersey-guice 1.19 -Jersey Test Framework - Grizzly 2 Module 1.19 -JAXB RI 2.2.3 -Java Architecture for XML Binding 2.2.11 -grizzly-framework 2.2.21 -grizzly-http 2.2.21 -grizzly-http-server 2.2.21 -grizzly-http-servlet 2.2.21 -grizzly-rcm 2.2.21 --------------------------------------------------------------------------------- -(CDDL 1.1) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 - -1. Definitions. - -1.1. “Contributor” means each individual or entity that creates or -contributes to the creation of Modifications. -1.2. “Contributor Version” means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications made -by that particular Contributor. -1.3. “Covered Software” means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original Software with -files containing Modifications, in each case including portions thereof. -1.4. “Executable” means the Covered Software in any form other than Source -Code. -1.5. “Initial Developer” means the individual or entity that first makes -Original Software available under this License. -1.6. “Larger Work” means a work which combines Covered Software or portions -thereof with code not governed by the terms of this License. -1.7. “License” means this document. -1.8. “Licensable” means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, any -and all of the rights conveyed herein. -1.9. “Modifications” means the Source Code and Executable form of any of the -following: -A. Any file that results from an addition to, deletion from or modification of -the contents of a file containing Original Software or previous Modifications; -B. Any new file that contains any part of the Original Software or previous -Modification; or -C. Any new file that is contributed or otherwise made available under the terms -of this License. -1.10. “Original Software” means the Source Code and Executable form of -computer software code that is originally released under this License. -1.11. “Patent Claims” means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. -1.12. “Source Code” means (a) the common form of computer software code in -which modifications are made and (b) associated documentation included in or -with such code. -1.13. “You” (or “Your”) means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License. For legal -entities, “You” includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, “control” -means (a) the power, direct or indirect, to cause the direction or management of -such entity, whether by contract or otherwise, or (b) ownership of more than -fifty percent (50%) of the outstanding shares or beneficial ownership of such -entity. - -2. License Grants. - -2.1. The Initial Developer Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, the Initial Developer hereby grants -You a world-wide, royalty-free, non-exclusive license: -(a) under intellectual -property rights (other than patent or trademark) Licensable by Initial -Developer, to use, reproduce, modify, display, perform, sublicense and -distribute the Original Software (or portions thereof), with or without -Modifications, and/or as part of a Larger Work; and -(b) under Patent Claims -infringed by the making, using or selling of Original Software, to make, have -made, use, practice, sell, and offer for sale, and/or otherwise dispose of the -Original Software (or portions thereof). -(c) The licenses granted in Sections -2.1(a) and (b) are effective on the date Initial Developer first distributes or -otherwise makes the Original Software available to a third party under the terms -of this License. -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or (ii) -the combination of the Original Software with other software or devices. - -2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and -subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license: -(a) under -intellectual property rights (other than patent or trademark) Licensable by -Contributor to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof), -either on an unmodified basis, with other Modifications, as Covered Software -and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the -making, using, or selling of Modifications made by that Contributor either alone -and/or in combination with its Contributor Version (or portions of such -combination), to make, use, sell, offer for sale, have made, and/or otherwise -dispose of: (1) Modifications made by that Contributor (or portions thereof); -and (2) the combination of Modifications made by that Contributor with its -Contributor Version (or portions of such combination). -(c) The licenses granted -in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first -distributes or otherwise makes the Modifications available to a third -party. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: -(1) for any code that Contributor has deleted from the Contributor Version; (2) -for infringements caused by: (i) third party modifications of Contributor -Version, or (ii) the combination of Modifications made by that Contributor with -other software (except as part of the Contributor Version) or other devices; or -(3) under Patent Claims infringed by Covered Software in the absence of -Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. -Any Covered Software that You distribute or -otherwise make available in Executable form must also be made available in -Source Code form and that Source Code form must be distributed only under the -terms of this License. You must include a copy of this License with every copy -of the Source Code form of the Covered Software You distribute or otherwise make -available. You must inform recipients of any such Covered Software in Executable -form as to how they can obtain such Covered Software in Source Code form in a -reasonable manner on or through a medium customarily used for software -exchange. -3.2. Modifications. -The Modifications that You create or to which -You contribute are governed by the terms of this License. You represent that You -believe Your Modifications are Your original creation(s) and/or You have -sufficient rights to grant the rights conveyed by this License. -3.3. Required Notices. -You must include a notice in each of Your Modifications that -identifies You as the Contributor of the Modification. You may not remove or -alter any copyright, patent or trademark notices contained within the Covered -Software, or any notices of licensing or any descriptive text giving attribution -to any Contributor or the Initial Developer. -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source -Code form that alters or restricts the applicable version of this License or the -recipients' rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. -3.5. Distribution of Executable Versions. -You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipient's rights in the Source Code form from the rights set forth in -this License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. -3.6. Larger Works. -You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. -Oracle is the initial license steward and may publish revised and/or -new versions of this License from time to time. Each version will be given a -distinguishing version number. Except as provided in Section 4.3, no one other -than the license steward has the right to modify this License. -4.2. Effect of New Versions. -You may always continue to use, distribute or otherwise make the -Covered Software available under the terms of the version of the License under -which You originally received the Covered Software. If the Initial Developer -includes a notice in the Original Software prohibiting it from being distributed -or otherwise made available under any subsequent version of the License, You -must distribute and make the Covered Software available under the terms of the -version of the License under which You originally received the Covered Software. -Otherwise, You may also choose to use, distribute or otherwise make the Covered -Software available under the terms of any subsequent version of the License -published by the license steward. -4.3. Modified Versions. -When You are an -Initial Developer and You want to create a new license for Your Original -Software, You may create and use a modified version of this License if You: (a) -rename the license and remove any references to the name of the license steward -(except to note that the license differs from this License); and (b) otherwise -make it clear that the license contains terms which differ from this -License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS -LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE -IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR -NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY -RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE -COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will -terminate automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions which, by -their nature, must remain in effect beyond the termination of this License shall -survive. -6.2. If You assert a patent infringement claim (excluding declaratory -judgment actions) against Initial Developer or a Contributor (the Initial -Developer or Contributor against whom You assert such claim is referred to as -“Participant”) alleging that the Participant Software (meaning the -Contributor Version where the Participant is a Contributor or the Original -Software where the Participant is the Initial Developer) directly or indirectly -infringes any patent, then any and all rights granted directly or indirectly to -You by such Participant, the Initial Developer (if the Initial Developer is not -the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this -License shall, upon 60 days notice from Participant terminate prospectively and -automatically at the expiration of such 60 day notice period, unless if within -such 60 day period You withdraw Your claim with respect to the Participant -Software against such Participant either unilaterally or pursuant to a written -agreement with Participant. -6.3. If You assert a patent infringement claim -against Participant alleging that the Participant Software directly or -indirectly infringes any patent where such claim is resolved (such as by license -or settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under Sections -2.1 or 2.2 shall be taken into account in determining the amount or value of any -payment or license. -6.4. In the event of termination under Sections 6.1 or 6.2 -above, all end user licenses that have been validly granted by You or any -distributor hereunder prior to termination (excluding licenses granted to You by -any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN -IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS -LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND -LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered -Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 -(Oct. 1995), consisting of “commercial computer software” (as that term is -defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software -documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). -Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 -(June 1995), all U.S. Government End Users acquire Covered Software with only -those rights set forth herein. This U.S. Government Rights clause is in lieu of, -and supersedes, any other FAR, DFAR, or other clause or provision that addresses -Government rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning -subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdiction's conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys' fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability. - -The binary distribution of this product bundles these dependencies under the -following license: -Protocol Buffer Java API 2.5.0 --------------------------------------------------------------------------------- -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - -For: -XML Commons External Components XML APIs 1.3.04 --------------------------------------------------------------------------------- -By obtaining, using and/or copying this work, you (the licensee) agree that you -have read, understood, and will comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: -- The full text of this NOTICE in a location viewable to users of the -redistributed or derivative work. -- Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, the W3C Software Short Notice should be included -(hypertext is preferred, text is permitted) within the body of any redistributed -or derivative code. -- Notice of any changes or modifications to the files, including the date changes -were made. (We recommend you provide URIs to the location from which the code is -derived.) - -The binary distribution of this product bundles these dependencies under the -following license: -JUnit 4.11 -Eclipse JDT Core 3.1.1 --------------------------------------------------------------------------------- -(EPL v1.0) -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to -its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by -that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. - -The binary distribution of this product bundles these dependencies under the -following license: -JSch 0.1.54 -ParaNamer Core 2.3 -JLine 0.9.94 -leveldbjni-all 1.8 -Hamcrest Core 1.3 -ASM Core 5.0.4 -ASM Commons 5.0.2 -ASM Tree 5.0.2 --------------------------------------------------------------------------------- -(3-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -FindBugs-jsr305 3.0.0 -dnsjava 2.1.7, Copyright (c) 1998-2011, Brian Wellington. All rights reserved. --------------------------------------------------------------------------------- -(2-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. - -The binary distribution of this product bundles these dependencies under the -following license: -"Java Concurrency in Practice" book annotations 1.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-hadoop-common.txt b/computer-dist/release-docs/licenses/LICENSE-hadoop-common.txt deleted file mode 100644 index d99b2ed73..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hadoop-common.txt +++ /dev/null @@ -1,1834 +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. - - -APACHE HADOOP SUBCOMPONENTS: - -The Apache Hadoop project contains subcomponents with separate copyright -notices and license terms. Your use of the source code for the these -subcomponents is subject to the terms and conditions of the following -licenses. - -For the org.apache.hadoop.util.bloom.* classes: - -/** - * - * Copyright (c) 2005, European Commission project OneLab under contract - * 034819 (http://www.one-lab.org) - * All rights reserved. - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * - Neither the name of the University Catholique de Louvain - UCL - * nor the names of its contributors may be used to endorse or - * promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -For portions of the native implementation of slicing-by-8 CRC calculation -in src/main/native/src/org/apache/hadoop/util: - -Copyright (c) 2008,2009,2010 Massachusetts Institute of Technology. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of the Massachusetts Institute of Technology nor - the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Other portions are under the same license from Intel: -http://sourceforge.net/projects/slicing-by-8/ -/*++ - * - * Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved - * - * This software program is licensed subject to the BSD License, - * available at http://www.opensource.org/licenses/bsd-license.html - * - * Abstract: The main routine - * - --*/ - -For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,lz4hc.c}, - -/* - LZ4 - Fast LZ compression algorithm - Header File - Copyright (C) 2011-2014, Yann Collet. - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - LZ4 source repository : http://code.google.com/p/lz4/ - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c -*/ - - -For hadoop-common-project/hadoop-common/src/main/native/gtest ---------------------------------------------------------------------- -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -re2j 1.1 ---------------------------------------------------------------------- -(GO license) -This is a work derived from Russ Cox's RE2 in Go, whose license -http://golang.org/LICENSE is as follows: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/util/tree.h ---------------------------------------------------------------------- -Copyright 2002 Niels Provos -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of leveldbjni -(https://github.com/fusesource/leveldbjni), which is available under the -following license: - -Copyright (c) 2011 FuseSource Corp. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of FuseSource Corp. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/compat/{fstatat|openat|unlinkat}.h: - -Copyright (c) 2012 The FreeBSD Foundation -All rights reserved. - -This software was developed by Pawel Jakub Dawidek under sponsorship from -the FreeBSD Foundation. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -============= - -The binary distribution of this product bundles binaries of leveldb -(http://code.google.com/p/leveldb/), which is available under the following -license: - -Copyright (c) 2011 The LevelDB Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of snappy -(http://code.google.com/p/snappy/), which is available under the following -license: - -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.css -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery.dataTables.min.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/dt-1.10.7/ --------------------------------------------------------------------------------- -Copyright (C) 2008-2016, SpryMedia Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-full-2.0.0.min.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-helpers-1.1.1.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2010 Aleksander Williams - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/moment.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -The binary distribution of this product bundles these dependencies under the -following license: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.3.7 -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/bootstrap.min.js -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap.min.css -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap-responsive.min.css -bootstrap v3.3.6 -broccoli-asset-rev v2.4.2 -broccoli-funnel v1.0.1 -datatables v1.10.8 -em-helpers v0.5.13 -em-table v0.1.6 -ember v2.2.0 -ember-array-contains-helper v1.0.2 -ember-bootstrap v0.5.1 -ember-cli v1.13.13 -ember-cli-app-version v1.0.0 -ember-cli-babel v5.1.6 -ember-cli-content-security-policy v0.4.0 -ember-cli-dependency-checker v1.2.0 -ember-cli-htmlbars v1.0.2 -ember-cli-htmlbars-inline-precompile v0.3.1 -ember-cli-ic-ajax v0.2.1 -ember-cli-inject-live-reload v1.4.0 -ember-cli-jquery-ui v0.0.20 -ember-cli-qunit v1.2.1 -ember-cli-release v0.2.8 -ember-cli-shims v0.0.6 -ember-cli-sri v1.2.1 -ember-cli-test-loader v0.2.1 -ember-cli-uglify v1.2.0 -ember-d3 v0.1.0 -ember-data v2.1.0 -ember-disable-proxy-controllers v1.0.1 -ember-export-application-global v1.0.5 -ember-load-initializers v0.1.7 -ember-qunit v0.4.16 -ember-qunit-notifications v0.1.0 -ember-resolver v2.0.3 -ember-spin-spinner v0.2.3 -ember-truth-helpers v1.2.0 -jquery v2.1.4 -jquery-ui v1.11.4 -loader.js v3.3.0 -momentjs v2.10.6 -qunit v1.19.0 -select2 v4.0.0 -snippet-ss v1.11.0 -spin.js v2.3.2 -Azure Data Lake Store - Java client SDK 2.0.11 -JCodings 1.0.8 -Joni 2.1.2 -Mockito 1.8.5 -JUL to SLF4J bridge 1.7.25 -SLF4J API Module 1.7.25 -SLF4J LOG4J-12 Binding 1.7.25 --------------------------------------------------------------------------------- - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery-3.3.1.min.js -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/jquery.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jquery -Apache HBase - Server which contains JQuery minified javascript library version 1.8.3 -Microsoft JDBC Driver for SQLServer - version 6.2.1.jre7 --------------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2003-2017 Optimatika - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For: -oj! Algorithms - version 43.0 --------------------------------------------------------------------------------- - -Copyright 2005, 2012, 2013 jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/jquery - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. - -For: -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jt/jquery.jstree.js --------------------------------------------------------------------------------- - -Copyright (c) 2014 Ivan Bozhanov - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js --------------------------------------------------------------------------------- - -D3 is available under a 3-clause BSD license. For details, see: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE - -The binary distribution of this product bundles these dependencies under the -following license: -HSQLDB Database 2.3.4 --------------------------------------------------------------------------------- -(HSQL License) -"COPYRIGHTS AND LICENSES (based on BSD License) - -For work developed by the HSQL Development Group: - -Copyright (c) 2001-2016, The HSQL Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the HSQL Development Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -For work originally developed by the Hypersonic SQL Group: - -Copyright (c) 1995-2000 by the Hypersonic SQL Group. -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the Hypersonic SQL Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals on behalf of the -Hypersonic SQL Group." - -The binary distribution of this product bundles these dependencies under the -following license: -Java Servlet API 3.1.0 -servlet-api 2.5 -jsp-api 2.1 -jsr311-api 1.1.1 -Glassfish Jasper 6.1.14 -Servlet Specification 2.5 API 6.1.14 --------------------------------------------------------------------------------- -(CDDL 1.0) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -1. Definitions.  - -1.1. Contributor means each individual or entity -that creates or contributes to the creation of -Modifications.  - -1.2. Contributor Version means the combination of the -Original Software, prior Modifications used by a Contributor (if any), and the -Modifications made by that particular Contributor.  - -1.3. Covered -Software means (a) the Original Software, or (b) Modifications, or (c) the -combination of files containing Original Software with files containing -Modifications, in each case including portions -thereof.  - -1.4. Executable means the Covered Software in any form other -than Source Code.  - -1.5. Initial Developer means the individual or entity -that first makes Original Software available under this -License.  - -1.6. Larger Work means a work which combines Covered Software or -portions thereof with code not governed by the terms of this -License.  - -1.7. License means this document.  - -1.8. Licensable means -having the right to grant, to the maximum extent possible, whether at the time -of the initial grant or subsequently acquired, any and all of the rights -conveyed herein.  - -1.9. Modifications means the Source Code and Executable -form of any of the following: -A. Any file that results from an addition to, -deletion from or modification of the contents of a file containing Original -Software or previous Modifications; -B. Any new file that contains any part of the Original Software -or previous Modification; or -C. Any new file that is contributed or otherwise made available -under the terms of this License.  - -1.10. Original Software means the Source Code and Executable form of -computer software code that is originally released under this License.  - -1.11. Patent Claims means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and apparatus -claims, in any patent Licensable by grantor.  - -1.12. Source Code means (a) the common form of computer software code in which -modifications are made and (b) associated documentation included in or -with such code.  - -1.13. You (or Your) means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -You includes any entity which controls, is controlled by, or is under common control -with You. For purposes of this definition, control means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (b) ownership of more than fifty percent (50%) of the -outstanding shares or beneficial ownership of such entity.  - -2. License Grants. - -2.1. The Initial Developer Grant. Conditioned upon Your compliance -with Section 3.1 below and subject to third party intellectual property claims, -the Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license:  - -(a) under intellectual property rights (other than -patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, -display, perform, sublicense and distribute the Original Software (or portions -thereof), with or without Modifications, and/or as part of a Larger Work; -and  - -(b) under Patent Claims infringed by the making, using or selling of -Original Software, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Software (or portions -thereof); - -(c) The licenses granted in Sections 2.1(a) and (b) are -effective on the date Initial Developer first distributes or otherwise makes the -Original Software available to a third party under the terms of this -License; - -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or -(ii) the combination of the Original Software with other software or -devices.  - -2.2. Contributor Grant. Conditioned upon Your compliance with -Section 3.1 below and subject to third party intellectual property claims, each -Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license:  - -(a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such Contributor -(or portions thereof), either on an unmodified basis, with other Modifications, -as Covered Software and/or as part of a Larger Work; and  - -(b) under Patent -Claims infringed by the making, using, or selling of Modifications made by that -Contributor either alone and/or in combination with its Contributor Version (or -portions of such combination), to make, use, sell, offer for sale, have made, -and/or otherwise dispose of: (1) Modifications made by that Contributor (or -portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such -combination).  - -(c) The licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first distributes or otherwise makes the -Modifications available to a third party. - -(d) Notwithstanding Section 2.2(b) -above, no patent license is granted: (1) for any code that Contributor has -deleted from the Contributor Version; (2) for infringements caused by: -(i) third party modifications of Contributor Version, or (ii) the combination -of Modifications made by that Contributor with other software (except as part of -the Contributor Version) or other devices; or (3) under Patent Claims infringed -by Covered Software in the absence of Modifications made by that -Contributor.  - -3. Distribution Obligations.  - -3.1. Availability of Source -Code. Any Covered Software that You distribute or otherwise make available in -Executable form must also be made available in Source Code form and that Source -Code form must be distributed only under the terms of this License. You must -include a copy of this License with every copy of the Source Code form of the -Covered Software You distribute or otherwise make available. You must inform -recipients of any such Covered Software in Executable form as to how they can -obtain such Covered Software in Source Code form in a reasonable manner on or -through a medium customarily used for software exchange.  - -3.2. -Modifications. The Modifications that You create or to which You contribute are -governed by the terms of this License. You represent that You believe Your -Modifications are Your original creation(s) and/or You have sufficient rights to -grant the rights conveyed by this License.  - -3.3. Required Notices. You must -include a notice in each of Your Modifications that identifies You as the -Contributor of the Modification. You may not remove or alter any copyright, -patent or trademark notices contained within the Covered Software, or any -notices of licensing or any descriptive text giving attribution to any -Contributor or the Initial Developer.  - -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source Code -form that alters or restricts the applicable version of this License or the -recipients rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. - -3.5. Distribution of Executable Versions. You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipients rights in the Source Code form from the rights set forth in this -License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer.  - -3.6. Larger Works. You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software.  - -4. Versions of the License.  - -4.1. -New Versions. Sun Microsystems, Inc. is the initial license steward and may -publish revised and/or new versions of this License from time to time. Each -version will be given a distinguishing version number. Except as provided in -Section 4.3, no one other than the license steward has the right to modify this -License.  - -4.2. Effect of New Versions. You may always continue to use, -distribute or otherwise make the Covered Software available under the terms of -the version of the License under which You originally received the Covered -Software. If the Initial Developer includes a notice in the Original Software -prohibiting it from being distributed or otherwise made available under any -subsequent version of the License, You must distribute and make the Covered -Software available under the terms of the version of the License under which You -originally received the Covered Software. Otherwise, You may also choose to use, -distribute or otherwise make the Covered Software available under the terms of -any subsequent version of the License published by the license -steward.  - -4.3. Modified Versions. When You are an Initial Developer and You -want to create a new license for Your Original Software, You may create and use -a modified version of this License if You: (a) rename the license and remove -any references to the name of the license steward (except to note that the -license differs from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License.  - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, -MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY -COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER -OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER -THIS DISCLAIMER.  - -6. TERMINATION.  - -6.1. This License and the rights -granted hereunder will terminate automatically if You fail to comply with terms -herein and fail to cure such breach within 30 days of becoming aware of the -breach. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive.  - -6.2. If You assert a patent -infringement claim (excluding declaratory judgment actions) against Initial -Developer or a Contributor (the Initial Developer or Contributor against whom -You assert such claim is referred to as Participant) alleging that the -Participant Software (meaning the Contributor Version where the Participant is a -Contributor or the Original Software where the Participant is the Initial -Developer) directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial Developer -(if the Initial Developer is not the Participant) and all Contributors under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from -Participant terminate prospectively and automatically at the expiration of such -60 day notice period, unless if within such 60 day period You withdraw Your -claim with respect to the Participant Software against such Participant either -unilaterally or pursuant to a written agreement with Participant.  - -6.3. In -the event of termination under Sections 6.1 or 6.2 above, all end user licenses -that have been validly granted by You or any distributor hereunder prior to -termination (excluding licenses granted to You by any distributor) shall survive -termination.  - -7. LIMITATION OF LIABILITY. -UNDER NO CIRCUMSTANCES AND UNDER -NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, -SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF -COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY -PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY -CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE -POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO -LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO -THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT -ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO -THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.  - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a commercial item, as that term is defined in -48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as -that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer -software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. -1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software -with only those rights set forth herein. This U.S. Government Rights clause is -in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision -that addresses Government rights in computer software under this -License.  - -9. MISCELLANEOUS. -This License represents the complete agreement -concerning subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdictions conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software.  - -10. RESPONSIBILITY FOR CLAIMS. -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability.  - -The binary distribution of this product bundles these dependencies under the -following license: -jersey-client 1.19 -jersey-core 1.19 -jersey-grizzly2 1.19 -jersey-grizzly2-servlet 1.19 -jersey-json 1.19 -jersey-server 1.19 -jersey-servlet 1.19 -jersey-guice 1.19 -Jersey Test Framework - Grizzly 2 Module 1.19 -JAXB RI 2.2.3 -Java Architecture for XML Binding 2.2.11 -grizzly-framework 2.2.21 -grizzly-http 2.2.21 -grizzly-http-server 2.2.21 -grizzly-http-servlet 2.2.21 -grizzly-rcm 2.2.21 --------------------------------------------------------------------------------- -(CDDL 1.1) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 - -1. Definitions. - -1.1. “Contributor” means each individual or entity that creates or -contributes to the creation of Modifications. -1.2. “Contributor Version” means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications made -by that particular Contributor. -1.3. “Covered Software” means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original Software with -files containing Modifications, in each case including portions thereof. -1.4. “Executable” means the Covered Software in any form other than Source -Code. -1.5. “Initial Developer” means the individual or entity that first makes -Original Software available under this License. -1.6. “Larger Work” means a work which combines Covered Software or portions -thereof with code not governed by the terms of this License. -1.7. “License” means this document. -1.8. “Licensable” means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, any -and all of the rights conveyed herein. -1.9. “Modifications” means the Source Code and Executable form of any of the -following: -A. Any file that results from an addition to, deletion from or modification of -the contents of a file containing Original Software or previous Modifications; -B. Any new file that contains any part of the Original Software or previous -Modification; or -C. Any new file that is contributed or otherwise made available under the terms -of this License. -1.10. “Original Software” means the Source Code and Executable form of -computer software code that is originally released under this License. -1.11. “Patent Claims” means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. -1.12. “Source Code” means (a) the common form of computer software code in -which modifications are made and (b) associated documentation included in or -with such code. -1.13. “You” (or “Your”) means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License. For legal -entities, “You” includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, “control” -means (a) the power, direct or indirect, to cause the direction or management of -such entity, whether by contract or otherwise, or (b) ownership of more than -fifty percent (50%) of the outstanding shares or beneficial ownership of such -entity. - -2. License Grants. - -2.1. The Initial Developer Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, the Initial Developer hereby grants -You a world-wide, royalty-free, non-exclusive license: -(a) under intellectual -property rights (other than patent or trademark) Licensable by Initial -Developer, to use, reproduce, modify, display, perform, sublicense and -distribute the Original Software (or portions thereof), with or without -Modifications, and/or as part of a Larger Work; and -(b) under Patent Claims -infringed by the making, using or selling of Original Software, to make, have -made, use, practice, sell, and offer for sale, and/or otherwise dispose of the -Original Software (or portions thereof). -(c) The licenses granted in Sections -2.1(a) and (b) are effective on the date Initial Developer first distributes or -otherwise makes the Original Software available to a third party under the terms -of this License. -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or (ii) -the combination of the Original Software with other software or devices. - -2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and -subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license: -(a) under -intellectual property rights (other than patent or trademark) Licensable by -Contributor to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof), -either on an unmodified basis, with other Modifications, as Covered Software -and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the -making, using, or selling of Modifications made by that Contributor either alone -and/or in combination with its Contributor Version (or portions of such -combination), to make, use, sell, offer for sale, have made, and/or otherwise -dispose of: (1) Modifications made by that Contributor (or portions thereof); -and (2) the combination of Modifications made by that Contributor with its -Contributor Version (or portions of such combination). -(c) The licenses granted -in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first -distributes or otherwise makes the Modifications available to a third -party. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: -(1) for any code that Contributor has deleted from the Contributor Version; (2) -for infringements caused by: (i) third party modifications of Contributor -Version, or (ii) the combination of Modifications made by that Contributor with -other software (except as part of the Contributor Version) or other devices; or -(3) under Patent Claims infringed by Covered Software in the absence of -Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. -Any Covered Software that You distribute or -otherwise make available in Executable form must also be made available in -Source Code form and that Source Code form must be distributed only under the -terms of this License. You must include a copy of this License with every copy -of the Source Code form of the Covered Software You distribute or otherwise make -available. You must inform recipients of any such Covered Software in Executable -form as to how they can obtain such Covered Software in Source Code form in a -reasonable manner on or through a medium customarily used for software -exchange. -3.2. Modifications. -The Modifications that You create or to which -You contribute are governed by the terms of this License. You represent that You -believe Your Modifications are Your original creation(s) and/or You have -sufficient rights to grant the rights conveyed by this License. -3.3. Required Notices. -You must include a notice in each of Your Modifications that -identifies You as the Contributor of the Modification. You may not remove or -alter any copyright, patent or trademark notices contained within the Covered -Software, or any notices of licensing or any descriptive text giving attribution -to any Contributor or the Initial Developer. -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source -Code form that alters or restricts the applicable version of this License or the -recipients' rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. -3.5. Distribution of Executable Versions. -You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipient's rights in the Source Code form from the rights set forth in -this License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. -3.6. Larger Works. -You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. -Oracle is the initial license steward and may publish revised and/or -new versions of this License from time to time. Each version will be given a -distinguishing version number. Except as provided in Section 4.3, no one other -than the license steward has the right to modify this License. -4.2. Effect of New Versions. -You may always continue to use, distribute or otherwise make the -Covered Software available under the terms of the version of the License under -which You originally received the Covered Software. If the Initial Developer -includes a notice in the Original Software prohibiting it from being distributed -or otherwise made available under any subsequent version of the License, You -must distribute and make the Covered Software available under the terms of the -version of the License under which You originally received the Covered Software. -Otherwise, You may also choose to use, distribute or otherwise make the Covered -Software available under the terms of any subsequent version of the License -published by the license steward. -4.3. Modified Versions. -When You are an -Initial Developer and You want to create a new license for Your Original -Software, You may create and use a modified version of this License if You: (a) -rename the license and remove any references to the name of the license steward -(except to note that the license differs from this License); and (b) otherwise -make it clear that the license contains terms which differ from this -License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS -LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE -IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR -NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY -RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE -COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will -terminate automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions which, by -their nature, must remain in effect beyond the termination of this License shall -survive. -6.2. If You assert a patent infringement claim (excluding declaratory -judgment actions) against Initial Developer or a Contributor (the Initial -Developer or Contributor against whom You assert such claim is referred to as -“Participant”) alleging that the Participant Software (meaning the -Contributor Version where the Participant is a Contributor or the Original -Software where the Participant is the Initial Developer) directly or indirectly -infringes any patent, then any and all rights granted directly or indirectly to -You by such Participant, the Initial Developer (if the Initial Developer is not -the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this -License shall, upon 60 days notice from Participant terminate prospectively and -automatically at the expiration of such 60 day notice period, unless if within -such 60 day period You withdraw Your claim with respect to the Participant -Software against such Participant either unilaterally or pursuant to a written -agreement with Participant. -6.3. If You assert a patent infringement claim -against Participant alleging that the Participant Software directly or -indirectly infringes any patent where such claim is resolved (such as by license -or settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under Sections -2.1 or 2.2 shall be taken into account in determining the amount or value of any -payment or license. -6.4. In the event of termination under Sections 6.1 or 6.2 -above, all end user licenses that have been validly granted by You or any -distributor hereunder prior to termination (excluding licenses granted to You by -any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN -IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS -LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND -LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered -Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 -(Oct. 1995), consisting of “commercial computer software” (as that term is -defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software -documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). -Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 -(June 1995), all U.S. Government End Users acquire Covered Software with only -those rights set forth herein. This U.S. Government Rights clause is in lieu of, -and supersedes, any other FAR, DFAR, or other clause or provision that addresses -Government rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning -subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdiction's conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys' fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability. - -The binary distribution of this product bundles these dependencies under the -following license: -Protocol Buffer Java API 2.5.0 --------------------------------------------------------------------------------- -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - -For: -XML Commons External Components XML APIs 1.3.04 --------------------------------------------------------------------------------- -By obtaining, using and/or copying this work, you (the licensee) agree that you -have read, understood, and will comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: -- The full text of this NOTICE in a location viewable to users of the -redistributed or derivative work. -- Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, the W3C Software Short Notice should be included -(hypertext is preferred, text is permitted) within the body of any redistributed -or derivative code. -- Notice of any changes or modifications to the files, including the date changes -were made. (We recommend you provide URIs to the location from which the code is -derived.) - -The binary distribution of this product bundles these dependencies under the -following license: -JUnit 4.11 -Eclipse JDT Core 3.1.1 --------------------------------------------------------------------------------- -(EPL v1.0) -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to -its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by -that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. - -The binary distribution of this product bundles these dependencies under the -following license: -JSch 0.1.54 -ParaNamer Core 2.3 -JLine 0.9.94 -leveldbjni-all 1.8 -Hamcrest Core 1.3 -ASM Core 5.0.4 -ASM Commons 5.0.2 -ASM Tree 5.0.2 --------------------------------------------------------------------------------- -(3-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -FindBugs-jsr305 3.0.0 -dnsjava 2.1.7, Copyright (c) 1998-2011, Brian Wellington. All rights reserved. --------------------------------------------------------------------------------- -(2-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. - -The binary distribution of this product bundles these dependencies under the -following license: -"Java Concurrency in Practice" book annotations 1.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-hadoop-hdfs-client.txt b/computer-dist/release-docs/licenses/LICENSE-hadoop-hdfs-client.txt deleted file mode 100644 index d99b2ed73..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hadoop-hdfs-client.txt +++ /dev/null @@ -1,1834 +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. - - -APACHE HADOOP SUBCOMPONENTS: - -The Apache Hadoop project contains subcomponents with separate copyright -notices and license terms. Your use of the source code for the these -subcomponents is subject to the terms and conditions of the following -licenses. - -For the org.apache.hadoop.util.bloom.* classes: - -/** - * - * Copyright (c) 2005, European Commission project OneLab under contract - * 034819 (http://www.one-lab.org) - * All rights reserved. - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * - Neither the name of the University Catholique de Louvain - UCL - * nor the names of its contributors may be used to endorse or - * promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -For portions of the native implementation of slicing-by-8 CRC calculation -in src/main/native/src/org/apache/hadoop/util: - -Copyright (c) 2008,2009,2010 Massachusetts Institute of Technology. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of the Massachusetts Institute of Technology nor - the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Other portions are under the same license from Intel: -http://sourceforge.net/projects/slicing-by-8/ -/*++ - * - * Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved - * - * This software program is licensed subject to the BSD License, - * available at http://www.opensource.org/licenses/bsd-license.html - * - * Abstract: The main routine - * - --*/ - -For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,lz4hc.c}, - -/* - LZ4 - Fast LZ compression algorithm - Header File - Copyright (C) 2011-2014, Yann Collet. - BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - LZ4 source repository : http://code.google.com/p/lz4/ - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c -*/ - - -For hadoop-common-project/hadoop-common/src/main/native/gtest ---------------------------------------------------------------------- -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -re2j 1.1 ---------------------------------------------------------------------- -(GO license) -This is a work derived from Russ Cox's RE2 in Go, whose license -http://golang.org/LICENSE is as follows: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/util/tree.h ---------------------------------------------------------------------- -Copyright 2002 Niels Provos -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of leveldbjni -(https://github.com/fusesource/leveldbjni), which is available under the -following license: - -Copyright (c) 2011 FuseSource Corp. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of FuseSource Corp. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/compat/{fstatat|openat|unlinkat}.h: - -Copyright (c) 2012 The FreeBSD Foundation -All rights reserved. - -This software was developed by Pawel Jakub Dawidek under sponsorship from -the FreeBSD Foundation. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -============= - -The binary distribution of this product bundles binaries of leveldb -(http://code.google.com/p/leveldb/), which is available under the following -license: - -Copyright (c) 2011 The LevelDB Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles binaries of snappy -(http://code.google.com/p/snappy/), which is available under the following -license: - -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dataTables.bootstrap.css -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery.dataTables.min.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/dt-1.10.7/ --------------------------------------------------------------------------------- -Copyright (C) 2008-2016, SpryMedia Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-full-2.0.0.min.js -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/dust-helpers-1.1.1.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2010 Aleksander Williams - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/moment.min.js --------------------------------------------------------------------------------- - -Copyright (c) 2011-2016 Tim Wood, Iskren Chernev, Moment.js contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -The binary distribution of this product bundles these dependencies under the -following license: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.3.7 -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/bootstrap.min.js -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap.min.css -hadoop-tools/hadoop-sls/src/main/html/css/bootstrap-responsive.min.css -bootstrap v3.3.6 -broccoli-asset-rev v2.4.2 -broccoli-funnel v1.0.1 -datatables v1.10.8 -em-helpers v0.5.13 -em-table v0.1.6 -ember v2.2.0 -ember-array-contains-helper v1.0.2 -ember-bootstrap v0.5.1 -ember-cli v1.13.13 -ember-cli-app-version v1.0.0 -ember-cli-babel v5.1.6 -ember-cli-content-security-policy v0.4.0 -ember-cli-dependency-checker v1.2.0 -ember-cli-htmlbars v1.0.2 -ember-cli-htmlbars-inline-precompile v0.3.1 -ember-cli-ic-ajax v0.2.1 -ember-cli-inject-live-reload v1.4.0 -ember-cli-jquery-ui v0.0.20 -ember-cli-qunit v1.2.1 -ember-cli-release v0.2.8 -ember-cli-shims v0.0.6 -ember-cli-sri v1.2.1 -ember-cli-test-loader v0.2.1 -ember-cli-uglify v1.2.0 -ember-d3 v0.1.0 -ember-data v2.1.0 -ember-disable-proxy-controllers v1.0.1 -ember-export-application-global v1.0.5 -ember-load-initializers v0.1.7 -ember-qunit v0.4.16 -ember-qunit-notifications v0.1.0 -ember-resolver v2.0.3 -ember-spin-spinner v0.2.3 -ember-truth-helpers v1.2.0 -jquery v2.1.4 -jquery-ui v1.11.4 -loader.js v3.3.0 -momentjs v2.10.6 -qunit v1.19.0 -select2 v4.0.0 -snippet-ss v1.11.0 -spin.js v2.3.2 -Azure Data Lake Store - Java client SDK 2.0.11 -JCodings 1.0.8 -Joni 2.1.2 -Mockito 1.8.5 -JUL to SLF4J bridge 1.7.25 -SLF4J API Module 1.7.25 -SLF4J LOG4J-12 Binding 1.7.25 --------------------------------------------------------------------------------- - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For: -hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/jquery-3.3.1.min.js -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/jquery.js -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jquery -Apache HBase - Server which contains JQuery minified javascript library version 1.8.3 -Microsoft JDBC Driver for SQLServer - version 6.2.1.jre7 --------------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2003-2017 Optimatika - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -For: -oj! Algorithms - version 43.0 --------------------------------------------------------------------------------- - -Copyright 2005, 2012, 2013 jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/jquery - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. - -For: -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/jt/jquery.jstree.js --------------------------------------------------------------------------------- - -Copyright (c) 2014 Ivan Bozhanov - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js --------------------------------------------------------------------------------- - -D3 is available under a 3-clause BSD license. For details, see: -hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE - -The binary distribution of this product bundles these dependencies under the -following license: -HSQLDB Database 2.3.4 --------------------------------------------------------------------------------- -(HSQL License) -"COPYRIGHTS AND LICENSES (based on BSD License) - -For work developed by the HSQL Development Group: - -Copyright (c) 2001-2016, The HSQL Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the HSQL Development Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -For work originally developed by the Hypersonic SQL Group: - -Copyright (c) 1995-2000 by the Hypersonic SQL Group. -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the name of the Hypersonic SQL Group nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP, -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals on behalf of the -Hypersonic SQL Group." - -The binary distribution of this product bundles these dependencies under the -following license: -Java Servlet API 3.1.0 -servlet-api 2.5 -jsp-api 2.1 -jsr311-api 1.1.1 -Glassfish Jasper 6.1.14 -Servlet Specification 2.5 API 6.1.14 --------------------------------------------------------------------------------- -(CDDL 1.0) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -1. Definitions.  - -1.1. Contributor means each individual or entity -that creates or contributes to the creation of -Modifications.  - -1.2. Contributor Version means the combination of the -Original Software, prior Modifications used by a Contributor (if any), and the -Modifications made by that particular Contributor.  - -1.3. Covered -Software means (a) the Original Software, or (b) Modifications, or (c) the -combination of files containing Original Software with files containing -Modifications, in each case including portions -thereof.  - -1.4. Executable means the Covered Software in any form other -than Source Code.  - -1.5. Initial Developer means the individual or entity -that first makes Original Software available under this -License.  - -1.6. Larger Work means a work which combines Covered Software or -portions thereof with code not governed by the terms of this -License.  - -1.7. License means this document.  - -1.8. Licensable means -having the right to grant, to the maximum extent possible, whether at the time -of the initial grant or subsequently acquired, any and all of the rights -conveyed herein.  - -1.9. Modifications means the Source Code and Executable -form of any of the following: -A. Any file that results from an addition to, -deletion from or modification of the contents of a file containing Original -Software or previous Modifications; -B. Any new file that contains any part of the Original Software -or previous Modification; or -C. Any new file that is contributed or otherwise made available -under the terms of this License.  - -1.10. Original Software means the Source Code and Executable form of -computer software code that is originally released under this License.  - -1.11. Patent Claims means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and apparatus -claims, in any patent Licensable by grantor.  - -1.12. Source Code means (a) the common form of computer software code in which -modifications are made and (b) associated documentation included in or -with such code.  - -1.13. You (or Your) means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -You includes any entity which controls, is controlled by, or is under common control -with You. For purposes of this definition, control means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (b) ownership of more than fifty percent (50%) of the -outstanding shares or beneficial ownership of such entity.  - -2. License Grants. - -2.1. The Initial Developer Grant. Conditioned upon Your compliance -with Section 3.1 below and subject to third party intellectual property claims, -the Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license:  - -(a) under intellectual property rights (other than -patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, -display, perform, sublicense and distribute the Original Software (or portions -thereof), with or without Modifications, and/or as part of a Larger Work; -and  - -(b) under Patent Claims infringed by the making, using or selling of -Original Software, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Software (or portions -thereof); - -(c) The licenses granted in Sections 2.1(a) and (b) are -effective on the date Initial Developer first distributes or otherwise makes the -Original Software available to a third party under the terms of this -License; - -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or -(ii) the combination of the Original Software with other software or -devices.  - -2.2. Contributor Grant. Conditioned upon Your compliance with -Section 3.1 below and subject to third party intellectual property claims, each -Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license:  - -(a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such Contributor -(or portions thereof), either on an unmodified basis, with other Modifications, -as Covered Software and/or as part of a Larger Work; and  - -(b) under Patent -Claims infringed by the making, using, or selling of Modifications made by that -Contributor either alone and/or in combination with its Contributor Version (or -portions of such combination), to make, use, sell, offer for sale, have made, -and/or otherwise dispose of: (1) Modifications made by that Contributor (or -portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such -combination).  - -(c) The licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first distributes or otherwise makes the -Modifications available to a third party. - -(d) Notwithstanding Section 2.2(b) -above, no patent license is granted: (1) for any code that Contributor has -deleted from the Contributor Version; (2) for infringements caused by: -(i) third party modifications of Contributor Version, or (ii) the combination -of Modifications made by that Contributor with other software (except as part of -the Contributor Version) or other devices; or (3) under Patent Claims infringed -by Covered Software in the absence of Modifications made by that -Contributor.  - -3. Distribution Obligations.  - -3.1. Availability of Source -Code. Any Covered Software that You distribute or otherwise make available in -Executable form must also be made available in Source Code form and that Source -Code form must be distributed only under the terms of this License. You must -include a copy of this License with every copy of the Source Code form of the -Covered Software You distribute or otherwise make available. You must inform -recipients of any such Covered Software in Executable form as to how they can -obtain such Covered Software in Source Code form in a reasonable manner on or -through a medium customarily used for software exchange.  - -3.2. -Modifications. The Modifications that You create or to which You contribute are -governed by the terms of this License. You represent that You believe Your -Modifications are Your original creation(s) and/or You have sufficient rights to -grant the rights conveyed by this License.  - -3.3. Required Notices. You must -include a notice in each of Your Modifications that identifies You as the -Contributor of the Modification. You may not remove or alter any copyright, -patent or trademark notices contained within the Covered Software, or any -notices of licensing or any descriptive text giving attribution to any -Contributor or the Initial Developer.  - -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source Code -form that alters or restricts the applicable version of this License or the -recipients rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. - -3.5. Distribution of Executable Versions. You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipients rights in the Source Code form from the rights set forth in this -License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer.  - -3.6. Larger Works. You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software.  - -4. Versions of the License.  - -4.1. -New Versions. Sun Microsystems, Inc. is the initial license steward and may -publish revised and/or new versions of this License from time to time. Each -version will be given a distinguishing version number. Except as provided in -Section 4.3, no one other than the license steward has the right to modify this -License.  - -4.2. Effect of New Versions. You may always continue to use, -distribute or otherwise make the Covered Software available under the terms of -the version of the License under which You originally received the Covered -Software. If the Initial Developer includes a notice in the Original Software -prohibiting it from being distributed or otherwise made available under any -subsequent version of the License, You must distribute and make the Covered -Software available under the terms of the version of the License under which You -originally received the Covered Software. Otherwise, You may also choose to use, -distribute or otherwise make the Covered Software available under the terms of -any subsequent version of the License published by the license -steward.  - -4.3. Modified Versions. When You are an Initial Developer and You -want to create a new license for Your Original Software, You may create and use -a modified version of this License if You: (a) rename the license and remove -any references to the name of the license steward (except to note that the -license differs from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License.  - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, -MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY -COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER -OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER -THIS DISCLAIMER.  - -6. TERMINATION.  - -6.1. This License and the rights -granted hereunder will terminate automatically if You fail to comply with terms -herein and fail to cure such breach within 30 days of becoming aware of the -breach. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive.  - -6.2. If You assert a patent -infringement claim (excluding declaratory judgment actions) against Initial -Developer or a Contributor (the Initial Developer or Contributor against whom -You assert such claim is referred to as Participant) alleging that the -Participant Software (meaning the Contributor Version where the Participant is a -Contributor or the Original Software where the Participant is the Initial -Developer) directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial Developer -(if the Initial Developer is not the Participant) and all Contributors under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from -Participant terminate prospectively and automatically at the expiration of such -60 day notice period, unless if within such 60 day period You withdraw Your -claim with respect to the Participant Software against such Participant either -unilaterally or pursuant to a written agreement with Participant.  - -6.3. In -the event of termination under Sections 6.1 or 6.2 above, all end user licenses -that have been validly granted by You or any distributor hereunder prior to -termination (excluding licenses granted to You by any distributor) shall survive -termination.  - -7. LIMITATION OF LIABILITY. -UNDER NO CIRCUMSTANCES AND UNDER -NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, -SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF -COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY -PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY -CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE -POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO -LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO -THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT -ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO -THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.  - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a commercial item, as that term is defined in -48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as -that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer -software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. -1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software -with only those rights set forth herein. This U.S. Government Rights clause is -in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision -that addresses Government rights in computer software under this -License.  - -9. MISCELLANEOUS. -This License represents the complete agreement -concerning subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdictions conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software.  - -10. RESPONSIBILITY FOR CLAIMS. -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability.  - -The binary distribution of this product bundles these dependencies under the -following license: -jersey-client 1.19 -jersey-core 1.19 -jersey-grizzly2 1.19 -jersey-grizzly2-servlet 1.19 -jersey-json 1.19 -jersey-server 1.19 -jersey-servlet 1.19 -jersey-guice 1.19 -Jersey Test Framework - Grizzly 2 Module 1.19 -JAXB RI 2.2.3 -Java Architecture for XML Binding 2.2.11 -grizzly-framework 2.2.21 -grizzly-http 2.2.21 -grizzly-http-server 2.2.21 -grizzly-http-servlet 2.2.21 -grizzly-rcm 2.2.21 --------------------------------------------------------------------------------- -(CDDL 1.1) -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1 - -1. Definitions. - -1.1. “Contributor” means each individual or entity that creates or -contributes to the creation of Modifications. -1.2. “Contributor Version” means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications made -by that particular Contributor. -1.3. “Covered Software” means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original Software with -files containing Modifications, in each case including portions thereof. -1.4. “Executable” means the Covered Software in any form other than Source -Code. -1.5. “Initial Developer” means the individual or entity that first makes -Original Software available under this License. -1.6. “Larger Work” means a work which combines Covered Software or portions -thereof with code not governed by the terms of this License. -1.7. “License” means this document. -1.8. “Licensable” means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, any -and all of the rights conveyed herein. -1.9. “Modifications” means the Source Code and Executable form of any of the -following: -A. Any file that results from an addition to, deletion from or modification of -the contents of a file containing Original Software or previous Modifications; -B. Any new file that contains any part of the Original Software or previous -Modification; or -C. Any new file that is contributed or otherwise made available under the terms -of this License. -1.10. “Original Software” means the Source Code and Executable form of -computer software code that is originally released under this License. -1.11. “Patent Claims” means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. -1.12. “Source Code” means (a) the common form of computer software code in -which modifications are made and (b) associated documentation included in or -with such code. -1.13. “You” (or “Your”) means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License. For legal -entities, “You” includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, “control” -means (a) the power, direct or indirect, to cause the direction or management of -such entity, whether by contract or otherwise, or (b) ownership of more than -fifty percent (50%) of the outstanding shares or beneficial ownership of such -entity. - -2. License Grants. - -2.1. The Initial Developer Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, the Initial Developer hereby grants -You a world-wide, royalty-free, non-exclusive license: -(a) under intellectual -property rights (other than patent or trademark) Licensable by Initial -Developer, to use, reproduce, modify, display, perform, sublicense and -distribute the Original Software (or portions thereof), with or without -Modifications, and/or as part of a Larger Work; and -(b) under Patent Claims -infringed by the making, using or selling of Original Software, to make, have -made, use, practice, sell, and offer for sale, and/or otherwise dispose of the -Original Software (or portions thereof). -(c) The licenses granted in Sections -2.1(a) and (b) are effective on the date Initial Developer first distributes or -otherwise makes the Original Software available to a third party under the terms -of this License. -(d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) for -infringements caused by: (i) the modification of the Original Software, or (ii) -the combination of the Original Software with other software or devices. - -2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and -subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license: -(a) under -intellectual property rights (other than patent or trademark) Licensable by -Contributor to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof), -either on an unmodified basis, with other Modifications, as Covered Software -and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the -making, using, or selling of Modifications made by that Contributor either alone -and/or in combination with its Contributor Version (or portions of such -combination), to make, use, sell, offer for sale, have made, and/or otherwise -dispose of: (1) Modifications made by that Contributor (or portions thereof); -and (2) the combination of Modifications made by that Contributor with its -Contributor Version (or portions of such combination). -(c) The licenses granted -in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first -distributes or otherwise makes the Modifications available to a third -party. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: -(1) for any code that Contributor has deleted from the Contributor Version; (2) -for infringements caused by: (i) third party modifications of Contributor -Version, or (ii) the combination of Modifications made by that Contributor with -other software (except as part of the Contributor Version) or other devices; or -(3) under Patent Claims infringed by Covered Software in the absence of -Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. -Any Covered Software that You distribute or -otherwise make available in Executable form must also be made available in -Source Code form and that Source Code form must be distributed only under the -terms of this License. You must include a copy of this License with every copy -of the Source Code form of the Covered Software You distribute or otherwise make -available. You must inform recipients of any such Covered Software in Executable -form as to how they can obtain such Covered Software in Source Code form in a -reasonable manner on or through a medium customarily used for software -exchange. -3.2. Modifications. -The Modifications that You create or to which -You contribute are governed by the terms of this License. You represent that You -believe Your Modifications are Your original creation(s) and/or You have -sufficient rights to grant the rights conveyed by this License. -3.3. Required Notices. -You must include a notice in each of Your Modifications that -identifies You as the Contributor of the Modification. You may not remove or -alter any copyright, patent or trademark notices contained within the Covered -Software, or any notices of licensing or any descriptive text giving attribution -to any Contributor or the Initial Developer. -3.4. Application of Additional Terms. -You may not offer or impose any terms on any Covered Software in Source -Code form that alters or restricts the applicable version of this License or the -recipients' rights hereunder. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Software. However, you may do so only on Your own behalf, and not on -behalf of the Initial Developer or any Contributor. You must make it absolutely -clear that any such warranty, support, indemnity or liability obligation is -offered by You alone, and You hereby agree to indemnify the Initial Developer -and every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability terms -You offer. -3.5. Distribution of Executable Versions. -You may distribute the -Executable form of the Covered Software under the terms of this License or under -the terms of a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable form does not attempt to limit or alter -the recipient's rights in the Source Code form from the rights set forth in -this License. If You distribute the Covered Software in Executable form under a -different license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer or -Contributor. You hereby agree to indemnify the Initial Developer and every -Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. -3.6. Larger Works. -You -may create a Larger Work by combining Covered Software with other code not -governed by the terms of this License and distribute the Larger Work as a single -product. In such a case, You must make sure the requirements of this License are -fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. -Oracle is the initial license steward and may publish revised and/or -new versions of this License from time to time. Each version will be given a -distinguishing version number. Except as provided in Section 4.3, no one other -than the license steward has the right to modify this License. -4.2. Effect of New Versions. -You may always continue to use, distribute or otherwise make the -Covered Software available under the terms of the version of the License under -which You originally received the Covered Software. If the Initial Developer -includes a notice in the Original Software prohibiting it from being distributed -or otherwise made available under any subsequent version of the License, You -must distribute and make the Covered Software available under the terms of the -version of the License under which You originally received the Covered Software. -Otherwise, You may also choose to use, distribute or otherwise make the Covered -Software available under the terms of any subsequent version of the License -published by the license steward. -4.3. Modified Versions. -When You are an -Initial Developer and You want to create a new license for Your Original -Software, You may create and use a modified version of this License if You: (a) -rename the license and remove any references to the name of the license steward -(except to note that the license differs from this License); and (b) otherwise -make it clear that the license contains terms which differ from this -License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS -LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE -IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR -NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY -RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE -COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will -terminate automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions which, by -their nature, must remain in effect beyond the termination of this License shall -survive. -6.2. If You assert a patent infringement claim (excluding declaratory -judgment actions) against Initial Developer or a Contributor (the Initial -Developer or Contributor against whom You assert such claim is referred to as -“Participant”) alleging that the Participant Software (meaning the -Contributor Version where the Participant is a Contributor or the Original -Software where the Participant is the Initial Developer) directly or indirectly -infringes any patent, then any and all rights granted directly or indirectly to -You by such Participant, the Initial Developer (if the Initial Developer is not -the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this -License shall, upon 60 days notice from Participant terminate prospectively and -automatically at the expiration of such 60 day notice period, unless if within -such 60 day period You withdraw Your claim with respect to the Participant -Software against such Participant either unilaterally or pursuant to a written -agreement with Participant. -6.3. If You assert a patent infringement claim -against Participant alleging that the Participant Software directly or -indirectly infringes any patent where such claim is resolved (such as by license -or settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under Sections -2.1 or 2.2 shall be taken into account in determining the amount or value of any -payment or license. -6.4. In the event of termination under Sections 6.1 or 6.2 -above, all end user licenses that have been validly granted by You or any -distributor hereunder prior to termination (excluding licenses granted to You by -any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN -IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS -LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND -LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered -Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 -(Oct. 1995), consisting of “commercial computer software” (as that term is -defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software -documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). -Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 -(June 1995), all U.S. Government End Users acquire Covered Software with only -those rights set forth herein. This U.S. Government Rights clause is in lieu of, -and supersedes, any other FAR, DFAR, or other clause or provision that addresses -Government rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning -subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. This License shall be governed by the law of the -jurisdiction specified in a notice contained within the Original Software -(except to the extent applicable law, if any, provides otherwise), excluding -such jurisdiction's conflict-of-law provisions. Any litigation relating to this -License shall be subject to the jurisdiction of the courts located in the -jurisdiction and venue specified in a notice contained within the Original -Software, with the losing party responsible for costs, including, without -limitation, court costs and reasonable attorneys' fees and expenses. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. You agree that You alone are responsible for compliance -with the United States export administration regulations (and the export control -laws and regulation of any other countries) when You use, distribute or -otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability. - -The binary distribution of this product bundles these dependencies under the -following license: -Protocol Buffer Java API 2.5.0 --------------------------------------------------------------------------------- -This license applies to all parts of Protocol Buffers except the following: - - - Atomicops support for generic gcc, located in - src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. - This file is copyrighted by Red Hat Inc. - - - Atomicops support for AIX/POWER, located in - src/google/protobuf/stubs/atomicops_internals_power.h. - This file is copyrighted by Bloomberg Finance LP. - -Copyright 2014, Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - -For: -XML Commons External Components XML APIs 1.3.04 --------------------------------------------------------------------------------- -By obtaining, using and/or copying this work, you (the licensee) agree that you -have read, understood, and will comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: -- The full text of this NOTICE in a location viewable to users of the -redistributed or derivative work. -- Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, the W3C Software Short Notice should be included -(hypertext is preferred, text is permitted) within the body of any redistributed -or derivative code. -- Notice of any changes or modifications to the files, including the date changes -were made. (We recommend you provide URIs to the location from which the code is -derived.) - -The binary distribution of this product bundles these dependencies under the -following license: -JUnit 4.11 -Eclipse JDT Core 3.1.1 --------------------------------------------------------------------------------- -(EPL v1.0) -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are not -derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and such -derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to -its Contributions set forth herein, no assurances are provided by any -Contributor that the Program does not infringe the patent or other intellectual -property rights of any other entity. Each Contributor disclaims any liability to -Recipient for claims brought by any other entity based on infringement of -intellectual property rights or otherwise. As a condition to exercising the -rights and licenses granted hereunder, each Recipient hereby assumes sole -responsibility to secure any other intellectual property rights needed, if any. -For example, if a third party patent license is required to allow Recipient to -distribute the Program, it is Recipient's responsibility to acquire that license -before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and -fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by -that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. - -The binary distribution of this product bundles these dependencies under the -following license: -JSch 0.1.54 -ParaNamer Core 2.3 -JLine 0.9.94 -leveldbjni-all 1.8 -Hamcrest Core 1.3 -ASM Core 5.0.4 -ASM Commons 5.0.2 -ASM Tree 5.0.2 --------------------------------------------------------------------------------- -(3-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The binary distribution of this product bundles these dependencies under the -following license: -FindBugs-jsr305 3.0.0 -dnsjava 2.1.7, Copyright (c) 1998-2011, Brian Wellington. All rights reserved. --------------------------------------------------------------------------------- -(2-clause BSD) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. - -The binary distribution of this product bundles these dependencies under the -following license: -"Java Concurrency in Practice" book annotations 1.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-hamcrest-core.txt b/computer-dist/release-docs/licenses/LICENSE-hamcrest-core.txt deleted file mode 100644 index dcdcc4234..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hamcrest-core.txt +++ /dev/null @@ -1,27 +0,0 @@ -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of -conditions and the following disclaimer. Redistributions in binary form must reproduce -the above copyright notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse -or promote products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-client.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-client.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-client.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-common.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-common.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-common.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop-compat.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop-compat.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop-compat.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop2-compat.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop2-compat.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-hadoop2-compat.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-http.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-http.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-http.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-metrics-api.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-metrics-api.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-metrics-api.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-metrics.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-metrics.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-metrics.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-protocol-shaded.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-protocol-shaded.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-protocol-shaded.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-replication.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-replication.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-replication.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-server.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-server.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-server.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-client-byo-hadoop.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-client-byo-hadoop.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-client-byo-hadoop.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-miscellaneous.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-miscellaneous.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-miscellaneous.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-netty.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-netty.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-netty.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-protobuf.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-protobuf.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-shaded-protobuf.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-zookeeper.txt b/computer-dist/release-docs/licenses/LICENSE-hbase-zookeeper.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hbase-zookeeper.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hessian.txt b/computer-dist/release-docs/licenses/LICENSE-hessian.txt deleted file mode 100644 index 26c62dba8..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hessian.txt +++ /dev/null @@ -1,201 +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 2018 Ant Small and Micro Financial Services Group Co., Ltd. - - 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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-htrace-core4.txt b/computer-dist/release-docs/licenses/LICENSE-htrace-core4.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-htrace-core4.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hugegraph-client.txt b/computer-dist/release-docs/licenses/LICENSE-hugegraph-client.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hugegraph-client.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-hugegraph-common.txt b/computer-dist/release-docs/licenses/LICENSE-hugegraph-common.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hugegraph-common.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-hugegraph-loader.txt b/computer-dist/release-docs/licenses/LICENSE-hugegraph-loader.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hugegraph-loader.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-hugegraph-rpc.txt b/computer-dist/release-docs/licenses/LICENSE-hugegraph-rpc.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-hugegraph-rpc.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-core-asl.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-core-asl.txt deleted file mode 100644 index 3eaf591be..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-core-asl.txt +++ /dev/null @@ -1,13 +0,0 @@ -This copy of Jackson JSON processor is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/ - -A copy is also included with both the the downloadable source code package -and jar that contains class bytecodes, as file "ASL 2.0". In both cases, -that file should be located next to this file: in source distribution -the location should be "release-notes/asl"; and in jar "META-INF/" diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-core.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-core.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-core.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt deleted file mode 100644 index 8d5775d40..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor YAML module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt deleted file mode 100644 index f5f45d26a..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor streaming parser/generator is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt deleted file mode 100644 index 6acf75483..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt deleted file mode 100644 index 8d5775d40..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor YAML module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs.txt deleted file mode 100644 index 3eaf591be..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-jaxrs.txt +++ /dev/null @@ -1,13 +0,0 @@ -This copy of Jackson JSON processor is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/ - -A copy is also included with both the the downloadable source code package -and jar that contains class bytecodes, as file "ASL 2.0". In both cases, -that file should be located next to this file: in source distribution -the location should be "release-notes/asl"; and in jar "META-INF/" diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-mapper-asl.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-mapper-asl.txt deleted file mode 100644 index 3eaf591be..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-mapper-asl.txt +++ /dev/null @@ -1,13 +0,0 @@ -This copy of Jackson JSON processor is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/ - -A copy is also included with both the the downloadable source code package -and jar that contains class bytecodes, as file "ASL 2.0". In both cases, -that file should be located next to this file: in source distribution -the location should be "release-notes/asl"; and in jar "META-INF/" diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt deleted file mode 100644 index 283587f1b..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor `jackson-module-jaxb-annotations` module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-xc.txt b/computer-dist/release-docs/licenses/LICENSE-jackson-xc.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jackson-xc.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-jakarta.activation-api.txt b/computer-dist/release-docs/licenses/LICENSE-jakarta.activation-api.txt deleted file mode 100644 index e0358f972..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jakarta.activation-api.txt +++ /dev/null @@ -1,29 +0,0 @@ - - Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Eclipse Foundation, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/computer-dist/release-docs/licenses/LICENSE-jakarta.activation.txt b/computer-dist/release-docs/licenses/LICENSE-jakarta.activation.txt deleted file mode 100644 index e0358f972..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jakarta.activation.txt +++ /dev/null @@ -1,29 +0,0 @@ - - Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Eclipse Foundation, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/computer-dist/release-docs/licenses/LICENSE-jamon-runtime.txt b/computer-dist/release-docs/licenses/LICENSE-jamon-runtime.txt deleted file mode 100644 index 69ec565a1..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jamon-runtime.txt +++ /dev/null @@ -1,151 +0,0 @@ -Mozilla Public License -Version 2.0 -1. Definitions -1.1. “Contributor” -means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. - -1.2. “Contributor Version” -means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” -means Covered Software of a particular Contributor. - -1.4. “Covered Software” -means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. - -1.5. “Incompatible With Secondary Licenses” -means - -that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - -that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. - -1.6. “Executable Form” -means any form of the work other than Source Code Form. - -1.7. “Larger Work” -means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. - -1.8. “License” -means this document. - -1.9. “Licensable” -means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. - -1.10. “Modifications” -means any of the following: - -any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or - -any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor -means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. - -1.12. “Secondary License” -means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” -means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) -means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants and Conditions -2.1. Grants -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - -under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and - -under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. - -2.2. Effective Date -The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. - -2.3. Limitations on Grant Scope -The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: - -for any code that a Contributor has removed from Covered Software; or - -for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or - -under Patent Claims infringed by Covered Software in the absence of its Contributions. - -This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). - -2.4. Subsequent Licenses -No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). - -2.5. Representation -Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use -This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. - -3. Responsibilities -3.1. Distribution of Source Form -All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form -If You distribute Covered Software in Executable Form then: - -such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and - -You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work -You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). - -3.4. Notices -You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms -You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. - -4. Inability to Comply Due to Statute or Regulation -If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - -5. Termination -5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. - -6. Disclaimer of Warranty -Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer. - -7. Limitation of Liability -Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation -Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous -This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. - -10. Versions of the License -10.1. New Versions -Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. - -10.2. Effect of New Versions -You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. - -10.3. Modified Versions -If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses -If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice -This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-javassist.txt b/computer-dist/release-docs/licenses/LICENSE-javassist.txt deleted file mode 100644 index 7c441fbfa..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javassist.txt +++ /dev/null @@ -1,137 +0,0 @@ -MOZILLA PUBLIC LICENSE -Version 1.1 -1. Definitions. - -1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications. - -1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. - -1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. - -1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. - -1.5. ''Executable'' means Covered Code in any form other than Source Code. - -1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. - -1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - -1.8. ''License'' means this document. - -1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - -1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. - - -1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. - -1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. - -1.12. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. Source Code License. -2.1. The Initial Developer Grant. -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and -(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. - - -2.2. Contributor Grant. -Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. - - -3. Distribution Obligations. - -3.1. Application of License. -The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. -Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. -You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. - -3.4. Intellectual Property Matters - -(a) Third Party Claims. -If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(b) Contributor APIs. -If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. - - - (c) Representations. -Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. - -3.5. Required Notices. -You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. -You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - -3.7. Larger Works. -You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. -If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -5. Application of this License. -This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. -6. Versions of the License. -6.1. New Versions. -Netscape Communications Corporation (''Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -6.2. Effect of New Versions. -Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. - -6.3. Derivative Works. -If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) - -7. DISCLAIMER OF WARRANTY. -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -8. TERMINATION. -8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: - -(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -10. U.S. GOVERNMENT END USERS. -The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -11. MISCELLANEOUS. -This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -12. RESPONSIBILITY FOR CLAIMS. -As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -13. MULTIPLE-LICENSED CODE. -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - -The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL/ -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - -The Original Code is Javassist. - -The Initial Developer of the Original Code is Shigeru Chiba. Portions created by the Initial Developer are - Copyright (C) 1999- Shigeru Chiba. All Rights Reserved. - -Contributor(s): __Bill Burke, Jason T. Greene______________. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.annotation-api.txt b/computer-dist/release-docs/licenses/LICENSE-javax.annotation-api.txt deleted file mode 100644 index 9f023738d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.annotation-api.txt +++ /dev/null @@ -1,124 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - - 1.1. Contributor. means each individual or entity that creates or contributes to the creation of Modifications. - - 1.2. Contributor Version. means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. - - 1.3. Covered Software. means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. - - 1.4. Executable. means the Covered Software in any form other than Source Code. - - 1.5. Initial Developer. means the individual or entity that first makes Original Software available under this License. - - 1.6. Larger Work. means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - - 1.7. License. means this document. - - 1.8. Licensable. means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - - 1.9. Modifications. means the Source Code and Executable form of any of the following: - - A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; - - B. Any new file that contains any part of the Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made available under the terms of this License. - - 1.10. Original Software. means the Source Code and Executable form of computer software code that is originally released under this License. - - 1.11. Patent Claims. means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. - - 1.12. Source Code. means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. - - 1.13. You. (or .Your.) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, .You. includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, .control. means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. - - 3.2. Modifications. - The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients. rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient.s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. - - 4.2. Effect of New Versions. - You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as .Participant.) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a .commercial item,. as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and .commercial computer software documentation. as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction.s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys. fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.el.txt b/computer-dist/release-docs/licenses/LICENSE-javax.el.txt deleted file mode 100644 index 4d9e6a347..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.el.txt +++ /dev/null @@ -1,356 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) -The code released under the CDDL shall be governed by the laws of the -State of California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the jurisdiction -of the Federal Courts of the Northern District of California and the -state courts of the State of California, with venue lying in Santa Clara -County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.inject.txt b/computer-dist/release-docs/licenses/LICENSE-javax.inject.txt deleted file mode 100644 index 75372e3d2..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.inject.txt +++ /dev/null @@ -1,348 +0,0 @@ -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.json.txt b/computer-dist/release-docs/licenses/LICENSE-javax.json.txt deleted file mode 100644 index 4a00ba948..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.json.txt +++ /dev/null @@ -1,362 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - ------------------------------------------------------------------------- - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION -LICENSE (CDDL) - -The code released under the CDDL shall be governed by the laws of the -State of California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the jurisdiction -of the Federal Courts of the Northern District of California and the -state courts of the State of California, with venue lying in Santa Clara -County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.servlet-api.txt b/computer-dist/release-docs/licenses/LICENSE-javax.servlet-api.txt deleted file mode 100644 index 9f023738d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.servlet-api.txt +++ /dev/null @@ -1,124 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - - 1.1. Contributor. means each individual or entity that creates or contributes to the creation of Modifications. - - 1.2. Contributor Version. means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. - - 1.3. Covered Software. means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. - - 1.4. Executable. means the Covered Software in any form other than Source Code. - - 1.5. Initial Developer. means the individual or entity that first makes Original Software available under this License. - - 1.6. Larger Work. means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - - 1.7. License. means this document. - - 1.8. Licensable. means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - - 1.9. Modifications. means the Source Code and Executable form of any of the following: - - A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; - - B. Any new file that contains any part of the Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made available under the terms of this License. - - 1.10. Original Software. means the Source Code and Executable form of computer software code that is originally released under this License. - - 1.11. Patent Claims. means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. - - 1.12. Source Code. means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. - - 1.13. You. (or .Your.) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, .You. includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, .control. means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. - - 3.2. Modifications. - The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients. rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient.s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. - - 4.2. Effect of New Versions. - You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as .Participant.) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a .commercial item,. as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and .commercial computer software documentation. as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction.s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys. fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp-api.txt b/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp-api.txt deleted file mode 100644 index 4d9e6a347..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp-api.txt +++ /dev/null @@ -1,356 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) -The code released under the CDDL shall be governed by the laws of the -State of California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the jurisdiction -of the Federal Courts of the Northern District of California and the -state courts of the State of California, with venue lying in Santa Clara -County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp.txt b/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp.txt deleted file mode 100644 index 4d9e6a347..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-javax.servlet.jsp.txt +++ /dev/null @@ -1,356 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) -The code released under the CDDL shall be governed by the laws of the -State of California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the jurisdiction -of the Federal Courts of the Northern District of California and the -state courts of the State of California, with venue lying in Santa Clara -County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-jaxb-core.txt b/computer-dist/release-docs/licenses/LICENSE-jaxb-core.txt deleted file mode 100644 index da1c1cea7..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jaxb-core.txt +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Eclipse Foundation, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jaxb-impl.txt b/computer-dist/release-docs/licenses/LICENSE-jaxb-impl.txt deleted file mode 100644 index 88e058cb1..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jaxb-impl.txt +++ /dev/null @@ -1,335 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - - 1.1. Contributor. means each individual or entity that creates or -contributes to the creation of Modifications. - - 1.2. Contributor Version. means the combination of the Original -Software, prior Modifications used by a Contributor (if any), and the -Modifications made by that particular Contributor. - - 1.3. Covered Software. means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original -Software with files containing Modifications, in each case including -portions thereof. - - 1.4. Executable. means the Covered Software in any form other than -Source Code. - - 1.5. Initial Developer. means the individual or entity that first -makes Original Software available under this License. - - 1.6. Larger Work. means a work which combines Covered Software or -portions thereof with code not governed by the terms of this License. - - 1.7. License. means this document. - - 1.8. Licensable. means having the right to grant, to the maximum -extent possible, whether at the time of the initial grant or -subsequently acquired, any and all of the rights conveyed herein. - - 1.9. Modifications. means the Source Code and Executable form of any -of the following: - - A. Any file that results from an addition to, deletion from or -modification of the contents of a file containing Original Software or -previous Modifications; - - B. Any new file that contains any part of the Original Software -or previous Modification; or - - C. Any new file that is contributed or otherwise made available -under the terms of this License. - - 1.10. Original Software. means the Source Code and Executable form of -computer software code that is originally released under this License. - - 1.11. Patent Claims. means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and -apparatus claims, in any patent Licensable by grantor. - - 1.12. Source Code. means (a) the common form of computer software -code in which modifications are made and (b) associated documentation -included in or with such code. - - 1.13. You. (or .Your.) means an individual or a legal entity -exercising rights under, and complying with all of the terms of, this -License. For legal entities, .You. includes any entity which controls, -is controlled by, or is under common control with You. For purposes of -this definition, .control. means (a) the power, direct or indirect, to -cause the direction or management of such entity, whether by contract or -otherwise, or (b) ownership of more than fifty percent (50%) of the -outstanding shares or beneficial ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and -subject to third party intellectual property claims, the Initial -Developer hereby grants You a world-wide, royalty-free, non-exclusive -license: - - (a) under intellectual property rights (other than patent or -trademark) Licensable by Initial Developer, to use, reproduce, modify, -display, perform, sublicense and distribute the Original Software (or -portions thereof), with or without Modifications, and/or as part of a -Larger Work; and - - (b) under Patent Claims infringed by the making, using or -selling of Original Software, to make, have made, use, practice, sell, -and offer for sale, and/or otherwise dispose of the Original Software -(or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are -effective on the date Initial Developer first distributes or otherwise -makes the Original Software available to a third party under the terms -of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is -granted: (1) for code that You delete from the Original Software, or (2) -for infringements caused by: (i) the modification of the Original -Software, or (ii) the combination of the Original Software with other -software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject -to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such -Contributor (or portions thereof), either on an unmodified basis, with -other Modifications, as Covered Software and/or as part of a Larger Work; -and - - (b) under Patent Claims infringed by the making, using, or -selling of Modifications made by that Contributor either alone and/or in -combination with its Contributor Version (or portions of such -combination), to make, use, sell, offer for sale, have made, and/or -otherwise dispose of: (1) Modifications made by that Contributor (or -portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such -combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first distributes or otherwise makes -the Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is -granted: (1) for any code that Contributor has deleted from the -Contributor Version; (2) for infringements caused by: (i) third party -modifications of Contributor Version, or (ii) the combination of -Modifications made by that Contributor with other software (except as -part of the Contributor Version) or other devices; or (3) under Patent -Claims infringed by Covered Software in the absence of Modifications -made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - Any Covered Software that You distribute or otherwise make -available in Executable form must also be made available in Source Code -form and that Source Code form must be distributed only under the terms -of this License. You must include a copy of this License with every copy -of the Source Code form of the Covered Software You distribute or -otherwise make available. You must inform recipients of any such Covered -Software in Executable form as to how they can obtain such Covered -Software in Source Code form in a reasonable manner on or through a -medium customarily used for software exchange. - - 3.2. Modifications. - The Modifications that You create or to which You contribute are -governed by the terms of this License. You represent that You believe -Your Modifications are Your original creation(s) and/or You have -sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - You must include a notice in each of Your Modifications that -identifies You as the Contributor of the Modification. You may not -remove or alter any copyright, patent or trademark notices contained -within the Covered Software, or any notices of licensing or any -descriptive text giving attribution to any Contributor or the Initial -Developer. - - 3.4. Application of Additional Terms. - You may not offer or impose any terms on any Covered Software in -Source Code form that alters or restricts the applicable version of this -License or the recipients. rights hereunder. You may choose to offer, -and to charge a fee for, warranty, support, indemnity or liability -obligations to one or more recipients of Covered Software. However, you -may do so only on Your own behalf, and not on behalf of the Initial -Developer or any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity or liability obligation is offered by -You alone, and You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or -liability terms You offer. - - 3.5. Distribution of Executable Versions. - You may distribute the Executable form of the Covered Software -under the terms of this License or under the terms of a license of Your -choice, which may contain terms different from this License, provided -that You are in compliance with the terms of this License and that the -license for the Executable form does not attempt to limit or alter the -recipient.s rights in the Source Code form from the rights set forth in -this License. If You distribute the Covered Software in Executable form -under a different license, You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by -the Initial Developer or Contributor. You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of any such terms -You offer. - - 3.6. Larger Works. - You may create a Larger Work by combining Covered Software with -other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the -requirements of this License are fulfilled for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - Sun Microsystems, Inc. is the initial license steward and may -publish revised and/or new versions of this License from time to time. -Each version will be given a distinguishing version number. Except as -provided in Section 4.3, no one other than the license steward has the -right to modify this License. - - 4.2. Effect of New Versions. - You may always continue to use, distribute or otherwise make the -Covered Software available under the terms of the version of the License -under which You originally received the Covered Software. If the Initial -Developer includes a notice in the Original Software prohibiting it from -being distributed or otherwise made available under any subsequent -version of the License, You must distribute and make the Covered -Software available under the terms of the version of the License under -which You originally received the Covered Software. Otherwise, You may -also choose to use, distribute or otherwise make the Covered Software -available under the terms of any subsequent version of the License -published by the license steward. - - 4.3. Modified Versions. - When You are an Initial Developer and You want to create a new -license for Your Original Software, You may create and use a modified -version of this License if You: (a) rename the license and remove any -references to the name of the license steward (except to note that the -license differs from this License); and (b) otherwise make it clear that -the license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF -DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED -SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY -RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS -DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO -USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS -DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions -which, by their nature, must remain in effect beyond the termination of -this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding -declaratory judgment actions) against Initial Developer or a Contributor -(the Initial Developer or Contributor against whom You assert such claim -is referred to as .Participant.) alleging that the Participant Software -(meaning the Contributor Version where the Participant is a Contributor -or the Original Software where the Participant is the Initial Developer) -directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial -Developer (if the Initial Developer is not the Participant) and all -Contributors under Sections 2.1 and/or 2.2 of this License shall, upon -60 days notice from Participant terminate prospectively and -automatically at the expiration of such 60 day notice period, unless if -within such 60 day period You withdraw Your claim with respect to the -Participant Software against such Participant either unilaterally or -pursuant to a written agreement with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, -all end user licenses that have been validly granted by You or any -distributor hereunder prior to termination (excluding licenses granted -to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, -OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY -INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER -INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL -OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN -INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY -RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION -AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a .commercial item,. as that term is defined -in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer -software. (as that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) -and .commercial computer software documentation. as such terms are used -in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and -48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government -End Users acquire Covered Software with only those rights set forth -herein. This U.S. Government Rights clause is in lieu of, and supersedes, -any other FAR, DFAR, or other clause or provision that addresses -Government rights in computer software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. This License shall be governed by the -law of the jurisdiction specified in a notice contained within the -Original Software (except to the extent applicable law, if any, provides -otherwise), excluding such jurisdiction.s conflict-of-law provisions. -Any litigation relating to this License shall be subject to the -jurisdiction of the courts located in the jurisdiction and venue -specified in a notice contained within the Original Software, with the -losing party responsible for costs, including, without limitation, court -costs and reasonable attorneys. fees and expenses. The application of -the United Nations Convention on Contracts for the International Sale of -Goods is expressly excluded. Any law or regulation which provides that -the language of a contract shall be construed against the drafter shall -not apply to this License. You agree that You alone are responsible for -compliance with the United States export administration regulations (and -the export control laws and regulation of any other countries) when You -use, distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out -of its utilization of rights under this License and You agree to work -with Initial Developer and Contributors to distribute such -responsibility on an equitable basis. Nothing herein is intended or -shall be deemed to constitute any admission of liability. - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND -DISTRIBUTION LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the -State of California (excluding conflict-of-law provisions). Any -litigation relating to this License shall be subject to the jurisdiction -of the Federal Courts of the Northern District of California and the -state courts of the State of California, with venue lying in Santa Clara -County, California. diff --git a/computer-dist/release-docs/licenses/LICENSE-jcip-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-jcip-annotations.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jcip-annotations.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jcodings.txt b/computer-dist/release-docs/licenses/LICENSE-jcodings.txt deleted file mode 100644 index f85e365de..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jcodings.txt +++ /dev/null @@ -1,17 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/computer-dist/release-docs/licenses/LICENSE-jcommander.txt b/computer-dist/release-docs/licenses/LICENSE-jcommander.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jcommander.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-jersey-core.txt b/computer-dist/release-docs/licenses/LICENSE-jersey-core.txt deleted file mode 100644 index 2355a4cb8..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jersey-core.txt +++ /dev/null @@ -1,350 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. diff --git a/computer-dist/release-docs/licenses/LICENSE-jersey-json.txt b/computer-dist/release-docs/licenses/LICENSE-jersey-json.txt deleted file mode 100644 index 2355a4cb8..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jersey-json.txt +++ /dev/null @@ -1,350 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. diff --git a/computer-dist/release-docs/licenses/LICENSE-jersey-servlet.txt b/computer-dist/release-docs/licenses/LICENSE-jersey-servlet.txt deleted file mode 100644 index 2355a4cb8..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jersey-servlet.txt +++ /dev/null @@ -1,350 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. diff --git a/computer-dist/release-docs/licenses/LICENSE-jetcd-common.txt b/computer-dist/release-docs/licenses/LICENSE-jetcd-common.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetcd-common.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-jetcd-core.txt b/computer-dist/release-docs/licenses/LICENSE-jetcd-core.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetcd-core.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-jettison.txt b/computer-dist/release-docs/licenses/LICENSE-jettison.txt deleted file mode 100644 index 6884c4d05..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jettison.txt +++ /dev/null @@ -1,192 +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 - - Copyright 2006 Envoi Solutions LLC - - 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. - diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-http.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-http.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-http.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-io.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-io.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-io.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-security.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-security.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-security.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-server.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-server.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-server.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-servlet.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-servlet.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-servlet.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-util-ajax.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-util-ajax.txt deleted file mode 100644 index e0fe9235d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-util-ajax.txt +++ /dev/null @@ -1,292 +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. - - ---------------------------------------------------------------------------- - -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. - diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-util.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-util.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-util.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-webapp.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-webapp.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-webapp.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jetty-xml.txt b/computer-dist/release-docs/licenses/LICENSE-jetty-xml.txt deleted file mode 100644 index 75d1e1a3d..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jetty-xml.txt +++ /dev/null @@ -1,290 +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. - - ---------------------------------------------------------------------------------------------- -Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: - -i)changes to the Program, and - -ii)additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor’s behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient’s responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor’s responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient’s patent(s), then such Recipient’s rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient’s rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient’s rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient’s obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jline.txt b/computer-dist/release-docs/licenses/LICENSE-jline.txt deleted file mode 100644 index 2ec539d10..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jline.txt +++ /dev/null @@ -1,32 +0,0 @@ -Copyright (c) 2002-2006, Marc Prud'hommeaux -All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the following -conditions are met: - -Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with -the distribution. - -Neither the name of JLine nor the names of its contributors -may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-joda-time.txt b/computer-dist/release-docs/licenses/LICENSE-joda-time.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-joda-time.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-joni.txt b/computer-dist/release-docs/licenses/LICENSE-joni.txt deleted file mode 100644 index 3b3365430..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-joni.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 JRuby Team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jsch.txt b/computer-dist/release-docs/licenses/LICENSE-jsch.txt deleted file mode 100644 index 9edac0271..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jsch.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2002-2015 Atsuhiko Yamanaka, JCraft,Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-json-smart.txt b/computer-dist/release-docs/licenses/LICENSE-json-smart.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-json-smart.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-jsr305.txt b/computer-dist/release-docs/licenses/LICENSE-jsr305.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-jsr305.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-junit.txt b/computer-dist/release-docs/licenses/LICENSE-junit.txt deleted file mode 100644 index fb686291a..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-junit.txt +++ /dev/null @@ -1,214 +0,0 @@ -JUnit - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are -not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to -reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Contribution of such Contributor, if any, and -such derivative works, in source code and object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under -Licensed Patents to make, use, sell, offer to sell, import and otherwise -transfer the Contribution of such Contributor, if any, in source code and -object code form. This patent license shall apply to the combination of the -Contribution and the Program if, at the time the Contribution is added by the -Contributor, such addition of the Contribution causes such combination to be -covered by the Licensed Patents. The patent license shall not apply to any -other combinations which include the Contribution. No hardware per se is -licensed hereunder. - - c) Recipient understands that although each Contributor grants the -licenses to its Contributions set forth herein, no assurances are provided by -any Contributor that the Program does not infringe the patent or other -intellectual property rights of any other entity. Each Contributor disclaims -any liability to Recipient for claims brought by any other entity based on -infringement of intellectual property rights or otherwise. As a condition to -exercising the rights and licenses granted hereunder, each Recipient hereby -assumes sole responsibility to secure any other intellectual property rights -needed, if any. For example, if a third party patent license is required to -allow Recipient to distribute the Program, it is Recipient's responsibility to -acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient -copyright rights in its Contribution, if any, to grant the copyright license -set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement are -offered by that Contributor alone and not by any other party; and - - iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on -or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the -Program. - -Contributors may not remove or alter any copyright notices contained within the -Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may -participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each -Recipient is solely responsible for determining the appropriateness of using -and distributing the Program and assumes all risks associated with its exercise -of rights under this Agreement, including but not limited to the risks and -costs of program errors, compliance with applicable laws, damage to or loss of -data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other software or -hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation is -filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue -and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to -serve as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The Program -(including Contributions) may always be distributed subject to the version of -the Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly stated -in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to -the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial -in any resulting litigation. - diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-admin.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-admin.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-admin.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-client.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-client.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-client.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-common.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-common.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-common.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-core.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-core.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-core.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-crypto.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-crypto.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-crypto.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-identity.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-identity.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-identity.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-server.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-server.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-server.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerb-util.txt b/computer-dist/release-docs/licenses/LICENSE-kerb-util.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerb-util.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerby-asn1.txt b/computer-dist/release-docs/licenses/LICENSE-kerby-asn1.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerby-asn1.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerby-pkix.txt b/computer-dist/release-docs/licenses/LICENSE-kerby-pkix.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerby-pkix.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerby-util.txt b/computer-dist/release-docs/licenses/LICENSE-kerby-util.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerby-util.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kerby-xdr.txt b/computer-dist/release-docs/licenses/LICENSE-kerby-xdr.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kerby-xdr.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt b/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk7.txt b/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk7.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk7.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk8.txt b/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk8.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib-jdk8.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-client.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-client.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-client.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-admissionregistration.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-admissionregistration.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-admissionregistration.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apps.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apps.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apps.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-batch.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-batch.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-batch.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-certificates.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-certificates.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-certificates.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-common.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-common.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-common.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-coordination.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-coordination.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-coordination.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-core.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-core.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-core.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-discovery.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-discovery.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-discovery.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-events.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-events.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-events.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-extensions.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-extensions.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-extensions.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-flowcontrol.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-flowcontrol.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-flowcontrol.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-networking.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-networking.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-networking.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-node.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-node.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-node.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-policy.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-policy.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-policy.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-rbac.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-rbac.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-rbac.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-scheduling.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-scheduling.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-scheduling.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-storageclass.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-storageclass.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-storageclass.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-server-mock.txt b/computer-dist/release-docs/licenses/LICENSE-kubernetes-server-mock.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-kubernetes-server-mock.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-lightning-csv.txt b/computer-dist/release-docs/licenses/LICENSE-lightning-csv.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-lightning-csv.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-listenablefuture.txt b/computer-dist/release-docs/licenses/LICENSE-listenablefuture.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-listenablefuture.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-log4j-api.txt b/computer-dist/release-docs/licenses/LICENSE-log4j-api.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-log4j-api.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-log4j-core.txt b/computer-dist/release-docs/licenses/LICENSE-log4j-core.txt deleted file mode 100644 index 6279e5206..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-log4j-core.txt +++ /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 1999-2005 The Apache Software Foundation - - 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. diff --git a/computer-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt b/computer-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-log4j.txt b/computer-dist/release-docs/licenses/LICENSE-log4j.txt deleted file mode 100644 index 6279e5206..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-log4j.txt +++ /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 1999-2005 The Apache Software Foundation - - 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. diff --git a/computer-dist/release-docs/licenses/LICENSE-logging-interceptor.txt b/computer-dist/release-docs/licenses/LICENSE-logging-interceptor.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-logging-interceptor.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-lookout-api.txt b/computer-dist/release-docs/licenses/LICENSE-lookout-api.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-lookout-api.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-lz4-java.txt b/computer-dist/release-docs/licenses/LICENSE-lz4-java.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-lz4-java.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-minio.txt b/computer-dist/release-docs/licenses/LICENSE-minio.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-minio.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-mockito-core.txt b/computer-dist/release-docs/licenses/LICENSE-mockito-core.txt deleted file mode 100644 index e0840a446..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-mockito-core.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-mvel2.txt b/computer-dist/release-docs/licenses/LICENSE-mvel2.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-mvel2.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-netty-all.txt b/computer-dist/release-docs/licenses/LICENSE-netty-all.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-netty-all.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-netty.txt b/computer-dist/release-docs/licenses/LICENSE-netty.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-netty.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-nimbus-jose-jwt.txt b/computer-dist/release-docs/licenses/LICENSE-nimbus-jose-jwt.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-nimbus-jose-jwt.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-objenesis.txt b/computer-dist/release-docs/licenses/LICENSE-objenesis.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-objenesis.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-okhttp.txt b/computer-dist/release-docs/licenses/LICENSE-okhttp.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-okhttp.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-okio-jvm.txt b/computer-dist/release-docs/licenses/LICENSE-okio-jvm.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-okio-jvm.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-okio.txt b/computer-dist/release-docs/licenses/LICENSE-okio.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-okio.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-opentracing-mock.txt b/computer-dist/release-docs/licenses/LICENSE-opentracing-mock.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-opentracing-mock.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-opentracing-noop.txt b/computer-dist/release-docs/licenses/LICENSE-opentracing-noop.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-opentracing-noop.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-opentracing-util.txt b/computer-dist/release-docs/licenses/LICENSE-opentracing-util.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-opentracing-util.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-ow2-asm.txt b/computer-dist/release-docs/licenses/LICENSE-ow2-asm.txt deleted file mode 100644 index 55761edde..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-ow2-asm.txt +++ /dev/null @@ -1,29 +0,0 @@ -ASM is released under the following 3-Clause BSD License: - -ASM: a very small and fast Java bytecode manipulation framework -Copyright (c) 2000-2011 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. diff --git a/computer-dist/release-docs/licenses/LICENSE-paranamer.txt b/computer-dist/release-docs/licenses/LICENSE-paranamer.txt deleted file mode 100644 index 991c5644c..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-paranamer.txt +++ /dev/null @@ -1,29 +0,0 @@ -[ ParaNamer used to be 'Pubic Domain', but since it includes a small piece of ASM it is now the same license as that: BSD ] - - Portions copyright (c) 2006-2018 Paul Hammant & ThoughtWorks Inc - Portions copyright (c) 2000-2007 INRIA, France Telecom - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-perfmark-api.txt b/computer-dist/release-docs/licenses/LICENSE-perfmark-api.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-perfmark-api.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt b/computer-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-protobuf-java-util.txt b/computer-dist/release-docs/licenses/LICENSE-protobuf-java-util.txt deleted file mode 100644 index 07904582c..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-protobuf-java-util.txt +++ /dev/null @@ -1,32 +0,0 @@ -Copyright 2008 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation andor other materials provided with the -distribution. - Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-protobuf-java.txt b/computer-dist/release-docs/licenses/LICENSE-protobuf-java.txt deleted file mode 100644 index 07904582c..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-protobuf-java.txt +++ /dev/null @@ -1,32 +0,0 @@ -Copyright 2008 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation andor other materials provided with the -distribution. - Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-re2j.txt b/computer-dist/release-docs/licenses/LICENSE-re2j.txt deleted file mode 100644 index 6a66aea5e..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-re2j.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/computer-dist/release-docs/licenses/LICENSE-resourcecify-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-resourcecify-annotations.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-resourcecify-annotations.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-converter.txt b/computer-dist/release-docs/licenses/LICENSE-sfm-converter.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sfm-converter.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-map.txt b/computer-dist/release-docs/licenses/LICENSE-sfm-map.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sfm-map.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-reflect.txt b/computer-dist/release-docs/licenses/LICENSE-sfm-reflect.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sfm-reflect.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-tuples.txt b/computer-dist/release-docs/licenses/LICENSE-sfm-tuples.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sfm-tuples.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-util.txt b/computer-dist/release-docs/licenses/LICENSE-sfm-util.txt deleted file mode 100644 index d91d902c3..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sfm-util.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Arnaud Roger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-simple-xml-safe.txt b/computer-dist/release-docs/licenses/LICENSE-simple-xml-safe.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-simple-xml-safe.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-slf4j-api.txt b/computer-dist/release-docs/licenses/LICENSE-slf4j-api.txt deleted file mode 100644 index f687729a0..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-slf4j-api.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2004-2022 QOS.ch Sarl (Switzerland) -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/computer-dist/release-docs/licenses/LICENSE-snakeyaml.txt b/computer-dist/release-docs/licenses/LICENSE-snakeyaml.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-snakeyaml.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-snappy-java.txt b/computer-dist/release-docs/licenses/LICENSE-snappy-java.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-snappy-java.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-sofa-common-tools.txt b/computer-dist/release-docs/licenses/LICENSE-sofa-common-tools.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sofa-common-tools.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-stax2-api.txt b/computer-dist/release-docs/licenses/LICENSE-stax2-api.txt deleted file mode 100644 index 3dc4ce23b..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-stax2-api.txt +++ /dev/null @@ -1,13 +0,0 @@ -This copy of Stax2 API is licensed under the -Simplified BSD License (also known as "2-clause BSD", or "FreeBSD License") -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.opensource.org/licenses/bsd-license.php - -with details of: - - = FasterXML.com - = 2010- \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-sundr-codegen.txt b/computer-dist/release-docs/licenses/LICENSE-sundr-codegen.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sundr-codegen.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-sundr-core.txt b/computer-dist/release-docs/licenses/LICENSE-sundr-core.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-sundr-core.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-swagger-annotations.txt b/computer-dist/release-docs/licenses/LICENSE-swagger-annotations.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-swagger-annotations.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-swagger-core.txt b/computer-dist/release-docs/licenses/LICENSE-swagger-core.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-swagger-core.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-token-provider.txt b/computer-dist/release-docs/licenses/LICENSE-token-provider.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-token-provider.txt +++ /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. diff --git a/computer-dist/release-docs/licenses/LICENSE-tracer-core.txt b/computer-dist/release-docs/licenses/LICENSE-tracer-core.txt deleted file mode 100644 index b0ff39019..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-tracer-core.txt +++ /dev/null @@ -1,201 +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 2018 Ant Financial Services Group Co., Ltd. - - 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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-validation-api.txt b/computer-dist/release-docs/licenses/LICENSE-validation-api.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-validation-api.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-woodstox-core.txt b/computer-dist/release-docs/licenses/LICENSE-woodstox-core.txt deleted file mode 100644 index 7a4a3ea24..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-woodstox-core.txt +++ /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. \ No newline at end of file diff --git a/computer-dist/release-docs/licenses/LICENSE-zjsonpatch.txt b/computer-dist/release-docs/licenses/LICENSE-zjsonpatch.txt deleted file mode 100644 index 261eeb9e9..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-zjsonpatch.txt +++ /dev/null @@ -1,201 +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. diff --git a/computer-dist/release-docs/licenses/LICENSE-zookeeper.txt b/computer-dist/release-docs/licenses/LICENSE-zookeeper.txt deleted file mode 100644 index d64569567..000000000 --- a/computer-dist/release-docs/licenses/LICENSE-zookeeper.txt +++ /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. diff --git a/computer-dist/scripts/apache-release.sh b/computer-dist/scripts/apache-release.sh deleted file mode 100755 index d3b948926..000000000 --- a/computer-dist/scripts/apache-release.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -GROUP="hugegraph" -# current repository name -REPO="${GROUP}-computer" -# release version (input by committer) -RELEASE_VERSION=$1 -USERNAME=$2 -PASSWORD=$3 -# git release branch (check it carefully) -GIT_BRANCH="release-${RELEASE_VERSION}" - -RELEASE_VERSION=${RELEASE_VERSION:?"Please input the release version behind script"} - -WORK_DIR=$( - cd "$(dirname "$0")" || exit - pwd -) -cd "${WORK_DIR}" || exit -echo "In the work dir: $(pwd)" - -# clean old dir then build a new one -rm -rf dist && mkdir -p dist/apache-${REPO} - -# step1: package the source code -cd ../../ || exit -git archive --format=tar.gz \ - --output="computer-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \ - --prefix="apache-${REPO}-incubating-${RELEASE_VERSION}-src/" "${GIT_BRANCH}" || exit -cd - || exit - -# step2: copy the binary file (Optional) -# Note: it's optional for project to generate binary package (skip this step if not need) -#cp -v ../../target/apache-${REPO}-incubating-"${RELEASE_VERSION}".tar.gz \ -# dist/apache-${REPO} || exit - -# step3: sign + hash -##### 3.1 sign in source & binary package -gpg --version 1>/dev/null || exit -cd ./dist/apache-${REPO} || exit -for i in *.tar.gz; do - echo "$i" && gpg --armor --output "$i".asc --detach-sig "$i" -done - -##### 3.2 Generate SHA512 file -shasum --version 1>/dev/null || exit -for i in *.tar.gz; do - shasum -a 512 "$i" | tee "$i".sha512 -done - -#### 3.3 check signature & sha512 -echo "#### start to check signature & hashcode ####" -for i in *.tar.gz; do - echo "$i" - gpg --verify "$i".asc "$i" || exit -done - -for i in *.tar.gz; do - echo "$i" - shasum -a 512 --check "$i".sha512 || exit -done - -# step4: upload to Apache-SVN -SVN_DIR="${GROUP}-svn-dev" -cd ../ || exit -rm -rf ${SVN_DIR} - -##### 4.1 pull from remote & copy files -svn co "https://dist.apache.org/repos/dist/dev/incubator/${GROUP}" ${SVN_DIR} -mkdir -p ${SVN_DIR}/"${RELEASE_VERSION}" -cp -v apache-${REPO}/*tar.gz* "${SVN_DIR}/${RELEASE_VERSION}" -cd ${SVN_DIR} || exit - -##### 4.2 check status first -svn status -svn add --parents "${RELEASE_VERSION}"/apache-${REPO}-* -# check status again -svn status - -##### 4.3 commit & push files -if [ "$USERNAME" = "" ]; then - svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" || exit -else - svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" \ - --username "${USERNAME}" --password "${PASSWORD}" || exit -fi - -echo "Finished all, please check all steps in script manually again!" diff --git a/computer-dist/scripts/dependency/check_dependencies.sh b/computer-dist/scripts/dependency/check_dependencies.sh deleted file mode 100644 index 309063faa..000000000 --- a/computer-dist/scripts/dependency/check_dependencies.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -BASE_PATH=$(cd $(dirname $0); pwd) - -# check whether there are new third-party dependencies by diff command, -# diff generated 'current-dependencies.txt' file with 'known-dependencies.txt' file. -diff -w -B -U0 <(sort < ${BASE_PATH}/known-dependencies.txt) \ -<(sort < ${BASE_PATH}/current-dependencies.txt) > ${BASE_PATH}/result.txt - -# if has new third-party,the Action will fail and print diff -if [ -s ${BASE_PATH}/result.txt ]; then - cat ${BASE_PATH}/result.txt - exit 1 -else - echo 'All third dependencies is known!' -fi diff --git a/computer-dist/scripts/dependency/known-dependencies.txt b/computer-dist/scripts/dependency/known-dependencies.txt deleted file mode 100644 index 02c32880b..000000000 --- a/computer-dist/scripts/dependency/known-dependencies.txt +++ /dev/null @@ -1,276 +0,0 @@ -accessors-smart-1.2.jar -activation-1.1.jar -animal-sniffer-annotations-1.18.jar -annotations-13.0.jar -annotations-4.1.1.4.jar -apiguardian-api-1.1.0.jar -asm-5.0.4.jar -audience-annotations-0.5.0.jar -auto-service-annotations-1.0-rc7.jar -automaton-1.11-8.jar -avro-1.7.7.jar -bcprov-jdk18on-1.74.jar -bolt-1.6.2.jar -builder-annotations-0.13.1.jar -byte-buddy-1.10.20.jar -byte-buddy-agent-1.10.20.jar -checker-qual-3.33.0.jar -checker-qual-3.5.0.jar -commons-beanutils-1.9.3.jar -commons-beanutils-1.9.4.jar -commons-cli-1.2.jar -commons-codec-1.11.jar -commons-codec-1.13.jar -commons-collections-3.2.2.jar -commons-compress-1.18.jar -commons-configuration-1.10.jar -commons-configuration2-2.1.1.jar -commons-configuration2-2.8.0.jar -commons-crypto-1.0.0.jar -commons-io-2.5.jar -commons-io-2.7.jar -commons-lang-2.6.jar -commons-lang3-3.12.0.jar -commons-logging-1.1.1.jar -commons-logging-1.1.3.jar -commons-math3-3.1.1.jar -commons-net-3.6.jar -commons-text-1.9.jar -computer-algorithm-1.3.0.jar -computer-api-1.3.0.jar -computer-core-1.3.0.jar -computer-dist-1.3.0.jar -computer-driver-1.3.0.jar -computer-k8s-1.3.0.jar -computer-k8s-operator-1.3.0.jar -computer-yarn-1.3.0.jar -curator-client-2.13.0.jar -curator-framework-2.13.0.jar -curator-recipes-2.13.0.jar -disruptor-3.3.7.jar -error_prone_annotations-2.3.4.jar -failsafe-2.4.0.jar -failureaccess-1.0.1.jar -findbugs-annotations-1.3.9-1.jar -generex-1.0.2.jar -groovy-all-2.4.21.jar -grpc-api-1.33.0.jar -grpc-context-1.33.0.jar -grpc-core-1.33.0.jar -grpc-grpclb-1.33.0.jar -grpc-netty-1.33.0.jar -grpc-protobuf-1.33.0.jar -grpc-protobuf-lite-1.33.0.jar -grpc-stub-1.33.0.jar -gson-2.2.4.jar -guava-30.0-jre.jar -guava-32.0.1-jre.jar -hadoop-annotations-3.1.2.jar -hadoop-auth-3.1.2.jar -hadoop-common-3.1.2.jar -hadoop-hdfs-client-3.1.2.jar -hamcrest-core-1.3.jar -hbase-client-2.2.3.jar -hbase-common-2.2.3.jar -hbase-hadoop-compat-2.2.3.jar -hbase-hadoop2-compat-2.2.3.jar -hbase-http-2.2.3.jar -hbase-mapreduce-2.2.3.jar -hbase-metrics-2.2.3.jar -hbase-metrics-api-2.2.3.jar -hbase-procedure-2.2.3.jar -hbase-protocol-2.2.3.jar -hbase-protocol-shaded-2.2.3.jar -hbase-replication-2.2.3.jar -hbase-server-2.2.3.jar -hbase-shaded-client-byo-hadoop-2.2.3.jar -hbase-shaded-miscellaneous-2.2.1.jar -hbase-shaded-netty-2.2.1.jar -hbase-shaded-protobuf-2.2.1.jar -hbase-zookeeper-2.2.3.jar -hessian-3.3.7.jar -htrace-core4-4.1.0-incubating.jar -httpclient-4.5.2.jar -httpcore-4.4.4.jar -j2objc-annotations-1.3.jar -j2objc-annotations-2.8.jar -jackson-annotations-2.11.2.jar -jackson-annotations-2.14.0-rc1.jar -jackson-annotations-2.15.2.jar -jackson-core-2.11.2.jar -jackson-core-2.14.0-rc1.jar -jackson-core-2.15.2.jar -jackson-core-asl-1.9.2.jar -jackson-databind-2.11.2.jar -jackson-databind-2.14.0-rc1.jar -jackson-databind-2.15.2.jar -jackson-dataformat-yaml-2.11.2.jar -jackson-dataformat-yaml-2.9.3.jar -jackson-datatype-jsr310-2.11.2.jar -jackson-jaxrs-1.9.2.jar -jackson-jaxrs-base-2.14.0-rc1.jar -jackson-jaxrs-json-provider-2.14.0-rc1.jar -jackson-mapper-asl-1.9.2.jar -jackson-module-jaxb-annotations-2.12.3.jar -jackson-module-jaxb-annotations-2.14.0-rc1.jar -jackson-xc-1.9.2.jar -jakarta.activation-2.0.1.jar -jakarta.activation-api-1.2.1.jar -jakarta.activation-api-1.2.2.jar -jakarta.xml.bind-api-2.3.2.jar -jamon-runtime-2.4.1.jar -javassist-3.20.0-GA.jar -javassist-3.28.0-GA.jar -javax.el-3.0.1-b12.jar -javax.inject-2.5.0-b32.jar -javax.json-1.0.jar -javax.servlet-api-3.1.0.jar -javax.servlet.jsp-2.3.2.jar -javax.servlet.jsp-api-2.3.1.jar -jaxb-api-2.2.2.jar -jaxb-core-3.0.2.jar -jaxb-impl-2.2.3-1.jar -jaxb-impl-3.0.2.jar -jcip-annotations-1.0-1.jar -jcodings-1.0.18.jar -jcommander-1.78.jar -jersey-container-servlet-core-2.25.1.jar -jersey-core-1.19.jar -jersey-json-1.19.jar -jersey-server-1.19.jar -jersey-servlet-1.19.jar -jetcd-common-0.5.4.jar -jetcd-core-0.5.4.jar -jettison-1.1.jar -jetty-http-9.3.24.v20180605.jar -jetty-io-9.3.24.v20180605.jar -jetty-security-9.3.24.v20180605.jar -jetty-server-9.3.24.v20180605.jar -jetty-servlet-9.3.24.v20180605.jar -jetty-util-9.3.24.v20180605.jar -jetty-util-ajax-9.3.27.v20190418.jar -jetty-webapp-9.3.24.v20180605.jar -jetty-xml-9.3.24.v20180605.jar -jline-0.9.94.jar -joda-time-2.10.8.jar -joni-2.1.11.jar -jsch-0.1.54.jar -json-smart-2.3.jar -jsp-api-2.1.jar -jsr305-3.0.1.jar -jsr305-3.0.2.jar -junit-4.12.jar -junit-4.13.1.jar -junit-jupiter-api-5.7.2.jar -junit-platform-commons-1.7.2.jar -kerb-admin-1.0.1.jar -kerb-client-1.0.1.jar -kerb-common-1.0.1.jar -kerb-core-1.0.1.jar -kerb-crypto-1.0.1.jar -kerb-identity-1.0.1.jar -kerb-server-1.0.1.jar -kerb-simplekdc-1.0.1.jar -kerb-util-1.0.1.jar -kerby-asn1-1.0.1.jar -kerby-config-1.0.1.jar -kerby-pkix-1.0.1.jar -kerby-util-1.0.1.jar -kerby-xdr-1.0.1.jar -kotlin-stdlib-1.6.20.jar -kotlin-stdlib-common-1.5.31.jar -kotlin-stdlib-common-1.6.20.jar -kotlin-stdlib-jdk7-1.6.10.jar -kotlin-stdlib-jdk7-1.6.20.jar -kotlin-stdlib-jdk8-1.6.10.jar -kotlin-stdlib-jdk8-1.6.20.jar -kubernetes-client-5.6.0.jar -kubernetes-model-admissionregistration-5.6.0.jar -kubernetes-model-apiextensions-5.6.0.jar -kubernetes-model-apps-5.6.0.jar -kubernetes-model-autoscaling-5.6.0.jar -kubernetes-model-batch-5.6.0.jar -kubernetes-model-certificates-5.6.0.jar -kubernetes-model-common-5.6.0.jar -kubernetes-model-coordination-5.6.0.jar -kubernetes-model-core-5.6.0.jar -kubernetes-model-discovery-5.6.0.jar -kubernetes-model-events-5.6.0.jar -kubernetes-model-extensions-5.6.0.jar -kubernetes-model-flowcontrol-5.6.0.jar -kubernetes-model-metrics-5.6.0.jar -kubernetes-model-networking-5.6.0.jar -kubernetes-model-node-5.6.0.jar -kubernetes-model-policy-5.6.0.jar -kubernetes-model-rbac-5.6.0.jar -kubernetes-model-scheduling-5.6.0.jar -kubernetes-model-storageclass-5.6.0.jar -kubernetes-server-mock-5.6.0.jar -lightning-csv-8.2.1.jar -listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar -log4j-1.2.17.jar -log4j-api-2.18.0.jar -log4j-core-2.18.0.jar -log4j-slf4j-impl-2.18.0.jar -logging-interceptor-3.12.12.jar -logging-interceptor-4.10.0.jar -lookout-api-1.4.1.jar -lz4-java-1.4.0.jar -metrics-core-3.2.6.jar -minio-8.5.6.jar -mockito-core-3.8.0.jar -mockwebserver-0.1.8.jar -mvel2-2.4.13.Final.jar -netty-3.10.6.Final.jar -netty-all-4.1.42.Final.jar -nimbus-jose-jwt-4.41.1.jar -objenesis-3.1.jar -okhttp-3.12.12.jar -okhttp-4.10.0.jar -okhttp-4.11.0.jar -okio-1.15.0.jar -okio-3.2.0.jar -okio-jvm-3.0.0.jar -okio-jvm-3.2.0.jar -opentest4j-1.2.0.jar -opentracing-api-0.22.0.jar -opentracing-mock-0.22.0.jar -opentracing-noop-0.22.0.jar -opentracing-util-0.22.0.jar -ow2-asm-6.2.jar -paranamer-2.3.jar -perfmark-api-0.19.0.jar -proto-google-common-protos-1.17.0.jar -protobuf-java-3.12.0.jar -protobuf-java-util-3.12.0.jar -re2j-1.1.jar -resourcecify-annotations-0.13.1.jar -sfm-converter-8.2.1.jar -sfm-csv-8.2.1.jar -sfm-map-8.2.1.jar -sfm-reflect-8.2.1.jar -sfm-tuples-8.2.1.jar -sfm-util-8.2.1.jar -simple-xml-safe-2.7.1.jar -slf4j-api-1.7.25.jar -slf4j-api-1.7.30.jar -slf4j-api-1.7.31.jar -snakeyaml-1.18.jar -snakeyaml-1.26.jar -snappy-java-1.1.10.1.jar -sofa-common-tools-1.0.12.jar -sofa-rpc-all-5.7.6.jar -stax-api-1.0-2.jar -stax2-api-3.1.4.jar -sundr-codegen-0.13.1.jar -sundr-core-0.13.1.jar -swagger-annotations-1.5.18.jar -swagger-core-1.5.18.jar -swagger-models-1.5.18.jar -token-provider-1.0.1.jar -tracer-core-3.0.8.jar -validation-api-1.1.0.Final.jar -woodstox-core-5.0.3.jar -xz-1.8.jar -zjsonpatch-0.3.0.jar -zookeeper-3.4.13.jar diff --git a/computer-dist/scripts/dependency/regenerate_known_dependencies.sh b/computer-dist/scripts/dependency/regenerate_known_dependencies.sh deleted file mode 100644 index b63e7b3a8..000000000 --- a/computer-dist/scripts/dependency/regenerate_known_dependencies.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -BASE_PATH=$(cd $(dirname $0); pwd) -DEP_PATH=$BASE_PATH/all_dependencies -FILE_NAME=${1:-known-dependencies.txt} - -if [[ -d $DEP_PATH ]];then - echo "rm -r -f DEP_PATH" - rm -r -f $DEP_PATH -fi - -cd $BASE_PATH/../../../ - -mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=$DEP_PATH - -ls $DEP_PATH | egrep -v "^hugegraph" | sort -n > $BASE_PATH/$FILE_NAME -rm -r -f $DEP_PATH diff --git a/computer-dist/src/assembly/dataset/schema.groovy b/computer-dist/src/assembly/dataset/schema.groovy deleted file mode 100644 index 80b4a8b52..000000000 --- a/computer-dist/src/assembly/dataset/schema.groovy +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -// Define schema -schema.propertyKey("id").asInt().ifNotExist().create(); -schema.propertyKey("rate").asDouble().ifNotExist().create(); -schema.propertyKey("title").asText().ifNotExist().create(); -schema.propertyKey("tag").asText().ifNotExist().create(); -schema.propertyKey("genres").asText().valueSet().ifNotExist().create(); -schema.propertyKey("timestamp").asText().ifNotExist().create(); - -schema.vertexLabel("user") - .properties("id") - .primaryKeys("id") - .ifNotExist() - .create(); -schema.vertexLabel("movie") - .properties("id", "title", "genres") - .primaryKeys("id") - .ifNotExist() - .create(); - -schema.edgeLabel("rating") - .sourceLabel("user") - .targetLabel("movie") - .properties("rate", "timestamp") - .ifNotExist() - .create(); -schema.edgeLabel("taged") - .sourceLabel("user") - .targetLabel("movie") - .properties("tag", "timestamp") - .ifNotExist() - .create(); diff --git a/computer-dist/src/assembly/dataset/struct.json b/computer-dist/src/assembly/dataset/struct.json deleted file mode 100644 index c1d8be1ec..000000000 --- a/computer-dist/src/assembly/dataset/struct.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "version": "2.0", - "structs": [ - { - "id": "1", - "skip": false, - "input": { - "type": "FILE", - "path": "/dataset/ml-latest-small/ratings.csv", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "userId", - "movieId", - "rating", - "timestamp" - ], - "charset": "UTF-8", - "list_format": null - }, - "vertices": [ - { - "label": "user", - "skip": false, - "id": null, - "unfold": false, - "field_mapping": { - "userId": "id" - }, - "value_mapping": {}, - "selected": [ - "userId" - ], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ], - "edges": [ - { - "label": "rating", - "skip": false, - "source": [ - "userId" - ], - "unfold_source": false, - "target": [ - "movieId" - ], - "unfold_target": false, - "field_mapping": { - "userId": "id", - "movieId": "id", - "rating": "rate", - "timestamp": "timestamp" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ] - }, - { - "id": "2", - "skip": false, - "input": { - "type": "FILE", - "path": "/dataset/ml-latest-small/tags.csv", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "userId", - "movieId", - "tag", - "timestamp" - ], - "charset": "UTF-8", - "list_format": null - }, - "vertices": [ - { - "label": "user", - "skip": false, - "id": null, - "unfold": false, - "field_mapping": { - "userId": "id" - }, - "value_mapping": {}, - "selected": [ - "userId" - ], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ], - "edges": [ - { - "label": "taged", - "skip": false, - "source": [ - "userId" - ], - "unfold_source": false, - "target": [ - "movieId" - ], - "unfold_target": false, - "field_mapping": { - "userId": "id", - "movieId": "id", - "tag": "tag", - "timestamp": "timestamp" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ] - }, - { - "id": "3", - "skip": false, - "input": { - "type": "FILE", - "path": "/dataset/ml-latest-small/movies.csv", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "movieId", - "title", - "genres" - ], - "charset": "UTF-8", - "list_format": { - "start_symbol": "", - "elem_delimiter": "|", - "end_symbol": "" - } - }, - "vertices": [ - { - "label": "movie", - "skip": false, - "id": null, - "unfold": false, - "field_mapping": { - "movieId": "id" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ], - "edges": [] - } - ] -} diff --git a/computer-dist/src/assembly/descriptor/assembly.xml b/computer-dist/src/assembly/descriptor/assembly.xml deleted file mode 100644 index 68efd1a2a..000000000 --- a/computer-dist/src/assembly/descriptor/assembly.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - distribution - false - - - dir - - - - - ${assembly.static.dir}/bin - bin - - * - - 755 - - - ${assembly.static.dir} - / - false - - - - README.txt - - - - ${project.build.directory} - lib - - *.jar - - - - ${top.level.dir}/computer-dist/release-docs/ - / - - - ${top.level.dir} - / - - DISCLAIMER* - - - - - - - - /lib - false - runtime - false - - *:*:jar:* - - - - - diff --git a/computer-dist/src/assembly/static/bin/start-computer.sh b/computer-dist/src/assembly/static/bin/start-computer.sh deleted file mode 100644 index 8619949d4..000000000 --- a/computer-dist/src/assembly/static/bin/start-computer.sh +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -BIN_DIR=$(cd "$(dirname "$0")" && pwd -P) -BASE_DIR=$(cd "${BIN_DIR}/.." && pwd -P) -LIB_DIR=${BASE_DIR}/lib -CONF_DIR="${BASE_DIR}/conf" -DEFAULT_ALGORITHM_DIR="${BASE_DIR}/algorithm" - -COMPUTER_CONF_PATH="${COMPUTER_CONF_PATH}" -LOG4J_CONF_PATH="${LOG4J_CONF_PATH}" -JAR_FILE_PATH="${JAR_FILE_PATH}" -DRIVE= -K8S_DRIVE="k8s" -YARN_DRIVE="yarn" -LOCAL_DRIVE="local" -ROLE= -ROLE_MASTER="master" -ROLE_WORKER="worker" - -usage() { - echo "Usage:" - echo " start-computer.sh" - echo " [-c|--conf conf_file_path>" - echo " [-a|--algorithm algorithm_jar_path>" - echo " [-l|--log4 log4_conf_path]" - echo " <-d|--drive drive_type(local|k8s|yarn)>" - echo " <-r|--role role(master|worker)>" -} - -if [ $# -lt 4 ]; then - usage -fi - -check_empty() { - if [ "$2" = "" ]; then - echo $1 - exit 1 - fi -} - -check_file_readable() { - if [ ! -r "$2" ]; then - echo $1 - exit 1 - fi -} - -check_file_executable() { - if [ ! -x "$1" ]; then - echo $2 - exit 1 - fi -} - -parse_opts() { - while true ; do - if [ -z "$1" ]; then - break - fi - - case "$1" in - -c|--conf) - check_empty "conf file can't be empty" $2 - check_file_readable "file $2 doesn't have read permission" $2 - COMPUTER_CONF_PATH=$2 - shift 2 ;; - -l|--log4) - check_empty "log conf file can't be empty" $2 - check_file_readable "file $2 doesn't have read permission" $2 - LOG4J_CONF_PATH=$2 - shift 2 ;; - -a|--algorithm) - check_empty "algorithm jar file can't be empty" $2 - check_file_readable "file $2 doesn't have read permission" $2 - JAR_FILE_PATH=$2 - shift 2 ;; - -d|--drive) - check_empty "driver can't be empty" $1 - case "$2" in - ${K8S_DRIVE}) - DRIVE=${K8S_DRIVE} - ;; - ${YARN_DRIVE}) - DRIVE=${YARN_DRIVE} - ;; - ${LOCAL_DRIVE}) - DRIVE=${LOCAL_DRIVE} - ;; - *) - echo "unknown drive %2, must be k8s|yarn|local" - exit 1 - esac - shift 2;; - -r|--role) - case "$2" in - ${ROLE_MASTER}) - ROLE=${ROLE_MASTER} - ;; - ${ROLE_WORKER}) - ROLE=${ROLE_WORKER} - ;; - *) - echo "unknown role %2, must be master|worker" - exit 1 - esac - shift 2;; - *) echo "unknown options -$1-" ; usage; exit 1 ;; - esac - done -} - -parse_opts $* - -if [ "${COMPUTER_CONF_PATH}" = "" ]; then - if [ "$DRIVE" = "$K8S_DRIVE" ]; then - echo "conf file is missing"; - usage; - exit 1; - fi - COMPUTER_CONF_PATH=${CONF_DIR}/computer.properties -fi - -if [ "${DRIVE}" = "" ]; then - echo "drive is missing"; - usage; - exit 1; -fi - -if [ "${ROLE}" = "" ]; then - echo "role is missing"; - usage; - exit 1; -fi - -if [ "${LOG4J_CONF_PATH}" = "" ];then - LOG4J_CONF_PATH=${CONF_DIR}/log4j2.xml -fi - -echo "************************************" -echo "COMPUTER_CONF_PATH=${COMPUTER_CONF_PATH}" -echo "LOG4J_CONF_PATH=${LOG4J_CONF_PATH}" -echo "ALGORITHM_JAR_FILE_PATH=${JAR_FILE_PATH}" -echo "DRIVE=${DRIVE}" -echo "ROLE=${ROLE}" -echo "************************************" - -CP=$(find "${LIB_DIR}" -name "*.jar" | tr "\n" ":") - -CP=${CP}:"${DEFAULT_ALGORITHM_DIR}/*" - -if [ "${JAR_FILE_PATH}" != "" ]; then - CP=${CP}:${JAR_FILE_PATH} -fi - -# Download remote job JAR file. -if [[ "${REMOTE_JAR_URI}" == http://* || "${REMOTE_JAR_URI}" == https://* ]]; then - mkdir -p "${BASE_DIR}/job" - echo "Downloading job JAR ${REMOTE_JAR_URI} to ${BASE_DIR}/job/" - wget -nv -P "${BASE_DIR}/job/" "${REMOTE_JAR_URI}" - JOB_JAR=$(find "${BASE_DIR}/job" -name "*.jar" | tr "\n" ":") - if [[ "$JOB_JAR" != "" ]]; then - CP="${JOB_JAR}"$CP - fi -elif [[ "${REMOTE_JAR_URI}" != "" ]]; then - echo "Unsupported protocol for ${REMOTE_JAR_URI}" - exit 1 -fi - -# Find Java -if [ "$JAVA_HOME" = "" ]; then - JAVA="java -server" -else - JAVA="$JAVA_HOME/bin/java -server" -fi - -# Set up count of cpu if it unspecified from k8s drive, -# avoid `Runtime.getRuntime().availableProcessors()` always return 1 -if [[ "${DRIVE}" = "${K8S_DRIVE}" && -z "${CPU_LIMIT}" ]]; then - PROCESSOR_COUNT="$(cat /proc/cpuinfo | grep "processor" | wc -l)" - let MAX_PROCESSOR_COUNT=8 - if [[ ${PROCESSOR_COUNT} -gt ${MAX_PROCESSOR_COUNT} ]]; then - PROCESSOR_COUNT="$MAX_PROCESSOR_COUNT" - fi - JAVA_OPTS="${JAVA_OPTS} -XX:ActiveProcessorCount=${PROCESSOR_COUNT}" -fi - -if [ ! -a "${CONF_DIR}" ];then - mkdir -p "${CONF_DIR}" -fi - -if [ "$DRIVE" = "$K8S_DRIVE" ]; then - COPY_CONF_DIR="${CONF_DIR}/copy" - if [ ! -a "${COPY_CONF_DIR}" ]; then - mkdir -p "${COPY_CONF_DIR}" - chmod 777 "${COPY_CONF_DIR}" - fi - - NEW_COMPUTER_CONF_PATH="${COPY_CONF_DIR}/$(basename "${COMPUTER_CONF_PATH}")" - envsubst '${POD_IP},${HOSTNAME},${POD_NAME},${POD_NAMESPACE}' < "${COMPUTER_CONF_PATH}" > "${NEW_COMPUTER_CONF_PATH}" - chmod 777 "${NEW_COMPUTER_CONF_PATH}" - COMPUTER_CONF_PATH=${NEW_COMPUTER_CONF_PATH} -fi - -LOG4j_CONF=-Dlog4j.configurationFile="${LOG4J_CONF_PATH}" - -if [ "${ROLE}" = "${ROLE_MASTER}" ]; then - LOG_NAME=-Dlog.name=hugegraph-computer-master -fi - -if [ "${ROLE}" = "${ROLE_WORKER}" ]; then - LOG_NAME=-Dlog.name=hugegraph-computer-worker -fi - -MAIN_CLASS=org.apache.hugegraph.computer.dist.HugeGraphComputer - -exec ${JAVA} -Dname="hugegraph-computer" "${LOG4j_CONF}" ${LOG_NAME} ${JAVA_OPTS} ${JVM_OPTIONS} \ - -cp "${CP}" ${MAIN_CLASS} "${COMPUTER_CONF_PATH}" ${ROLE} ${DRIVE} diff --git a/computer-dist/src/assembly/static/conf/computer.properties b/computer-dist/src/assembly/static/conf/computer.properties deleted file mode 100644 index c687b7eb8..000000000 --- a/computer-dist/src/assembly/static/conf/computer.properties +++ /dev/null @@ -1,37 +0,0 @@ -# -# 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. -# -job.id=local_001 -job.workers_count=1 - -transport.server_host=127.0.0.1 -transport.server_port=0 - -rpc.server_host=127.0.0.1 -rpc.server_port=8190 - -bsp.etcd_endpoints=http://127.0.0.1:2379 - -hugegraph.url=http://127.0.0.1:8080 -hugegraph.name=hugegraph -hugegraph.username= -hugegraph.password= - -algorithm.params_class=org.apache.hugegraph.computer.algorithm.centrality.pagerank.PageRankParams - -bsp.register_timeout=100000 -bsp.log_interval=30000 -bsp.max_super_step=2 diff --git a/computer-dist/src/assembly/static/conf/log4j2.xml b/computer-dist/src/assembly/static/conf/log4j2.xml deleted file mode 100644 index 5eb602c50..000000000 --- a/computer-dist/src/assembly/static/conf/log4j2.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - logs - ${sys:log.name:-hugegraph-computer} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/computer-dist/src/assembly/travis/build-images.sh b/computer-dist/src/assembly/travis/build-images.sh deleted file mode 100755 index 1cc0d6028..000000000 --- a/computer-dist/src/assembly/travis/build-images.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# -set -ev - -BASE_DIR=$(cd "$(dirname "$0")" && pwd -P) -PROJECT_PATH="$(cd "${BASE_DIR}/../../../.." && pwd -P)" -PROJECT_POM_PATH="${PROJECT_PATH}/pom.xml" - -mvn -f "${PROJECT_POM_PATH}" clean package -DskipTests - -CONTEXT_PATH=$(mvn -f "${PROJECT_POM_PATH}" -q -N \ - org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ - -Dexec.executable='echo' -Dexec.args='${final.name}') - CONTEXT_PATH="${PROJECT_PATH}/${CONTEXT_PATH}" - -docker build -t $1 $CONTEXT_PATH -f $PROJECT_PATH/computer-dist/Dockerfile - -docker build -t $2 -f $PROJECT_PATH/computer-k8s-operator/Dockerfile $PROJECT_PATH/computer-k8s-operator diff --git a/computer-dist/src/assembly/travis/install-env.sh b/computer-dist/src/assembly/travis/install-env.sh deleted file mode 100755 index 127d84fb2..000000000 --- a/computer-dist/src/assembly/travis/install-env.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# -set -ev - -TRAVIS_DIR=$(dirname "$0") - -sh "${TRAVIS_DIR}"/start-etcd.sh -echo "Installing requirements..." diff --git a/computer-dist/src/assembly/travis/install-hdfs.sh b/computer-dist/src/assembly/travis/install-hdfs.sh deleted file mode 100755 index 2394c31cc..000000000 --- a/computer-dist/src/assembly/travis/install-hdfs.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# 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. -# -set -ev - -ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa -cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys -chmod 0600 ~/.ssh/authorized_keys -ssh-keyscan -H localhost >> ~/.ssh/known_hosts -chmod 0600 ~/.ssh/known_hosts -eval `ssh-agent` -ssh-add ~/.ssh/id_rsa - -cd ~/ -tar -zxf hadoop-3.3.2.tar.gz -C /opt -cd /opt -mv hadoop-3.3.2 hadoop -cd hadoop -pwd - -echo "export HADOOP_HOME=/opt/hadoop" >> ~/.bashrc -echo "export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin" >> ~/.bashrc - -source ~/.bashrc - -tee etc/hadoop/core-site.xml < - - fs.defaultFS - hdfs://localhost:9000 - - -EOF - -tee etc/hadoop/hdfs-site.xml < - - dfs.replication - 1 - - - dfs.secondary.http.address - localhost:9100 - - -EOF - -bin/hdfs namenode -format -sbin/hadoop-daemon.sh start namenode -sbin/hadoop-daemon.sh start datanode -jps diff --git a/computer-dist/src/assembly/travis/install-hugegraph-from-source.sh b/computer-dist/src/assembly/travis/install-hugegraph-from-source.sh deleted file mode 100755 index b5365caa9..000000000 --- a/computer-dist/src/assembly/travis/install-hugegraph-from-source.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -# Note: this script is not used in github-ci now, keep it for other env -set -ev - -if [[ $# -ne 1 ]]; then - echo "Must pass commit id of hugegraph repo" - exit 1 -fi - -COMMIT_ID=$1 -HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git" - -git clone --depth 100 ${HUGEGRAPH_GIT_URL} hugegraph -cd hugegraph -git checkout "${COMMIT_ID}" -mvn package -DskipTests -ntp - -mv apache-hugegraph-*.tar.gz ../ -cd ../ -rm -rf hugegraph -tar zxf apache-hugegraph-*.tar.gz -rm apache-hugegraph-*.tar.gz -cd "$(find apache-hugegraph-* | head -1)" -chmod -R 755 bin/ - -bin/init-store.sh || exit 1 -bin/start-hugegraph.sh || cat logs/hugegraph-server.log - -cd ../ diff --git a/computer-dist/src/assembly/travis/load-data-into-hugegraph.sh b/computer-dist/src/assembly/travis/load-data-into-hugegraph.sh deleted file mode 100755 index b448b6619..000000000 --- a/computer-dist/src/assembly/travis/load-data-into-hugegraph.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -set -ev - -TRAVIS_DIR=$(dirname "$0") -DATASET_DIR=${TRAVIS_DIR}/../dataset - -docker network create ci -# Note: we need wait for server start finished, so start it first -docker run -itd --name=graph --network ci -p 8080:8080 hugegraph/hugegraph:latest && sleep 6 - -wget http://files.grouplens.org/datasets/movielens/ml-latest-small.zip -unzip -d ${DATASET_DIR} ml-latest-small.zip - -cd ${DATASET_DIR}/.. && pwd && ls -lh * - -docker run -id --name=loader --network ci hugegraph/loader:latest -docker cp dataset loader:/dataset || exit 1 - -docker exec -i loader ls -lh /dataset -docker exec -i loader bin/hugegraph-loader.sh -g hugegraph -p 8080 -h graph \ - -f /dataset/struct.json -s /dataset/schema.groovy || exit 1 - -# load dataset to hdfs -sort -t , -k1n -u dataset/ml-latest-small/ratings.csv | cut -d "," -f 1 >dataset/ml-latest-small/user_id.csv || exit 1 -/opt/hadoop/bin/hadoop fs -mkdir -p /dataset/ml-latest-small || exit 1 -/opt/hadoop/bin/hadoop fs -put dataset/ml-latest-small/* /dataset/ml-latest-small || exit 1 -/opt/hadoop/bin/hadoop fs -ls /dataset/ml-latest-small - -echo "Load finished, continue to next step" - -############# Note: this part is not used in github-ci now, backup it for other env ############## -#HUGEGRAPH_LOADER_GIT_URL="https://github.com/apache/hugegraph-toolchain.git" -#git clone --depth 10 ${HUGEGRAPH_LOADER_GIT_URL} hugegraph-toolchain -# -#cd hugegraph-toolchain -#mvn install -P stage -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntp -# -#cd hugegraph-loader -#tar -zxf target/apache-hugegraph-loader-*.tar.gz || exit 1 -#cd ../../ - -#wget http://files.grouplens.org/datasets/movielens/ml-latest-small.zip -#unzip -d ${DATASET_DIR} ml-latest-small.zip - -#hugegraph-toolchain/hugegraph-loader/apache-hugegraph-loader-*/bin/hugegraph-loader.sh \ -# -g hugegraph -f ${DATASET_DIR}/struct.json -s ${DATASET_DIR}/schema.groovy || exit 1 diff --git a/computer-dist/src/assembly/travis/start-etcd.sh b/computer-dist/src/assembly/travis/start-etcd.sh deleted file mode 100644 index fe3893ac7..000000000 --- a/computer-dist/src/assembly/travis/start-etcd.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# -set -ev - -TRAVIS_DIR=$(dirname $0) -echo "Starting etcd..." -# TODO: replace with docker way -wget -O ${TRAVIS_DIR}/etcd.tar.gz https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz -mkdir ${TRAVIS_DIR}/etcd -tar -zxvf ${TRAVIS_DIR}/etcd.tar.gz -C ${TRAVIS_DIR}/etcd --strip-components 1 -chmod a+x ${TRAVIS_DIR}/etcd -${TRAVIS_DIR}/etcd/etcd --name etcd-test \ - --initial-advertise-peer-urls http://localhost:2580 \ - --listen-peer-urls http://localhost:2580 \ - --advertise-client-urls ${BSP_ETCD_URL} \ - --listen-client-urls ${BSP_ETCD_URL} & diff --git a/computer-dist/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputer.java b/computer-dist/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputer.java deleted file mode 100644 index 8fd09bab7..000000000 --- a/computer-dist/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputer.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.dist; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.util.Properties; - -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.master.MasterService; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.util.ComputerContextUtil; -import org.apache.hugegraph.computer.core.worker.WorkerService; -import org.apache.hugegraph.config.OptionSpace; -import org.apache.hugegraph.config.RpcOptions; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.apache.logging.log4j.LogManager; -import org.slf4j.Logger; - -public class HugeGraphComputer { - - private static final Logger LOG = Log.logger(HugeGraphComputer.class); - - private static final String ROLE_MASTER = "master"; - private static final String ROLE_WORKER = "worker"; - - /** - * Some class must be load first, in order to invoke static method to init; - */ - private static void loadClass() throws ClassNotFoundException { - Class.forName(IdType.class.getCanonicalName()); - Class.forName(MessageType.class.getCanonicalName()); - Class.forName(ValueType.class.getCanonicalName()); - } - - public static void main(String[] args) throws IOException, - ClassNotFoundException { - Runtime.getRuntime().addShutdownHook(new Thread(LogManager::shutdown)); - - E.checkArgument(ArrayUtils.getLength(args) == 3, - "Argument count must be three, " + - "the first is conf path;" + - "the second is role type;" + - "the third is drive type."); - String role = args[1]; - E.checkArgument(!StringUtils.isEmpty(role), - "The role can't be null or emtpy, " + - "it must be either '%s' or '%s'", - ROLE_MASTER, ROLE_WORKER); - setUncaughtExceptionHandler(); - loadClass(); - registerOptions(); - ComputerContext context = parseContext(args[0], role); - switch (role) { - case ROLE_MASTER: - executeMasterService(context); - break; - case ROLE_WORKER: - executeWorkerService(context); - break; - default: - throw new IllegalArgumentException( - String.format("Unexpected role '%s'", role)); - } - } - - protected static void setUncaughtExceptionHandler() { - Thread.UncaughtExceptionHandler handler = - Thread.getDefaultUncaughtExceptionHandler(); - Thread.setDefaultUncaughtExceptionHandler( - new PrintExceptionHandler(handler) - ); - } - - private static class PrintExceptionHandler implements - Thread.UncaughtExceptionHandler { - - private final Thread.UncaughtExceptionHandler handler; - - PrintExceptionHandler(Thread.UncaughtExceptionHandler handler) { - this.handler = handler; - } - - @Override - public void uncaughtException(Thread t, Throwable e) { - HugeGraphComputer.LOG.error("Failed to run service on {}, {}", - t, e.getMessage(), e); - if (this.handler != null) { - this.handler.uncaughtException(t, e); - } - } - } - - private static void executeWorkerService(ComputerContext context) { - try (WorkerService workerService = new WorkerService()) { - workerService.init(context.config()); - workerService.execute(); - } - } - - private static void executeMasterService(ComputerContext context) { - try (MasterService masterService = new MasterService()) { - masterService.init(context.config()); - masterService.execute(); - } - } - - private static ComputerContext parseContext(String conf, String role) - throws IOException { - Properties properties = new Properties(); - BufferedReader bufferedReader = new BufferedReader( - new FileReader(conf)); - properties.load(bufferedReader); - properties.remove(RpcOptions.RPC_REMOTE_URL.name()); - if (ROLE_WORKER.equals(role)) { - properties.remove(RpcOptions.RPC_SERVER_HOST.name()); - properties.remove(RpcOptions.RPC_SERVER_PORT.name()); - } - ComputerContextUtil.initContext(properties); - return ComputerContext.instance(); - } - - private static void registerOptions() { - OptionSpace.register("computer", - "org.apache.hugegraph.computer.core.config." + - "ComputerOptions"); - OptionSpace.register("computer-rpc", - "org.apache.hugegraph.config.RpcOptions"); - } -} diff --git a/computer-driver/pom.xml b/computer-driver/pom.xml deleted file mode 100644 index 63ab66431..000000000 --- a/computer-driver/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - - 4.0.0 - - computer-driver - - - - org.apache.hugegraph - computer-api - ${revision} - - - diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriverException.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriverException.java deleted file mode 100644 index 365272e36..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriverException.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -/** - * The base class for all exception types - */ -public class ComputerDriverException extends RuntimeException { - - private static final long serialVersionUID = -4048732559246459545L; - - public ComputerDriverException(String message) { - super(message); - } - - public ComputerDriverException(String message, Throwable cause) { - super(message, cause); - } - - public ComputerDriverException(String message, Object... args) { - super(String.format(message, args)); - } - - public ComputerDriverException(String message, Throwable cause, - Object... args) { - super(String.format(message, args), cause); - } - - public Throwable rootCause() { - return rootCause(this); - } - - public static Throwable rootCause(Throwable e) { - Throwable cause = e; - while (cause.getCause() != null) { - cause = cause.getCause(); - } - return cause; - } -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/DefaultJobState.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/DefaultJobState.java deleted file mode 100644 index 0ae4ba6bb..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/DefaultJobState.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import java.util.Objects; - -/** - * DefaultJobState is an implementation of the JobState interface. - * It holds the state of a job including the current superstep, - * the maximum superstep, the last superstep statistics, and the job status. - */ -public class DefaultJobState implements JobState { - - private int superstep; - private int maxSuperstep; - private SuperstepStat lastSuperstepStat; - private JobStatus jobStatus; - - /** - * Sets the current superstep. - * @param superstep The current superstep. - * @return The updated DefaultJobState instance. - */ - public DefaultJobState superstep(int superstep) { - this.superstep = superstep; - return this; - } - - /** - * Sets the maximum superstep. - * @param maxSuperstep The maximum superstep. - * @return The updated DefaultJobState instance. - */ - public DefaultJobState maxSuperstep(int maxSuperstep) { - this.maxSuperstep = maxSuperstep; - return this; - } - - /** - * Sets the last superstep statistics. - * @param lastSuperstepStat The last superstep statistics. - * @return The updated DefaultJobState instance. - */ - public DefaultJobState lastSuperstepStat(SuperstepStat lastSuperstepStat) { - this.lastSuperstepStat = lastSuperstepStat; - return this; - } - - /** - * Sets the job status. - * @param jobStatus The job status. - * @return The updated DefaultJobState instance. - */ - public DefaultJobState jobStatus(JobStatus jobStatus) { - this.jobStatus = jobStatus; - return this; - } - - /** - * @return The current superstep. - */ - @Override - public int superstep() { - return this.superstep; - } - - /** - * @return The maximum superstep. - */ - @Override - public int maxSuperstep() { - return this.maxSuperstep; - } - - /** - * @return The last superstep statistics. - */ - @Override - public SuperstepStat lastSuperstepStat() { - return this.lastSuperstepStat; - } - - /** - * @return The job status. - */ - @Override - public JobStatus jobStatus() { - return this.jobStatus; - } - - /** - * Checks if the given object is equal to this instance. - * @param o The object to compare with. - * @return true if the given object is equal to this instance, false otherwise. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof DefaultJobState)) { - return false; - } - - DefaultJobState jobState = (DefaultJobState) o; - return this.superstep == jobState.superstep && - this.maxSuperstep == jobState.maxSuperstep && - Objects.equals(this.lastSuperstepStat, jobState.lastSuperstepStat) && - this.jobStatus == jobState.jobStatus; - } - - /** - * @return The hash code of this instance. - */ - @Override - public int hashCode() { - return Objects.hash(this.superstep, this.maxSuperstep, - this.lastSuperstepStat, this.jobStatus); - } - - /** - * @return A string representation of this instance. - */ - @Override - public String toString() { - return String.format("%s[superstep=%s, maxSuperStep=%s, lastSuperstepStat=%s, " + - "jobStatus=%s]", DefaultJobState.class.getSimpleName(), - superstep, maxSuperstep, lastSuperstepStat, jobStatus); - } -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobObserver.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobObserver.java deleted file mode 100644 index 641b9aa31..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobObserver.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -public interface JobObserver { - - /** - * This observer will notified by every superstep. - */ - public void onJobStateChanged(JobState state); -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobState.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobState.java deleted file mode 100644 index 40ca96951..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobState.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -public interface JobState { - - /** - * @return The current superstep of the job. - */ - int superstep(); - - /** - * @return The max superstep of the job. - */ - int maxSuperstep(); - - /** - * @return The last superstep stat. The user may need the stat to - * analysis the job. - */ - SuperstepStat lastSuperstepStat(); - - /** - * @return The current job status. - */ - JobStatus jobStatus(); -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobStatus.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobStatus.java deleted file mode 100644 index 8131ff989..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobStatus.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import java.util.Objects; - -public enum JobStatus { - - INITIALIZING, - RUNNING, - CANCELLED, - FAILED, - SUCCEEDED; - - public static boolean finished(JobStatus status) { - return status == CANCELLED || status == FAILED || status == SUCCEEDED; - } - - public static boolean finished(String status) { - return Objects.equals(status, CANCELLED.name()) || - Objects.equals(status, FAILED.name()) || - Objects.equals(status, SUCCEEDED.name()); - } -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/SuperstepStat.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/SuperstepStat.java deleted file mode 100644 index e587265f9..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/SuperstepStat.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import org.apache.hugegraph.computer.driver.util.JsonUtil; - -/** - * It is sent from master to workers. - */ -public class SuperstepStat { - - private long vertexCount; - private long edgeCount; - private long finishedVertexCount; - private long messageCount; - private long messageBytes; - private boolean active; - - public SuperstepStat() { - this.active = true; - } - - public void vertexCount(long vertexCount) { - this.vertexCount = vertexCount; - } - - public void edgeCount(long edgeCount) { - this.edgeCount = edgeCount; - } - - public void finishedVertexCount(long finishedVertexCount) { - this.finishedVertexCount = finishedVertexCount; - } - - public void messageCount(long messageCount) { - this.messageCount = messageCount; - } - - public void messageBytes(long messageBytes) { - this.messageBytes = messageBytes; - } - - public void active(boolean active) { - this.active = active; - } - - public long vertexCount() { - return this.vertexCount; - } - - public long edgeCount() { - return this.edgeCount; - } - - public long finishedVertexCount() { - return this.finishedVertexCount; - } - - public long messageCount() { - return this.messageCount; - } - - public long messageBytes() { - return this.messageBytes; - } - - public void inactivate() { - this.active = false; - } - - public boolean active() { - return this.active; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SuperstepStat)) { - return false; - } - SuperstepStat other = (SuperstepStat) obj; - return this.vertexCount == other.vertexCount && - this.edgeCount == other.edgeCount && - this.finishedVertexCount == other.finishedVertexCount && - this.messageCount == other.messageCount && - this.messageBytes == other.messageBytes && - this.active == other.active; - } - - @Override - public int hashCode() { - return (Long.hashCode(this.vertexCount) >>> 56) ^ - (Long.hashCode(this.edgeCount) >>> 48) ^ - (Long.hashCode(this.messageCount) >>> 40) ^ - (Long.hashCode(this.edgeCount) >>> 32) ^ - (Long.hashCode(this.finishedVertexCount) >>> 24) ^ - (Long.hashCode(this.messageCount) >>> 16) ^ - (Long.hashCode(this.messageBytes) >>> 8) ^ - Boolean.hashCode(this.active); - } - - @Override - public String toString() { - return JsonUtil.toJson(this); - } -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/config/DriverConfigOption.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/config/DriverConfigOption.java deleted file mode 100644 index 358f72fcc..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/config/DriverConfigOption.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver.config; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.config.ConfigOption; - -import com.google.common.base.Predicate; - -/** - * The class is subclass of {@link ConfigOption} it without default value - */ -public class DriverConfigOption extends ConfigOption { - - public DriverConfigOption(String name, Predicate pred, - Class type) { - this(name, StringUtils.EMPTY, pred, type); - } - - public DriverConfigOption(String name, String desc, - Predicate pred, Class type) { - this(name, false, desc, pred, type); - } - - public DriverConfigOption(String name, boolean required, - String desc, Predicate pred, - Class type) { - super(name, required, desc, pred, type, null); - } - - public void checkVal(String value) { - this.parseConvert(value); - } - - @Override - protected void check(Object value) { - if (value == null) { - return; - } - super.check(value); - } - - @Override - protected T parse(String value) { - if (value == null) { - return null; - } - return super.parse(value); - } - - @Override - public T parseConvert(String value) { - if (value == null) { - return null; - } - return super.parseConvert(value); - } -} diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/util/JsonUtil.java b/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/util/JsonUtil.java deleted file mode 100644 index 78d93ed94..000000000 --- a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/util/JsonUtil.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver.util; - -import org.apache.hugegraph.util.E; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class JsonUtil { - - private static final ObjectMapper OBJECT_MAPPER; - - static { - OBJECT_MAPPER = new ObjectMapper(); - OBJECT_MAPPER.setVisibility(PropertyAccessor.FIELD, - JsonAutoDetect.Visibility.ANY); - } - - public static String toJson(Object obj) { - try { - return OBJECT_MAPPER.writeValueAsString(obj); - } catch (JsonProcessingException e) { - String message = String.format("Can't write json: %s", - e.getMessage()); - throw new RuntimeException(message, e); - } - } - - public static T fromJson(String json, Class clazz) { - E.checkState(json != null, - "Json value can't be null for '%s'", - clazz.getSimpleName()); - try { - return OBJECT_MAPPER.readValue(json, clazz); - } catch (JsonProcessingException e) { - String message = String.format("Can't read json: %s", - e.getMessage()); - throw new RuntimeException(message, e); - } - } -} diff --git a/computer-k8s-operator/Dockerfile b/computer-k8s-operator/Dockerfile deleted file mode 100644 index c41d7593b..000000000 --- a/computer-k8s-operator/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# -# 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. -# -FROM openjdk:11-slim -LABEL maintainer="HugeGraph Docker Maintainers " -WORKDIR /hugegraph/operator -COPY target/hugegraph-computer-operator-*.jar hugegraph-computer-operator.jar -ENTRYPOINT ["java", "-jar", "hugegraph-computer-operator.jar"] diff --git a/computer-k8s-operator/crd-generate/.dockerignore b/computer-k8s-operator/crd-generate/.dockerignore deleted file mode 100644 index a989d6825..000000000 --- a/computer-k8s-operator/crd-generate/.dockerignore +++ /dev/null @@ -1,20 +0,0 @@ -# -# 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. -# -# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file -# Ignore build and test binaries. -bin/ -testbin/ diff --git a/computer-k8s-operator/crd-generate/.gitignore b/computer-k8s-operator/crd-generate/.gitignore deleted file mode 100644 index d91277c49..000000000 --- a/computer-k8s-operator/crd-generate/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ - -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib -bin -testbin/* -zz_generated.deepcopy.go - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Kubernetes Generated files - skip generated files, except for vendored files - -!vendor/**/zz_generated.* - -# editor and IDE paraphernalia -.idea -*.swp -*.swo -*~ diff --git a/computer-k8s-operator/crd-generate/Dockerfile b/computer-k8s-operator/crd-generate/Dockerfile deleted file mode 100644 index e9ece0040..000000000 --- a/computer-k8s-operator/crd-generate/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# -# 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. -# -# Build the manager binary -FROM golang:1.19 as builder -ARG TARGETOS -ARG TARGETARCH - -WORKDIR /workspace -# Copy the Go Modules manifests -COPY go.mod go.mod -COPY go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN go mod download - -# Copy the go source -COPY cmd/main.go cmd/main.go -COPY api/ api/ -#COPY internal/controller/ internal/controller/ - -# Build -# the GOARCH has not a default value to allow the binary be built according to the host where the command -# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO -# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore, -# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. -RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go - -# Use distroless as minimal base image to package the manager binary -# Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM gcr.io/distroless/static:nonroot -WORKDIR / -COPY --from=builder /workspace/manager . -USER 65532:65532 - -ENTRYPOINT ["/manager"] diff --git a/computer-k8s-operator/crd-generate/Makefile b/computer-k8s-operator/crd-generate/Makefile deleted file mode 100644 index 43c6e1e28..000000000 --- a/computer-k8s-operator/crd-generate/Makefile +++ /dev/null @@ -1,186 +0,0 @@ -# -# 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. -# -# Produce CRDs that work back to Kubernetes 1.20 (no version conversion) -CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false,crdVersions={v1,v1beta1},maxDescLen=0" - -# Image URL to use all building/pushing image targets -IMG ?= hugegraph/hugegraph-computer-operator-manager:latest -# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.20.13 - -# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) -ifeq (,$(shell go env GOBIN)) -GOBIN=$(shell go env GOPATH)/bin -else -GOBIN=$(shell go env GOBIN) -endif - -# Setting SHELL to bash allows bash commands to be executed by recipes. -# Options are set to exit when a recipe line exits non-zero or a piped command fails. -SHELL = /usr/bin/env bash -o pipefail -.SHELLFLAGS = -ec - -.PHONY: all -all: build - -##@ General - -# The help target prints out all targets with their descriptions organized -# beneath their categories. The categories are represented by '##@' and the -# target descriptions by '##'. The awk commands is responsible for reading the -# entire set of makefiles included in this invocation, looking for lines of the -# file as xyz: ## something, and then pretty-format the target and help. Then, -# if there's a line with ##@ something, that gets pretty-printed as a category. -# More info on the usage of ANSI control characters for terminal formatting: -# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters -# More info on the awk command: -# http://linuxcommand.org/lc3_adv_awk.php - -.PHONY: help -help: ## Display this help. - @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) - -##@ Development - -gen-all: gen-code manifests gen-jsonschema ## Generate code containing DeepCopy, CRD, Operator, JsonSchema - -.PHONY: gen-code -gen-code: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - $(CONTROLLER_GEN) object paths="./..." - -.PHONY: manifests -manifests: controller-gen #kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases - - #$(KUSTOMIZE) build config/crd > ../manifest/hugegraph-computer-crd.yaml - cp config/crd/bases/operator.hugegraph.apache.org_hugegraphcomputerjobs.yaml ../manifest/hugegraph-computer-crd.v1.yaml - cp config/crd/bases/operator.hugegraph.apache.org_hugegraphcomputerjobs.v1beta1.yaml ../manifest/hugegraph-computer-crd.v1beta1.yaml - $(KUSTOMIZE) build config/default > ../manifest/hugegraph-computer-operator.yaml - rm -rf config/crd/bases - -.PHONY: gen-jsonschema -gen-jsonschema: ## Generate JsonSchema for java - go run cmd/generate.go - -.PHONY: generate -generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." - -.PHONY: fmt -fmt: ## Run go fmt against code. - go fmt ./... - -.PHONY: vet -vet: ## Run go vet against code. - go vet ./... - -.PHONY: test -test: manifests generate fmt vet envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out - -##@ Build - -.PHONY: build -build: manifests generate fmt vet ## Build manager binary. - go build -o bin/manager cmd/main.go - -.PHONY: run -run: manifests generate fmt vet ## Run a controller from your host. - go run ./cmd/main.go - -# If you wish built the manager image targeting other platforms you can use the --platform flag. -# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. -# More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -.PHONY: docker-build -docker-build: ## Build docker image with the manager. - docker build -t ${IMG} . - -.PHONY: docker-push -docker-push: ## Push docker image with the manager. - docker push ${IMG} - -# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple -# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: -# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ -# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> then the export will fail) -# To properly provided solutions that supports more than one platform you should use this option. -PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le -.PHONY: docker-buildx -docker-buildx: test ## Build and push docker image for the manager for cross-platform support - # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile - sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - - docker buildx create --name project-v3-builder - docker buildx use project-v3-builder - - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - - docker buildx rm project-v3-builder - rm Dockerfile.cross - -##@ Deployment - -ifndef ignore-not-found - ignore-not-found = false -endif - -.PHONY: install -install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | kubectl apply -f - - -.PHONY: uninstall -uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. - $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - - -.PHONY: deploy -deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. - cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} - $(KUSTOMIZE) build config/default | kubectl apply -f - - -.PHONY: undeploy -undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. - $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - - -##@ Build Dependencies - -## Location to install dependencies to -LOCALBIN ?= $(shell pwd)/bin -$(LOCALBIN): - mkdir -p $(LOCALBIN) - -## Tool Binaries -KUSTOMIZE ?= $(LOCALBIN)/kustomize -CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen - -## Tool Versions -KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.5.0 - -KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" -.PHONY: kustomize -kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. -$(KUSTOMIZE): $(LOCALBIN) - @if test -x $(LOCALBIN)/kustomize && ! $(LOCALBIN)/kustomize version | grep -q $(KUSTOMIZE_VERSION); then \ - echo "$(LOCALBIN)/kustomize version is not expected $(KUSTOMIZE_VERSION). Removing it before installing."; \ - rm -rf $(LOCALBIN)/kustomize; \ - fi - test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) --output install_kustomize.sh && bash install_kustomize.sh $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); rm install_kustomize.sh; } - -.PHONY: controller-gen -controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten. -$(CONTROLLER_GEN): $(LOCALBIN) - test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ - GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) - diff --git a/computer-k8s-operator/crd-generate/PROJECT b/computer-k8s-operator/crd-generate/PROJECT deleted file mode 100644 index 47b835494..000000000 --- a/computer-k8s-operator/crd-generate/PROJECT +++ /dev/null @@ -1,41 +0,0 @@ -# -# 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. -# -# Code generated by tool. DO NOT EDIT. -# This file is used to track the info used to scaffold your project -# and allow the plugins properly work. -# More info: https://book.kubebuilder.io/reference/project-config.html -domain: hugegraph.apache.org -layout: -- go.kubebuilder.io/v4 -projectName: hugegraph-computer-operator -repo: hugegraph.apache.org/operator -resources: -- api: - crdVersion: v1 - namespaced: true - domain: hugegraph.apache.org - group: operator - kind: HugeGraphComputerJob - path: hugegraph.apache.org/operator/api/v1 - version: v1 - webhooks: - defaulting: true - validation: true - webhookVersion: v1 -version: "3" diff --git a/computer-k8s-operator/crd-generate/README.md b/computer-k8s-operator/crd-generate/README.md deleted file mode 100644 index 0b6e32a88..000000000 --- a/computer-k8s-operator/crd-generate/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# crd-generate -// TODO(user): Add simple overview of use/purpose - -## Description -// TODO(user): An in-depth paragraph about your project and overview of use - -## Getting Started -You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. -**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows). - -### Running on the cluster -1. Install Instances of Custom Resources: - -```sh -kubectl apply -f config/samples/ -``` - -2. Build and push your image to the location specified by `IMG`: - -```sh -make docker-build docker-push IMG=/crd-generate:tag -``` - -3. Deploy the controller to the cluster with the image specified by `IMG`: - -```sh -make deploy IMG=/crd-generate:tag -``` - -### Uninstall CRDs -To delete the CRDs from the cluster: - -```sh -make uninstall -``` - -### Undeploy controller -UnDeploy the controller from the cluster: - -```sh -make undeploy -``` - -## Contributing -// TODO(user): Add detailed information on how you would like others to contribute to this project - -### How it works -This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). - -It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/), -which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster. - -### Test It Out -1. Install the CRDs into the cluster: - -```sh -make install -``` - -2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running): - -```sh -make run -``` - -**NOTE:** You can also run this in one step by running: `make install run` - -### Modifying the API definitions -If you are editing the API definitions, generate the manifests such as CRs or CRDs using: - -```sh -make manifests -``` - -**NOTE:** Run `make --help` for more information on all potential `make` targets - -More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) - -## License - -Copyright 2023. - -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. - diff --git a/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go b/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go deleted file mode 100644 index cbf9e06b7..000000000 --- a/computer-k8s-operator/crd-generate/api/v1/groupversion_info.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -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. -*/ - -// Package v1 contains API Schema definitions for the computer v1 API group -// +kubebuilder:object:generate=true -// +groupName=operator.hugegraph.apache.org -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -// +kubebuilder:rbac:groups=core,resources=secrets,verbs=get -// +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;create;update -// +kubebuilder:rbac:groups=operator.hugegraph.apache.org,resources=hugegraphcomputerjobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=operator.hugegraph.apache.org,resources=hugegraphcomputerjobs/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=operator.hugegraph.apache.org,resources=hugegraphcomputerjobs/finalizers,verbs=update -// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get -// +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=apps,resources=statefulsets/status,verbs=get -// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch -// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get -// +kubebuilder:rbac:groups=core,resources=pods/log,verbs=get;list;watch -// +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=core,resources=services/status,verbs=get -// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=core,resources=events/status,verbs=get -// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=batch,resources=jobs/status,verbs=get -// +kubebuilder:rbac:groups=extensions,resources=ingresses,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=extensions,resources=ingresses/status,verbs=get - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "operator.hugegraph.apache.org", Version: "v1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_types.go b/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_types.go deleted file mode 100644 index 7eaceb8f6..000000000 --- a/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_types.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -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. -*/ - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. -// Any new fields you add must have json tags for the fields to be serialized. - -// ComputerJobSpec defines the desired state of HugeGraphComputerJob -type ComputerJobSpec struct { - AlgorithmName *string `json:"algorithmName"` - - JobId *string `json:"jobId"` - - Image *string `json:"image"` - - // Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always - // if :latest tag is specified, or IfNotPresent otherwise. - // +kubebuilder:validation:Enum=Always;Never;IfNotPresent - PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"` - - // Secrets for image pull. - PullSecrets []corev1.LocalObjectReference `json:"pullSecrets,omitempty"` - - //+kubebuilder:validation:Minimum=1 - WorkerInstances int32 `json:"workerInstances"` - - MasterCpu resource.Quantity `json:"masterCpu,omitempty"` - - WorkerCpu resource.Quantity `json:"workerCpu,omitempty"` - - MasterMemory resource.Quantity `json:"masterMemory,omitempty"` - - WorkerMemory resource.Quantity `json:"workerMemory,omitempty"` - - ComputerConf map[string]string `json:"computerConf"` - - Log4jXml *string `json:"log4jXml,omitempty"` - - JarFile *string `json:"jarFile,omitempty"` - - //+kubebuilder:validation:Pattern=`^(http|https):\/\/([\w.]+\/?)\S*$` - RemoteJarUri *string `json:"remoteJarUri,omitempty"` - - JvmOptions *string `json:"jvmOptions,omitempty"` - - // Environment variables shared by all Master and Worker. - EnvVars []corev1.EnvVar `json:"envVars,omitempty"` - - // Environment variables injected from a source, shared by all Master and Worker. - EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` - - MasterCommand []string `json:"masterCommand,omitempty"` - - MasterArgs []string `json:"masterArgs,omitempty"` - - WorkerCommand []string `json:"workerCommand,omitempty"` - - WorkerArgs []string `json:"workerArgs,omitempty"` - - // Volumes in the Job pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes/ - Volumes []corev1.Volume `json:"volumes,omitempty"` - - // Volume mounts in the Job container. - // More info: https://kubernetes.io/docs/concepts/storage/volumes/ - VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` - - SecretPaths map[string]string `json:"secretPaths,omitempty"` - - ConfigMapPaths map[string]string `json:"configMapPaths,omitempty"` - - //+kubebuilder:validation:Schemaless - //+kubebuilder:pruning:PreserveUnknownFields - // More info: https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates - PodTemplateSpec corev1.PodTemplateSpec `json:"podTemplateSpec,omitempty"` - - // More info: https://kubernetes.io/zh/docs/tasks/configure-pod-container/security-context/ - SecurityContext corev1.SecurityContext `json:"securityContext,omitempty"` -} - -type ComputerJobState struct { - //+optional - Superstep int32 `json:"superstep"` - - //+optional - MaxSuperstep int32 `json:"maxSuperstep"` - - //+optional - LastSuperstepStat *string `json:"lastSuperstepStat"` -} - -// ComputerJobStatus defines the observed state of HugeGraphComputerJob -type ComputerJobStatus struct { - JobStatus *string `json:"jobStatus"` - - //+optional - JobState ComputerJobState `json:"jobState"` - - //+optional - Components ComponentsStatus `json:"componentStates"` - - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` -} - -type ComponentState struct { - // The resource name of the component. - Name string `json:"name"` - - // The state of the component. - State string `json:"state"` - - //+optional - Message string `json:"message"` - - //+optional - ErrorLog string `json:"errorLog"` -} - -type ComponentsStatus struct { - // +optional - ConfigMap ComponentState `json:"configMap"` - - // +optional - MasterJob ComponentState `json:"masterJob"` - - // +optional - WorkerJob ComponentState `json:"workerJob"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:shortName=hcjob -// +kubebuilder:printcolumn:JSONPath=".spec.jobId",name=JobId,type=string -// +kubebuilder:printcolumn:JSONPath=".status.jobStatus",name=JobStatus,type=string -// +kubebuilder:printcolumn:JSONPath=".status.jobState.superstep",name=Superstep,type=integer -// +kubebuilder:printcolumn:JSONPath=".status.jobState.maxSuperstep",name=MaxSuperstep,type=integer -// +kubebuilder:printcolumn:JSONPath=".status.jobState.lastSuperstepStat",name=SuperstepStat,type=string - -// HugeGraphComputerJob is the Schema for the hugegraphcomputerjobs API -type HugeGraphComputerJob struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ComputerJobSpec `json:"spec,omitempty"` - Status ComputerJobStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// HugeGraphComputerJobList contains a list of HugeGraphComputerJob -type HugeGraphComputerJobList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - Items []HugeGraphComputerJob `json:"items"` -} - -func init() { - SchemeBuilder.Register(&HugeGraphComputerJob{}, &HugeGraphComputerJobList{}) -} diff --git a/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_webhook.go b/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_webhook.go deleted file mode 100644 index fd7af9d03..000000000 --- a/computer-k8s-operator/crd-generate/api/v1/hugegraphcomputerjob_webhook.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -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. -*/ - -package v1 - -import ( - "fmt" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/validation/field" - ctrl "sigs.k8s.io/controller-runtime" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook" - "strings" -) - -// log is for logging in this package. -var hugegraphcomputerjoblog = logf.Log.WithName("hugegraphcomputerjob-resource") - -func (r *HugeGraphComputerJob) SetupWebhookWithManager(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(r). - Complete() -} - -//+kubebuilder:webhook:path=/mutate-operator-hugegraph-apache-org-v1-hugegraphcomputerjob,mutating=true,failurePolicy=fail,sideEffects=None,groups=operator.hugegraph.apache.org,resources=hugegraphcomputerjobs,verbs=create;update,versions=v1,name=mhugegraphcomputerjob.kb.io,admissionReviewVersions=v1 - -var _ webhook.Defaulter = &HugeGraphComputerJob{} - -// Default implements webhook.Defaulter so a webhook will be registered for the type -func (r *HugeGraphComputerJob) Default() { - hugegraphcomputerjoblog.Info("default", "name", r.Name) -} - -//+kubebuilder:webhook:path=/validate-operator-hugegraph-apache-org-v1-hugegraphcomputerjob,mutating=false,failurePolicy=fail,sideEffects=None,groups=operator.hugegraph.apache.org,resources=hugegraphcomputerjobs,verbs=create;update,versions=v1,name=vhugegraphcomputerjob.kb.io,admissionReviewVersions=v1 - -var _ webhook.Validator = &HugeGraphComputerJob{} - -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (r *HugeGraphComputerJob) ValidateCreate() error { - hugegraphcomputerjoblog.Info("validate create", "name", r.Name) - - return nil -} - -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (r *HugeGraphComputerJob) ValidateUpdate(old runtime.Object) error { - hugegraphcomputerjoblog.Info("validate update", "name", r.Name) - var allErrs field.ErrorList - - flag := false - - fmt.Println(r.Status.JobStatus) - - if r.Status.JobStatus == nil { - return nil - } - if strings.EqualFold(*r.Status.JobStatus, "RUNNING") || - strings.EqualFold(*r.Status.JobStatus, "INITIALIZING") { - flag = true - } - if flag == true { - hugegraphcomputerjoblog.Info("Status NULL, can not update", "name", r.Name) - err := field.Invalid(field.ToPath(), - r.Name, - "Current HugeGraphComputerJob is running, can not update") - - allErrs = append(allErrs, err) - - return apierrors.NewInvalid( - schema.GroupKind{ - Group: "hugegraph", - Kind: "HugeGraphComputerJob", - }, - r.Name, - allErrs) - } - - hugegraphcomputerjoblog.Info("status is not null") - return nil -} - -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (r *HugeGraphComputerJob) ValidateDelete() error { - hugegraphcomputerjoblog.Info("validate delete", "name", r.Name) - - return nil -} diff --git a/computer-k8s-operator/crd-generate/api/v1/webhook_suite_test.go b/computer-k8s-operator/crd-generate/api/v1/webhook_suite_test.go deleted file mode 100644 index c59ec7622..000000000 --- a/computer-k8s-operator/crd-generate/api/v1/webhook_suite_test.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -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. -*/ - -package v1 - -import ( - "context" - "crypto/tls" - "fmt" - "net" - "path/filepath" - "testing" - "time" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - admissionv1 "k8s.io/api/admission/v1" - //+kubebuilder:scaffold:imports - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/rest" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" -) - -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. - -var cfg *rest.Config -var k8sClient client.Client -var testEnv *envtest.Environment -var ctx context.Context -var cancel context.CancelFunc - -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecs(t, "Webhook Suite") -} - -var _ = BeforeSuite(func() { - logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) - - ctx, cancel = context.WithCancel(context.TODO()) - - By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, - ErrorIfCRDPathMissing: false, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "config", "webhook")}, - }, - } - - var err error - // cfg is defined in this file globally. - cfg, err = testEnv.Start() - Expect(err).NotTo(HaveOccurred()) - Expect(cfg).NotTo(BeNil()) - - scheme := runtime.NewScheme() - err = AddToScheme(scheme) - Expect(err).NotTo(HaveOccurred()) - - err = admissionv1.AddToScheme(scheme) - Expect(err).NotTo(HaveOccurred()) - - //+kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme}) - Expect(err).NotTo(HaveOccurred()) - Expect(k8sClient).NotTo(BeNil()) - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: scheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", - }) - Expect(err).NotTo(HaveOccurred()) - - err = (&HugeGraphComputerJob{}).SetupWebhookWithManager(mgr) - Expect(err).NotTo(HaveOccurred()) - - //+kubebuilder:scaffold:webhook - - go func() { - defer GinkgoRecover() - err = mgr.Start(ctx) - Expect(err).NotTo(HaveOccurred()) - }() - - // wait for the webhook server to get ready - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - Eventually(func() error { - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err - } - conn.Close() - return nil - }).Should(Succeed()) - -}) - -var _ = AfterSuite(func() { - cancel() - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).NotTo(HaveOccurred()) -}) diff --git a/computer-k8s-operator/crd-generate/cmd/generate.go b/computer-k8s-operator/crd-generate/cmd/generate.go deleted file mode 100644 index 63e780278..000000000 --- a/computer-k8s-operator/crd-generate/cmd/generate.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -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. -*/ - -package main - -import ( - "fmt" - "io/ioutil" - "os" - "reflect" - "strings" - - "github.com/fabric8io/kubernetes-client/generator/pkg/schemagen" - operatorv1 "hugegraph.apache.org/operator/api/v1" - machinery "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -const ( - packageToken = "io.fabric8.xxxx" - javaPackage = "org.apache.hugegraph.computer.k8s.crd.model" - goPackage = "hugegraph.apache.org/operator/api/v1" - schemaFilePath = "../../computer-k8s/schema/crd-schema.json" -) - -func main() { - - // the CRD List types for which the model should be generated - // no other types need to be defined as they are auto discovered - crdLists := map[reflect.Type]schemagen.CrdScope{ - // v1 - reflect.TypeOf(operatorv1.HugeGraphComputerJobList{}): schemagen.Namespaced, - } - - // constraints and patterns for fields - constraints := map[reflect.Type]map[string]*schemagen.Constraint{} - - // types that are manually defined in the model - providedTypes := []schemagen.ProvidedType{} - - // go packages that are provided and where no - // generation is required and their corresponding java package - providedPackages := map[string]string{ - // external - "k8s.io/api/core/v1": "io.fabric8.kubernetes.api.model", - "k8s.io/apimachinery/pkg/apis/meta/v1": "io.fabric8.kubernetes.api.model", - "k8s.io/apimachinery/pkg/api/resource": "io.fabric8.kubernetes.api.model", - "k8s.io/apimachinery/pkg/runtime": "io.fabric8.kubernetes.api.model.runtime", - } - - // mapping of go packages of this module to the resulting java package - // optional ApiGroup and ApiVersion for the go package - // (which is added to the generated java class) - packageMapping := map[string]schemagen.PackageInformation{ - // v1 - goPackage: { - JavaPackage: packageToken, - ApiGroup: operatorv1.GroupVersion.Group, - ApiVersion: operatorv1.GroupVersion.Version, - }, - } - - // converts all packages starting with to - mappingSchema := map[string]string{} - - // overwriting some times - manualTypeMap := map[reflect.Type]string{ - reflect.TypeOf(machinery.Time{}): "java.lang.String", - reflect.TypeOf(runtime.RawExtension{}): "java.util.Map", - reflect.TypeOf([]byte{}): "java.lang.String", - } - - json := schemagen.GenerateSchema( - "http://fabric8.io/hugegraph-computer/ComputerSchema#", - crdLists, providedPackages, manualTypeMap, packageMapping, - mappingSchema, providedTypes, constraints, - ) - - // fix must start with "io.fabric8." - json = strings.ReplaceAll(json, packageToken, javaPackage) - - err := ioutil.WriteFile(schemaFilePath, []byte(json+"\n"), 0644) - if err != nil { - fmt.Println(err.Error()) - os.Exit(1) - } -} diff --git a/computer-k8s-operator/crd-generate/cmd/main.go b/computer-k8s-operator/crd-generate/cmd/main.go deleted file mode 100644 index d50b7f8be..000000000 --- a/computer-k8s-operator/crd-generate/cmd/main.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -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. -*/ - -package main - -import ( - "flag" - "os" - - // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) - // to ensure that exec-entrypoint and run can make use of them. - _ "k8s.io/client-go/plugin/pkg/client/auth" - - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - clientgoscheme "k8s.io/client-go/kubernetes/scheme" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - operatorv1 "hugegraph.apache.org/operator/api/v1" - //+kubebuilder:scaffold:imports -) - -var ( - scheme = runtime.NewScheme() - setupLog = ctrl.Log.WithName("setup") -) - -func init() { - utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - - utilruntime.Must(operatorv1.AddToScheme(scheme)) - //+kubebuilder:scaffold:scheme -} - -func main() { - var metricsAddr string - var enableLeaderElection bool - flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") - flag.BoolVar(&enableLeaderElection, "leader-elect", false, - "Enable leader election for controller manager. " + - "Enabling this will ensure there is only one active controller manager.") - opts := zap.Options{ - Development: true, - } - opts.BindFlags(flag.CommandLine) - flag.Parse() - - ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) - - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: 9443, - LeaderElection: enableLeaderElection, - LeaderElectionID: "11f2b593.hugegraph.apache.org", - // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily - // when the Manager ends. This requires the binary to immediately end when the - // Manager is stopped, otherwise, this setting is unsafe. Setting this significantly - // speeds up voluntary leader transitions as the new leader don't have to wait - // LeaseDuration time first. - // - // In the default scaffold provided, the program ends immediately after - // the manager stops, so would be fine to enable this option. However, - // if you are doing or is intended to do any operation such as perform cleanups - // after the manager stops then its usage might be unsafe. - // LeaderElectionReleaseOnCancel: true, - }) - if err != nil { - setupLog.Error(err, "unable to start manager") - os.Exit(1) - } - - if err = (&operatorv1.HugeGraphComputerJob{}).SetupWebhookWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create webhook", "webhook", "HugeGraphComputerJob") - os.Exit(1) - } - - setupLog.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { - setupLog.Error(err, "problem running manager") - os.Exit(1) - } -} diff --git a/computer-k8s-operator/crd-generate/config/certmanager/certificate.yaml b/computer-k8s-operator/crd-generate/config/certmanager/certificate.yaml deleted file mode 100644 index 9df5f2574..000000000 --- a/computer-k8s-operator/crd-generate/config/certmanager/certificate.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# -# 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. -# -# The following manifests contain a self-signed issuer CR and a certificate CR. -# More document can be found at https://docs.cert-manager.io -# WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: selfsigned-issuer - namespace: system -spec: - selfSigned: {} ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml - namespace: system -spec: - # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize - dnsNames: - - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc - - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local - issuerRef: - kind: Issuer - name: selfsigned-issuer - secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize diff --git a/computer-k8s-operator/crd-generate/config/certmanager/kustomization.yaml b/computer-k8s-operator/crd-generate/config/certmanager/kustomization.yaml deleted file mode 100644 index 5d5f9e913..000000000 --- a/computer-k8s-operator/crd-generate/config/certmanager/kustomization.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# -# 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. -# -resources: -- certificate.yaml - -configurations: -- kustomizeconfig.yaml diff --git a/computer-k8s-operator/crd-generate/config/certmanager/kustomizeconfig.yaml b/computer-k8s-operator/crd-generate/config/certmanager/kustomizeconfig.yaml deleted file mode 100644 index 4365dbdf7..000000000 --- a/computer-k8s-operator/crd-generate/config/certmanager/kustomizeconfig.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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. -# -# This configuration is for teaching kustomize how to update name ref substitution -nameReference: -- kind: Issuer - group: cert-manager.io - fieldSpecs: - - kind: Certificate - group: cert-manager.io - path: spec/issuerRef/name - -varReference: - - kind: Certificate - group: cert-manager.io - path: spec/commonName - - kind: Certificate - group: cert-manager.io - path: spec/dnsNames \ No newline at end of file diff --git a/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml b/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml deleted file mode 100644 index edb7ae6fa..000000000 --- a/computer-k8s-operator/crd-generate/config/crd/kustomization.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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. -# -# This kustomization.yaml is not intended to be run by itself, -# since it depends on service name and namespace that are out of this kustomize package. -# It should be run by config/default -resources: -- bases/operator.hugegraph.apache.org_hugegraphcomputerjobs.yaml -- bases/operator.hugegraph.apache.org_hugegraphcomputerjobs.v1beta1.yaml -#+kubebuilder:scaffold:crdkustomizeresource - -patchesStrategicMerge: -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. -# patches here are for enabling the conversion webhook for each CRD -- patches/webhook_in_hugegraphcomputerjobs.yaml -#+kubebuilder:scaffold:crdkustomizewebhookpatch - -# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. -# patches here are for enabling the CA injection for each CRD -- patches/cainjection_in_hugegraphcomputerjobs.yaml -#+kubebuilder:scaffold:crdkustomizecainjectionpatch - -# the following config is for teaching kustomize how to do kustomization for CRDs. -configurations: -- kustomizeconfig.yaml diff --git a/computer-k8s-operator/crd-generate/config/crd/kustomizeconfig.yaml b/computer-k8s-operator/crd-generate/config/crd/kustomizeconfig.yaml deleted file mode 100644 index 16fc34512..000000000 --- a/computer-k8s-operator/crd-generate/config/crd/kustomizeconfig.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# -# 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. -# -# This file is for teaching kustomize how to substitute name and namespace reference in CRD -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: CustomResourceDefinition - version: v1 - group: apiextensions.k8s.io - path: spec/conversion/webhook/clientConfig/service/name - -namespace: -- kind: CustomResourceDefinition - version: v1 - group: apiextensions.k8s.io - path: spec/conversion/webhook/clientConfig/service/namespace - create: false - -varReference: -- path: metadata/annotations diff --git a/computer-k8s-operator/crd-generate/config/crd/patches/cainjection_in_hugegraphcomputerjobs.yaml b/computer-k8s-operator/crd-generate/config/crd/patches/cainjection_in_hugegraphcomputerjobs.yaml deleted file mode 100644 index e8c2c2064..000000000 --- a/computer-k8s-operator/crd-generate/config/crd/patches/cainjection_in_hugegraphcomputerjobs.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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. -# -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: hugegraphcomputerjobs.operator.hugegraph.apache.org diff --git a/computer-k8s-operator/crd-generate/config/crd/patches/webhook_in_hugegraphcomputerjobs.yaml b/computer-k8s-operator/crd-generate/config/crd/patches/webhook_in_hugegraphcomputerjobs.yaml deleted file mode 100644 index f84a2f1d5..000000000 --- a/computer-k8s-operator/crd-generate/config/crd/patches/webhook_in_hugegraphcomputerjobs.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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. -# -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: hugegraphcomputerjobs.operator.hugegraph.apache.org -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert - conversionReviewVersions: - - v1 diff --git a/computer-k8s-operator/crd-generate/config/default/kustomization.yaml b/computer-k8s-operator/crd-generate/config/default/kustomization.yaml deleted file mode 100644 index cb4e14596..000000000 --- a/computer-k8s-operator/crd-generate/config/default/kustomization.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# -# 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. -# -# Adds namespace to all resources. -namespace: hugegraph-computer-operator-system - -# Value of this field is prepended to the -# names of all resources, e.g. a deployment named -# "wordpress" becomes "alices-wordpress". -# Note that it should also match with the prefix (text before '-') of the namespace -# field above. -namePrefix: hugegraph-computer-operator- - -# Labels to add to all resources and selectors. -#labels: -#- includeSelectors: true -# pairs: -# someName: someValue - -resources: -#- ../crd -- ../rbac -- ../etcd -- ../manager -- ../minio -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -- ../webhook -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. -- ../certmanager -# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus - -patchesStrategicMerge: -# Protect the /metrics endpoint by putting it behind auth. -# If you want your controller-manager to expose the /metrics -# endpoint w/o any authn/z, please comment the following line. -#- manager_auth_proxy_patch.yaml - -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -- manager_webhook_patch.yaml - -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. -# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. -# 'CERTMANAGER' needs to be enabled to use ca injection -- webhookcainjection_patch.yaml - -# the following config is for teaching kustomize how to do var substitution -vars: -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. -- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR - objref: - kind: Certificate - group: cert-manager.io - version: v1 - name: serving-cert # this name should match the one in certificate.yaml - fieldref: - fieldpath: metadata.namespace -- name: CERTIFICATE_NAME - objref: - kind: Certificate - group: cert-manager.io - version: v1 - name: serving-cert # this name should match the one in certificate.yaml -- name: SERVICE_NAMESPACE # namespace of the service - objref: - kind: Service - version: v1 - name: webhook-service - fieldref: - fieldpath: metadata.namespace -- name: SERVICE_NAME - objref: - kind: Service - version: v1 - name: webhook-service diff --git a/computer-k8s-operator/crd-generate/config/default/manager_config_patch.yaml b/computer-k8s-operator/crd-generate/config/default/manager_config_patch.yaml deleted file mode 100644 index 985a75c68..000000000 --- a/computer-k8s-operator/crd-generate/config/default/manager_config_patch.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# -# 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. -# -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - args: - - "--config=controller_manager_config.yaml" - volumeMounts: - - name: manager-config - mountPath: /controller_manager_config.yaml - subPath: controller_manager_config.yaml - volumes: - - name: manager-config - configMap: - name: manager-config diff --git a/computer-k8s-operator/crd-generate/config/default/manager_webhook_patch.yaml b/computer-k8s-operator/crd-generate/config/default/manager_webhook_patch.yaml deleted file mode 100644 index eb450369f..000000000 --- a/computer-k8s-operator/crd-generate/config/default/manager_webhook_patch.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# -# 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. -# -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: webhook-server-cert diff --git a/computer-k8s-operator/crd-generate/config/default/webhookcainjection_patch.yaml b/computer-k8s-operator/crd-generate/config/default/webhookcainjection_patch.yaml deleted file mode 100644 index 041063946..000000000 --- a/computer-k8s-operator/crd-generate/config/default/webhookcainjection_patch.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# -# 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. -# -# This patch add annotation to admission webhook config and -# CERTIFICATE_NAMESPACE and CERTIFICATE_NAME will be substituted by kustomize -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - name: mutating-webhook-configuration - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: validating-webhook-configuration - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) diff --git a/computer-k8s-operator/crd-generate/config/etcd/etcd_server.yaml b/computer-k8s-operator/crd-generate/config/etcd/etcd_server.yaml deleted file mode 100644 index 9fe4eb481..000000000 --- a/computer-k8s-operator/crd-generate/config/etcd/etcd_server.yaml +++ /dev/null @@ -1,101 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: Service -metadata: - labels: - service.app: hugegraph-computer-operator-etcd - name: etcd - namespace: system - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: 'true' -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: peer - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - service.app: hugegraph-computer-operator-etcd - clusterIP: None - type: ClusterIP - sessionAffinity: None ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: etcd - namespace: system -spec: - replicas: 1 - selector: - matchLabels: - service.app: hugegraph-computer-operator-etcd - template: - metadata: - labels: - service.app: hugegraph-computer-operator-etcd - spec: - hostname: hugegraph-computer-operator-etcd-0 - subdomain: hugegraph-computer-operator-etcd - containers: - - name: hugegraph-computer-operator-etcd - image: etcd:latest - command: - - /bin/sh - - -ec - - | - HOSTNAME=$(hostname) - etcd --name ${HOSTNAME} \ - --data-dir /var/etcd/data \ - --initial-advertise-peer-urls http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2380 \ - --listen-peer-urls http://0.0.0.0:2380 \ - --listen-client-urls http://0.0.0.0:2379 \ - --advertise-client-urls http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2379 \ - --initial-cluster ${HOSTNAME}=http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2380 \ - --initial-cluster-state new - ports: - - name: client - containerPort: 2379 - - name: peer - containerPort: 2380 - livenessProbe: - exec: - command: - - /bin/sh - - '-ec' - - ETCDCTL_API=3 etcdctl endpoint status - initialDelaySeconds: 10 - timeoutSeconds: 10 - periodSeconds: 60 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - exec: - command: - - /bin/sh - - '-ec' - - ETCDCTL_API=3 etcdctl endpoint status - initialDelaySeconds: 1 - timeoutSeconds: 5 - periodSeconds: 5 - successThreshold: 1 - failureThreshold: 3 diff --git a/computer-k8s-operator/crd-generate/config/etcd/kustomization.yaml b/computer-k8s-operator/crd-generate/config/etcd/kustomization.yaml deleted file mode 100644 index bccc88eed..000000000 --- a/computer-k8s-operator/crd-generate/config/etcd/kustomization.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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. -# -resources: - - etcd_server.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: - - name: etcd - newName: quay.io/coreos/etcd - newTag: v3.5.0 -commonLabels: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 diff --git a/computer-k8s-operator/crd-generate/config/manager/controller_manager_config.yaml b/computer-k8s-operator/crd-generate/config/manager/controller_manager_config.yaml deleted file mode 100644 index d09ed679d..000000000 --- a/computer-k8s-operator/crd-generate/config/manager/controller_manager_config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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. -# -apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 -kind: ControllerManagerConfig -health: - healthProbeBindAddress: :9892 -metrics: - bindAddress: 127.0.0.1:8080 -webhook: - port: 9443 -leaderElection: - leaderElect: true - resourceName: 11f2b593.hugegraph.apache.org diff --git a/computer-k8s-operator/crd-generate/config/manager/kustomization.yaml b/computer-k8s-operator/crd-generate/config/manager/kustomization.yaml deleted file mode 100644 index 2cd2f97bb..000000000 --- a/computer-k8s-operator/crd-generate/config/manager/kustomization.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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. -# -resources: -- manager.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: - - files: - - controller_manager_config.yaml - name: manager-config -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: hugegraph/hugegraph-computer-operator - newTag: latest -- name: manager - newName: hugegraph/hugegraph-computer-operator-manager - newTag: latest -commonLabels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 diff --git a/computer-k8s-operator/crd-generate/config/manager/manager.yaml b/computer-k8s-operator/crd-generate/config/manager/manager.yaml deleted file mode 100644 index 3d5cc1aed..000000000 --- a/computer-k8s-operator/crd-generate/config/manager/manager.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: Namespace -metadata: - labels: - control-plane: controller-manager - name: system ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - labels: - control-plane: controller-manager - spec: - containers: - - name: controller - command: ["java", "-jar", "hugegraph-computer-operator.jar"] - args: [] - image: controller:latest - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - imagePullPolicy: Always - env: - - name: PROBE_PORT - value: "9892" - - name: WATCH_NAMESPACE - value: "hugegraph-computer-operator-system" - - name: RECONCILER_COUNT - value: "6" - - name: INTERNAL_ETCD_URL - value: "http://hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2379" - - name: INTERNAL_MINIO_URL - value: "http://hugegraph-computer-operator-minio.hugegraph-computer-operator-system:9000" - - name: LOG_LEVEL - value: "INFO" - - name: AUTO_DESTROY_POD - value: "true" - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - resources: - limits: - cpu: 1000m - memory: 512Mi - requests: - cpu: 250m - memory: 512Mi - - name: manager - command: - - /manager - args: - - --leader-elect - image: manager:latest - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - livenessProbe: - httpGet: - path: /health - port: &probe_port 9892 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /ready - port: *probe_port - initialDelaySeconds: 5 - periodSeconds: 10 - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - resources: - limits: - cpu: 500m - memory: 256Mi - requests: - cpu: 10m - memory: 128Mi - serviceAccountName: controller-manager - terminationGracePeriodSeconds: 10 diff --git a/computer-k8s-operator/crd-generate/config/minio/kustomization.yaml b/computer-k8s-operator/crd-generate/config/minio/kustomization.yaml deleted file mode 100644 index 6776474a3..000000000 --- a/computer-k8s-operator/crd-generate/config/minio/kustomization.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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. -# -resources: - - minio_server.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: - - name: minio - newName: quay.io/minio/minio - newTag: RELEASE.2023-10-16T04-13-43Z -commonLabels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 diff --git a/computer-k8s-operator/crd-generate/config/minio/minio_server.yaml b/computer-k8s-operator/crd-generate/config/minio/minio_server.yaml deleted file mode 100644 index 02bc642d8..000000000 --- a/computer-k8s-operator/crd-generate/config/minio/minio_server.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# -# 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. -# -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: local-storage - namespace: system -provisioner: kubernetes.io/no-provisioner -volumeBindingMode: WaitForFirstConsumer ---- -apiVersion: v1 -kind: Service -metadata: - labels: - service.app: hugegraph-computer-operator-minio - name: minio - namespace: system - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: 'true' -spec: - ports: - - name: client - port: 9000 - protocol: TCP - targetPort: 9090 - selector: - service.app: hugegraph-computer-operator-minio - clusterIP: None - type: ClusterIP - sessionAffinity: None ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: minio - namespace: system -spec: - replicas: 1 - selector: - matchLabels: - service.app: hugegraph-computer-operator-minio - template: - metadata: - labels: - service.app: hugegraph-computer-operator-minio - spec: - hostname: hugegraph-computer-operator-minio-0 - subdomain: hugegraph-computer-operator-minio - containers: - - name: hugegraph-computer-operator-minio - image: minio:latest - command: - - /bin/bash - - -c - args: - - minio server /data --console-address :9090 - env: - # MinIO access key and secret key - - name: MINIO_ACCESS_KEY - value: "minioadmin" - - name: MINIO_SECRET_KEY - value: "minioadmin" - ports: - - name: client - containerPort: 9090 - volumeMounts: - - mountPath: /data - name: localvolume # Corresponds to the `spec.volumes` Persistent Volume - livenessProbe: - httpGet: - path: /minio/health/live - port: 9000 - scheme: HTTP - initialDelaySeconds: 120 - periodSeconds: 30 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - httpGet: - path: /minio/health/ready - # TODO: check the port - port: 9000 - scheme: HTTP - initialDelaySeconds: 120 - periodSeconds: 15 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - volumes: - - name: localvolume - hostPath: # MinIO generally recommends using locally-attached volumes - path: /mnt/disk1/data # Specify a path to a local drive or volume on the Kubernetes worker node - type: DirectoryOrCreate # The path to the last directory must exist diff --git a/computer-k8s-operator/crd-generate/config/prometheus/kustomization.yaml b/computer-k8s-operator/crd-generate/config/prometheus/kustomization.yaml deleted file mode 100644 index 034a1afb5..000000000 --- a/computer-k8s-operator/crd-generate/config/prometheus/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# -# 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. -# -resources: -- monitor.yaml diff --git a/computer-k8s-operator/crd-generate/config/prometheus/monitor.yaml b/computer-k8s-operator/crd-generate/config/prometheus/monitor.yaml deleted file mode 100644 index 623b26300..000000000 --- a/computer-k8s-operator/crd-generate/config/prometheus/monitor.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# -# 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. -# -# Prometheus Monitor Service (Metrics) -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: &labels - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: controller-manager-metrics-monitor - namespace: system -spec: - endpoints: - - path: /metrics - port: https - scheme: https - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - tlsConfig: - insecureSkipVerify: true - selector: - matchLabels: - *labels diff --git a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_client_clusterrole.yaml b/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_client_clusterrole.yaml deleted file mode 100644 index 74fceca54..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_client_clusterrole.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# -# 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. -# -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: metrics-reader -rules: -- nonResourceURLs: - - "/metrics" - verbs: - - get diff --git a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role.yaml b/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role.yaml deleted file mode 100644 index 4f9d7b7ce..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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. -# -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: proxy-role -rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create diff --git a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role_binding.yaml b/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role_binding.yaml deleted file mode 100644 index d37ab2f91..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_role_binding.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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. -# -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: proxy-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_service.yaml b/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_service.yaml deleted file mode 100644 index 55f39bc77..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/auth_proxy_service.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: Service -metadata: - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - control-plane: controller-manager diff --git a/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_viewer_role.yaml b/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_viewer_role.yaml deleted file mode 100644 index f8d70341f..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_viewer_role.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# -# 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. -# -# permissions for end users to view hugegraphcomputerjobs. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: hugegraphcomputerjob-viewer-role -rules: -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs - verbs: - - get - - list - - watch -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs/status - verbs: - - get diff --git a/computer-k8s-operator/crd-generate/config/rbac/kustomization.yaml b/computer-k8s-operator/crd-generate/config/rbac/kustomization.yaml deleted file mode 100644 index 4b99a558f..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/kustomization.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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. -# -resources: -# All RBAC will be applied under this service account in -# the deployment namespace. You may comment out this resource -# if your manager will use a service account that exists at -# runtime. Be sure to update RoleBinding and ClusterRoleBinding -# subjects if changing service account names. -- service_account.yaml -- role.yaml -- role_binding.yaml -- leader_election_role.yaml -- leader_election_role_binding.yaml -# Comment the following 4 lines if you want to disable -# the auth proxy (https://github.com/brancz/kube-rbac-proxy) -# which protects your /metrics endpoint. -- auth_proxy_service.yaml -- auth_proxy_role.yaml -- auth_proxy_role_binding.yaml -- auth_proxy_client_clusterrole.yaml - -commonLabels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 diff --git a/computer-k8s-operator/crd-generate/config/rbac/leader_election_role.yaml b/computer-k8s-operator/crd-generate/config/rbac/leader_election_role.yaml deleted file mode 100644 index 1b1ffbde5..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/leader_election_role.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# -# 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. -# -# permissions to do leader election. -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: leader-election-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch diff --git a/computer-k8s-operator/crd-generate/config/rbac/leader_election_role_binding.yaml b/computer-k8s-operator/crd-generate/config/rbac/leader_election_role_binding.yaml deleted file mode 100644 index d1dfb64b7..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/leader_election_role_binding.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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. -# -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: leader-election-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: leader-election-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/computer-k8s-operator/crd-generate/config/rbac/role.yaml b/computer-k8s-operator/crd-generate/config/rbac/role.yaml deleted file mode 100644 index 7b2ad6d2c..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/role.yaml +++ /dev/null @@ -1,205 +0,0 @@ -# -# 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. -# ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - name: manager-role -rules: -- apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - deployments/status - verbs: - - get -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - statefulsets/status - verbs: - - get -- apiGroups: - - batch - resources: - - jobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - batch - resources: - - jobs/status - verbs: - - get -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events/status - verbs: - - get -- apiGroups: - - "" - resources: - - namespaces - verbs: - - create - - get - - update -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods/log - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods/status - verbs: - - get -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services/status - verbs: - - get -- apiGroups: - - extensions - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - extensions - resources: - - ingresses/status - verbs: - - get -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs/finalizers - verbs: - - update -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs/status - verbs: - - get - - patch - - update diff --git a/computer-k8s-operator/crd-generate/config/rbac/role_binding.yaml b/computer-k8s-operator/crd-generate/config/rbac/role_binding.yaml deleted file mode 100644 index a285fd3b5..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/role_binding.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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. -# -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: manager-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/computer-k8s-operator/crd-generate/config/rbac/service_account.yaml b/computer-k8s-operator/crd-generate/config/rbac/service_account.yaml deleted file mode 100644 index f19115dc5..000000000 --- a/computer-k8s-operator/crd-generate/config/rbac/service_account.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: ServiceAccount -metadata: - name: controller-manager - namespace: system diff --git a/computer-k8s-operator/crd-generate/config/samples/kustomization.yaml b/computer-k8s-operator/crd-generate/config/samples/kustomization.yaml deleted file mode 100644 index 841827269..000000000 --- a/computer-k8s-operator/crd-generate/config/samples/kustomization.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# -# 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. -# -## Append samples of your project ## -resources: -- operator_v1_hugegraphcomputerjob.yaml -#+kubebuilder:scaffold:manifestskustomizesamples diff --git a/computer-k8s-operator/crd-generate/config/samples/operator_v1_hugegraphcomputerjob.yaml b/computer-k8s-operator/crd-generate/config/samples/operator_v1_hugegraphcomputerjob.yaml deleted file mode 100644 index 09402d377..000000000 --- a/computer-k8s-operator/crd-generate/config/samples/operator_v1_hugegraphcomputerjob.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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. -# -apiVersion: operator.hugegraph.apache.org/v1 -kind: HugeGraphComputerJob -metadata: - name: hugegraphcomputerjob-sample -spec: - # TODO(user): Add fields here diff --git a/computer-k8s-operator/crd-generate/config/webhook/kustomization.yaml b/computer-k8s-operator/crd-generate/config/webhook/kustomization.yaml deleted file mode 100644 index 84892c8a9..000000000 --- a/computer-k8s-operator/crd-generate/config/webhook/kustomization.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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. -# -resources: -- manifests.yaml -- service.yaml - -configurations: -- kustomizeconfig.yaml diff --git a/computer-k8s-operator/crd-generate/config/webhook/kustomizeconfig.yaml b/computer-k8s-operator/crd-generate/config/webhook/kustomizeconfig.yaml deleted file mode 100644 index b1396e764..000000000 --- a/computer-k8s-operator/crd-generate/config/webhook/kustomizeconfig.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# -# 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. -# -# the following config is for teaching kustomize where to look at when substituting nameReference. -# It requires kustomize v2.1.0 or newer to work properly. -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - - kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - -namespace: -- kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true -- kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true - -varReference: - - path: metadata/annotations \ No newline at end of file diff --git a/computer-k8s-operator/crd-generate/config/webhook/service.yaml b/computer-k8s-operator/crd-generate/config/webhook/service.yaml deleted file mode 100644 index 6944927f9..000000000 --- a/computer-k8s-operator/crd-generate/config/webhook/service.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: Service -metadata: - name: webhook-service - namespace: system -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - control-plane: controller-manager diff --git a/computer-k8s-operator/crd-generate/go.mod b/computer-k8s-operator/crd-generate/go.mod deleted file mode 100644 index c539cfabf..000000000 --- a/computer-k8s-operator/crd-generate/go.mod +++ /dev/null @@ -1,71 +0,0 @@ -module hugegraph.apache.org/operator - -go 1.19 - -require ( - github.com/fabric8io/kubernetes-client/generator v0.0.0-20210604075820-b0890fa05358 - github.com/onsi/ginkgo/v2 v2.6.0 - github.com/onsi/gomega v1.24.1 - k8s.io/api v0.26.1 - k8s.io/apimachinery v0.26.1 - k8s.io/client-go v0.26.1 - sigs.k8s.io/controller-runtime v0.14.4 -) - -require ( - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect - github.com/imdario/mergo v0.3.6 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect - golang.org/x/time v0.3.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/component-base v0.26.1 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect -) diff --git a/computer-k8s-operator/crd-generate/hack/boilerplate.go.txt b/computer-k8s-operator/crd-generate/hack/boilerplate.go.txt deleted file mode 100644 index 65b862271..000000000 --- a/computer-k8s-operator/crd-generate/hack/boilerplate.go.txt +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2023. - -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. -*/ \ No newline at end of file diff --git a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml b/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml deleted file mode 100644 index 97d8909c9..000000000 --- a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml +++ /dev/null @@ -1,1091 +0,0 @@ -# -# 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. -# ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.5.0 - creationTimestamp: null - name: hugegraphcomputerjobs.operator.hugegraph.apache.org -spec: - additionalPrinterColumns: - - JSONPath: .spec.jobId - name: JobId - type: string - - JSONPath: .status.jobStatus - name: JobStatus - type: string - - JSONPath: .status.jobState.superstep - name: Superstep - type: integer - - JSONPath: .status.jobState.maxSuperstep - name: MaxSuperstep - type: integer - - JSONPath: .status.jobState.lastSuperstepStat - name: SuperstepStat - type: string - group: operator.hugegraph.apache.org - names: - kind: HugeGraphComputerJob - listKind: HugeGraphComputerJobList - plural: hugegraphcomputerjobs - shortNames: - - hcjob - singular: hugegraphcomputerjob - preserveUnknownFields: false - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - algorithmName: - type: string - computerConf: - additionalProperties: - type: string - type: object - configMapPaths: - additionalProperties: - type: string - type: object - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - envVars: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - type: string - jarFile: - type: string - jobId: - type: string - jvmOptions: - type: string - log4jXml: - type: string - masterArgs: - items: - type: string - type: array - masterCommand: - items: - type: string - type: array - masterCpu: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - masterMemory: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - podTemplateSpec: - x-kubernetes-preserve-unknown-fields: true - pullPolicy: - enum: - - Always - - Never - - IfNotPresent - type: string - pullSecrets: - items: - properties: - name: - type: string - type: object - type: array - remoteJarUri: - pattern: ^(http|https):\/\/([\w.]+\/?)\S*$ - type: string - secretPaths: - additionalProperties: - type: string - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - workerArgs: - items: - type: string - type: array - workerCommand: - items: - type: string - type: array - workerCpu: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - workerInstances: - format: int32 - minimum: 1 - type: integer - workerMemory: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - algorithmName - - computerConf - - image - - jobId - - workerInstances - type: object - status: - properties: - componentStates: - properties: - configMap: - properties: - errorLog: - type: string - message: - type: string - name: - type: string - state: - type: string - required: - - name - - state - type: object - masterJob: - properties: - errorLog: - type: string - message: - type: string - name: - type: string - state: - type: string - required: - - name - - state - type: object - workerJob: - properties: - errorLog: - type: string - message: - type: string - name: - type: string - state: - type: string - required: - - name - - state - type: object - type: object - jobState: - properties: - lastSuperstepStat: - type: string - maxSuperstep: - format: int32 - type: integer - superstep: - format: int32 - type: integer - type: object - jobStatus: - type: string - lastUpdateTime: - format: date-time - type: string - required: - - jobStatus - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml b/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml deleted file mode 100644 index 9949da76f..000000000 --- a/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml +++ /dev/null @@ -1,806 +0,0 @@ -# -# 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. -# -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - control-plane: controller-manager - name: hugegraph-computer-operator-system ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-local-storage - namespace: system -provisioner: kubernetes.io/no-provisioner -volumeBindingMode: WaitForFirstConsumer ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-controller-manager - namespace: hugegraph-computer-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-leader-election-role - namespace: hugegraph-computer-operator-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-manager-role -rules: -- apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - deployments/status - verbs: - - get -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - statefulsets/status - verbs: - - get -- apiGroups: - - batch - resources: - - jobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - batch - resources: - - jobs/status - verbs: - - get -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events/status - verbs: - - get -- apiGroups: - - "" - resources: - - namespaces - verbs: - - create - - get - - update -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods/log - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods/status - verbs: - - get -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services/status - verbs: - - get -- apiGroups: - - extensions - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - extensions - resources: - - ingresses/status - verbs: - - get -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs/finalizers - verbs: - - update -- apiGroups: - - operator.hugegraph.apache.org - resources: - - hugegraphcomputerjobs/status - verbs: - - get - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-metrics-reader -rules: -- nonResourceURLs: - - /metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-proxy-role -rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-leader-election-rolebinding - namespace: hugegraph-computer-operator-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: hugegraph-computer-operator-leader-election-role -subjects: -- kind: ServiceAccount - name: hugegraph-computer-operator-controller-manager - namespace: hugegraph-computer-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: hugegraph-computer-operator-manager-role -subjects: -- kind: ServiceAccount - name: hugegraph-computer-operator-controller-manager - namespace: hugegraph-computer-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: hugegraph-computer-operator-proxy-role -subjects: -- kind: ServiceAccount - name: hugegraph-computer-operator-controller-manager - namespace: hugegraph-computer-operator-system ---- -apiVersion: v1 -data: - controller_manager_config.yaml: | - # - # 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. - # - apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 - kind: ControllerManagerConfig - health: - healthProbeBindAddress: :9892 - metrics: - bindAddress: 127.0.0.1:8080 - webhook: - port: 9443 - leaderElection: - leaderElect: true - resourceName: 11f2b593.hugegraph.apache.org -kind: ConfigMap -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-manager-config - namespace: hugegraph-computer-operator-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-controller-manager-metrics-service - namespace: hugegraph-computer-operator-system -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - control-plane: controller-manager ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" - labels: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-etcd - name: hugegraph-computer-operator-etcd - namespace: hugegraph-computer-operator-system -spec: - clusterIP: None - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: peer - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-etcd - sessionAffinity: None - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" - labels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-minio - name: hugegraph-computer-operator-minio - namespace: hugegraph-computer-operator-system -spec: - clusterIP: None - ports: - - name: client - port: 9000 - protocol: TCP - targetPort: 9090 - selector: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-minio - sessionAffinity: None - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - name: hugegraph-computer-operator-webhook-service - namespace: hugegraph-computer-operator-system -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - control-plane: controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - control-plane: controller-manager - name: hugegraph-computer-operator-controller-manager - namespace: hugegraph-computer-operator-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - control-plane: controller-manager - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - labels: - app.kubernetes.io/name: hugegraph-computer-operator - app.kubernetes.io/version: v1 - control-plane: controller-manager - spec: - containers: - - args: - - --leader-elect - command: - - /manager - image: hugegraph/hugegraph-computer-operator-manager:latest - livenessProbe: - httpGet: - path: /health - port: 9892 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - readinessProbe: - httpGet: - path: /ready - port: 9892 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 256Mi - requests: - cpu: 10m - memory: 128Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - - args: [] - command: - - java - - -jar - - hugegraph-computer-operator.jar - env: - - name: PROBE_PORT - value: "9892" - - name: WATCH_NAMESPACE - value: hugegraph-computer-operator-system - - name: RECONCILER_COUNT - value: "6" - - name: INTERNAL_ETCD_URL - value: http://hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2379 - - name: INTERNAL_MINIO_URL - value: http://hugegraph-computer-operator-minio.hugegraph-computer-operator-system:9000 - - name: LOG_LEVEL - value: INFO - - name: AUTO_DESTROY_POD - value: "true" - image: hugegraph/hugegraph-computer-operator:latest - imagePullPolicy: Always - name: controller - resources: - limits: - cpu: 1000m - memory: 512Mi - requests: - cpu: 250m - memory: 512Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - serviceAccountName: hugegraph-computer-operator-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: webhook-server-cert ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-etcd - namespace: hugegraph-computer-operator-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-etcd - template: - metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator-etcd - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-etcd - spec: - containers: - - command: - - /bin/sh - - -ec - - | - HOSTNAME=$(hostname) - etcd --name ${HOSTNAME} \ - --data-dir /var/etcd/data \ - --initial-advertise-peer-urls http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2380 \ - --listen-peer-urls http://0.0.0.0:2380 \ - --listen-client-urls http://0.0.0.0:2379 \ - --advertise-client-urls http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2379 \ - --initial-cluster ${HOSTNAME}=http://${HOSTNAME}.hugegraph-computer-operator-etcd.hugegraph-computer-operator-system:2380 \ - --initial-cluster-state new - image: quay.io/coreos/etcd:v3.5.0 - livenessProbe: - exec: - command: - - /bin/sh - - -ec - - ETCDCTL_API=3 etcdctl endpoint status - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 60 - successThreshold: 1 - timeoutSeconds: 10 - name: hugegraph-computer-operator-etcd - ports: - - containerPort: 2379 - name: client - - containerPort: 2380 - name: peer - readinessProbe: - exec: - command: - - /bin/sh - - -ec - - ETCDCTL_API=3 etcdctl endpoint status - failureThreshold: 3 - initialDelaySeconds: 1 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 5 - hostname: hugegraph-computer-operator-etcd-0 - subdomain: hugegraph-computer-operator-etcd ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - name: hugegraph-computer-operator-minio - namespace: hugegraph-computer-operator-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-minio - template: - metadata: - labels: - app.kubernetes.io/name: hugegraph-computer-operator-minio - app.kubernetes.io/version: v1 - service.app: hugegraph-computer-operator-minio - spec: - containers: - - args: - - minio server /data --console-address :9090 - command: - - /bin/bash - - -c - env: - - name: MINIO_ACCESS_KEY - value: minioadmin - - name: MINIO_SECRET_KEY - value: minioadmin - image: quay.io/minio/minio:RELEASE.2023-10-16T04-13-43Z - livenessProbe: - failureThreshold: 3 - httpGet: - path: /minio/health/live - port: 9000 - scheme: HTTP - initialDelaySeconds: 120 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 10 - name: hugegraph-computer-operator-minio - ports: - - containerPort: 9090 - name: client - readinessProbe: - failureThreshold: 3 - httpGet: - path: /minio/health/ready - port: 9000 - scheme: HTTP - initialDelaySeconds: 120 - periodSeconds: 15 - successThreshold: 1 - timeoutSeconds: 10 - volumeMounts: - - mountPath: /data - name: localvolume - hostname: hugegraph-computer-operator-minio-0 - subdomain: hugegraph-computer-operator-minio - volumes: - - hostPath: - path: /mnt/disk1/data - type: DirectoryOrCreate - name: localvolume ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: hugegraph-computer-operator-serving-cert - namespace: hugegraph-computer-operator-system -spec: - dnsNames: - - hugegraph-computer-operator-webhook-service.hugegraph-computer-operator-system.svc - - hugegraph-computer-operator-webhook-service.hugegraph-computer-operator-system.svc.cluster.local - issuerRef: - kind: Issuer - name: hugegraph-computer-operator-selfsigned-issuer - secretName: webhook-server-cert ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: hugegraph-computer-operator-selfsigned-issuer - namespace: hugegraph-computer-operator-system -spec: - selfSigned: {} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: hugegraph-computer-operator-system/hugegraph-computer-operator-serving-cert - name: hugegraph-computer-operator-mutating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: hugegraph-computer-operator-webhook-service - namespace: hugegraph-computer-operator-system - path: /mutate-operator-hugegraph-apache-org-v1-hugegraphcomputerjob - failurePolicy: Fail - name: mhugegraphcomputerjob.kb.io - rules: - - apiGroups: - - operator.hugegraph.apache.org - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - hugegraphcomputerjobs - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: hugegraph-computer-operator-system/hugegraph-computer-operator-serving-cert - name: hugegraph-computer-operator-validating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: hugegraph-computer-operator-webhook-service - namespace: hugegraph-computer-operator-system - path: /validate-operator-hugegraph-apache-org-v1-hugegraphcomputerjob - failurePolicy: Fail - name: vhugegraphcomputerjob.kb.io - rules: - - apiGroups: - - operator.hugegraph.apache.org - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - hugegraphcomputerjobs - sideEffects: None diff --git a/computer-k8s-operator/pom.xml b/computer-k8s-operator/pom.xml deleted file mode 100644 index 5ff2ed2c5..000000000 --- a/computer-k8s-operator/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-k8s-operator - - - - org.apache.hugegraph - computer-k8s - ${revision} - - - - - hugegraph-computer-operator-${revision} - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - *:* - - - - - org.apache.hugegraph.computer.k8s.operator.OperatorEntrypoint - - - - - - UTF-8 - - - - - - - - - diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java deleted file mode 100644 index c440551ad..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/OperatorEntrypoint.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator; - -import java.io.IOException; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.InetSocketAddress; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TimeZone; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; - -import org.apache.commons.configuration2.MapConfiguration; -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.computer.k8s.operator.common.AbstractController; -import org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions; -import org.apache.hugegraph.computer.k8s.operator.controller.ComputerJobController; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.OptionSpace; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.apache.logging.log4j.LogManager; -import org.slf4j.Logger; - -import com.sun.net.httpserver.HttpServer; - -import io.fabric8.kubernetes.api.model.ConfigMap; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.NamespaceBuilder; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.batch.v1.Job; -import io.fabric8.kubernetes.client.DefaultKubernetesClient; -import io.fabric8.kubernetes.client.NamespacedKubernetesClient; -import io.fabric8.kubernetes.client.informers.SharedInformerFactory; -import io.fabric8.kubernetes.client.utils.Utils; - -/** - * The OperatorEntrypoint class is the main entry point for the Kubernetes operator. - * It sets up the Kubernetes client, registers controllers, and starts the HTTP server for - * health checks. - */ -public class OperatorEntrypoint { - - private static final Logger LOG = Log.logger(OperatorEntrypoint.class); - - private final HugeConfig config; - private final List> controllers; - private NamespacedKubernetesClient kubeClient; - private SharedInformerFactory informerFactory; - private ExecutorService controllerPool; - private HttpServer httpServer; - - public static void main(String[] args) { - OperatorEntrypoint operatorEntrypoint = new OperatorEntrypoint(); - Runtime.getRuntime().addShutdownHook(new Thread(operatorEntrypoint::shutdown)); - operatorEntrypoint.start(); - } - - static { - OptionSpace.register("computer-k8s-operator", - "org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions" - ); - } - - public OperatorEntrypoint() { - this.config = this.configFromSysPropsOrEnvVars(); - this.controllers = new ArrayList<>(); - - // Set time zone from config - String timezone = this.config.get(OperatorOptions.TIMEZONE); - TimeZone.setDefault(TimeZone.getTimeZone(timezone)); - } - - public void start() { - try { - this.kubeClient = new DefaultKubernetesClient(); - String watchNamespace = this.config.get(OperatorOptions.WATCH_NAMESPACE); - if (!Objects.equals(watchNamespace, Constants.ALL_NAMESPACE)) { - this.createNamespace(watchNamespace); - this.kubeClient = this.kubeClient.inNamespace(watchNamespace); - } - this.informerFactory = this.kubeClient.informers(); - LOG.info("Watch namespace: " + watchNamespace); - - this.addHealthCheck(); - this.registerControllers(); - - this.informerFactory.startAllRegisteredInformers(); - this.informerFactory.addSharedInformerEventListener(exception -> { - LOG.error("Informer event listener exception occurred", exception); - OperatorEntrypoint.this.shutdown(); - }); - - // Start all controllers - this.controllerPool = ExecutorUtil.newFixedThreadPool(this.controllers.size(), - "controllers-%d"); - CountDownLatch latch = new CountDownLatch(this.controllers.size()); - List> futures = new ArrayList<>(); - for (AbstractController controller : this.controllers) { - futures.add(CompletableFuture.runAsync(() -> { - controller.run(latch); - }, this.controllerPool)); - } - - // Block until controller startup is complete - CompletableFuture.runAsync(() -> { - try { - latch.await(); - this.addReadyCheck(); - LOG.info("The Operator has been ready"); - } catch (Throwable e) { - LOG.error("Failed to set up ready check"); - OperatorEntrypoint.this.shutdown(); - } - }); - - CompletableFuture.anyOf(futures.toArray(new CompletableFuture[]{})).get(); - } catch (Throwable throwable) { - LOG.error("Failed to start Operator: ", throwable); - } finally { - this.shutdown(); - } - } - - public synchronized void shutdown() { - LOG.info("The Operator shutdown..."); - - Iterator> iterator = this.controllers.iterator(); - while (iterator.hasNext()) { - AbstractController controller = iterator.next(); - if (controller != null) { - controller.shutdown(); - } - iterator.remove(); - } - - if (this.controllerPool != null) { - this.controllerPool.shutdown(); - this.controllerPool = null; - } - - if (this.informerFactory != null) { - this.informerFactory.stopAllRegisteredInformers(); - this.informerFactory = null; - } - - if (this.kubeClient != null) { - this.kubeClient.close(); - this.kubeClient = null; - } - - if (this.httpServer != null) { - this.httpServer.stop(0); - this.httpServer = null; - } - - LogManager.shutdown(); - } - - private HugeConfig configFromSysPropsOrEnvVars() { - Map confMap = new HashMap<>(); - Set keys = OperatorOptions.instance().options().keySet(); - for (String key : keys) { - String envKey = key.substring(Constants.K8S_SPEC_PREFIX.length()) - .toUpperCase(Locale.ROOT); - String value = Utils.getSystemPropertyOrEnvVar(envKey); - if (StringUtils.isNotBlank(value)) { - confMap.put(key, value); - } - } - MapConfiguration configuration = new MapConfiguration(confMap); - return new HugeConfig(configuration); - } - - private void registerControllers() { - ComputerJobController jobController = new ComputerJobController(this.config, - this.kubeClient); - this.registerController(jobController, ConfigMap.class, Job.class, Pod.class); - } - - @SafeVarargs - private void registerController(AbstractController controller, - Class... ownsClass) { - controller.register(this.informerFactory, ownsClass); - this.controllers.add(controller); - } - - private void addHealthCheck() throws IOException { - Integer probePort = this.config.get(OperatorOptions.PROBE_PORT); - InetSocketAddress address = new InetSocketAddress(probePort); - Integer probeBacklog = this.config.get(OperatorOptions.PROBE_BACKLOG); - this.httpServer = HttpServer.create(address, probeBacklog); - this.httpServer.createContext("/health", httpExchange -> { - byte[] bytes = "ALL GOOD!".getBytes(StandardCharsets.UTF_8); - httpExchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length); - OutputStream responseBody = httpExchange.getResponseBody(); - responseBody.write(bytes); - responseBody.close(); - }); - this.httpServer.start(); - } - - private void addReadyCheck() { - this.httpServer.createContext("/ready", httpExchange -> { - byte[] bytes = "ALL Ready!".getBytes(StandardCharsets.UTF_8); - httpExchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length); - OutputStream responseBody = httpExchange.getResponseBody(); - responseBody.write(bytes); - responseBody.close(); - }); - } - - private void createNamespace(String namespace) { - NamespaceBuilder builder = new NamespaceBuilder().withNewMetadata() - .withName(namespace) - .endMetadata(); - KubeUtil.ignoreExists(() -> { - return this.kubeClient.namespaces().create(builder.build()); - }); - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/AbstractController.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/AbstractController.java deleted file mode 100644 index bad4566e7..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/AbstractController.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.common; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.k8s.crd.model.EventType; -import org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.collect.Sets; - -import io.fabric8.kubernetes.api.model.Event; -import io.fabric8.kubernetes.api.model.EventSource; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.LabelSelector; -import io.fabric8.kubernetes.api.model.OwnerReference; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.batch.v1.Job; -import io.fabric8.kubernetes.client.CustomResource; -import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.NamespacedKubernetesClient; -import io.fabric8.kubernetes.client.informers.ResourceEventHandler; -import io.fabric8.kubernetes.client.informers.SharedIndexInformer; -import io.fabric8.kubernetes.client.informers.SharedInformer; -import io.fabric8.kubernetes.client.informers.SharedInformerFactory; -import io.fabric8.kubernetes.client.informers.cache.Cache; -import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil; -import io.fabric8.kubernetes.client.utils.Serialization; - -public abstract class AbstractController> { - - private static final Logger LOG = Log.logger(AbstractController.class); - - private final Class crClass; - private final String kind; - protected final HugeConfig config; - protected final NamespacedKubernetesClient kubeClient; - private final WorkQueue workQueue; - private final ScheduledExecutorService executor; - private Set> ownsClassSet; - private Map, - SharedIndexInformer> informerMap; - - public AbstractController(HugeConfig config, - NamespacedKubernetesClient kubeClient) { - this.config = config; - this.crClass = this.getCRClass(); - this.kind = HasMetadata.getKind(this.crClass).toLowerCase(Locale.ROOT); - this.kubeClient = kubeClient; - this.workQueue = new WorkQueue<>(); - Integer reconcilers = this.config.get(OperatorOptions.RECONCILER_COUNT); - this.executor = ExecutorUtil.newScheduledThreadPool(reconcilers, - this.kind + - "-reconciler-%d"); - } - - @SafeVarargs - public final void register(SharedInformerFactory informerFactory, - Class... ownsClass) { - Long resyncPeriod = this.config.get(OperatorOptions.RESYNC_PERIOD); - this.ownsClassSet = Sets.newHashSet(ownsClass); - this.informerMap = new ConcurrentHashMap<>(); - this.registerCREvent(informerFactory, resyncPeriod); - this.registerOwnsEvent(informerFactory, resyncPeriod); - } - - public void run(CountDownLatch readyLatch) { - LOG.info("Starting the {}-controller...", this.kind); - - if (!this.hasSynced()) { - LOG.error("Failed to start {}-controller: Timed out waiting " + - "for informer to be synced", this.kind); - return; - } - - Integer reconcilers = this.config.get(OperatorOptions.RECONCILER_COUNT); - CountDownLatch latch = new CountDownLatch(reconcilers); - for (int i = 0; i < reconcilers; i++) { - this.executor.scheduleWithFixedDelay(() -> { - try { - this.startWorker(); - } catch (Throwable e) { - LOG.error("Unexpected reconcile loop abortion", e); - } finally { - latch.countDown(); - } - }, - Duration.ZERO.toMillis(), - Duration.ofSeconds(1L).toMillis(), TimeUnit.MILLISECONDS - ); - } - - readyLatch.countDown(); - - try { - latch.await(); - } catch (InterruptedException e) { - LOG.error("Aborting {}-controller.", this.kind, e); - } finally { - LOG.info("The {}-controller exited", this.kind); - } - } - - public void shutdown() { - this.workQueue.shutdown(); - this.executor.shutdown(); - Long timeout = this.config - .get(OperatorOptions.CLOSE_RECONCILER_TIMEOUT); - try { - this.executor.awaitTermination(timeout, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - - protected abstract OperatorResult reconcile(OperatorRequest request); - - protected abstract void handleFailOverLimit(OperatorRequest request, - Exception e); - - private void startWorker() { - while (!this.executor.isShutdown() && - !this.workQueue.isShutdown() && - !Thread.currentThread().isInterrupted()) { - LOG.debug("Trying to get item from work queue of {}-controller", - this.kind); - OperatorRequest request = null; - try { - request = this.workQueue.get(); - } catch (InterruptedException e) { - LOG.warn("The {}-controller worker interrupted...", - this.kind, e); - } - if (request == null) { - LOG.info("The {}-controller worker exiting...", this.kind); - break; - } - OperatorResult result; - try { - LOG.debug("Start reconcile request: {}", request); - result = this.reconcile(request); - } catch (Exception e) { - LOG.error("Reconcile occur error, requeue request: ", e); - int maxReconcileRetry = this.config.get( - OperatorOptions.MAX_RECONCILE_RETRY); - if (request.retryIncrGet() > maxReconcileRetry) { - try { - this.handleFailOverLimit(request, e); - } catch (Exception e2) { - LOG.error("Reconcile fail over limit occur error:", e2); - } - result = OperatorResult.NO_REQUEUE; - } else { - result = OperatorResult.REQUEUE; - } - } - - try { - if (result.requeue()) { - this.enqueueRequest(request); - } - } finally { - LOG.debug("End reconcile request: {}", request); - this.workQueue.done(request); - } - } - } - - protected void registerCREvent(SharedInformerFactory informerFactory, - long resyncPeriod) { - SharedIndexInformer crInformer = - informerFactory.sharedIndexInformerForCustomResource(this.crClass, - resyncPeriod); - crInformer.addEventHandler(new ResourceEventHandler() { - @Override - public void onAdd(T cr) { - LOG.info("Received a CR add request: {}", cr.getMetadata()); - OperatorRequest request = OperatorRequest.parseRequestByCR(cr); - AbstractController.this.enqueueRequest(request); - } - - @Override - public void onUpdate(T oldCR, T cr) { - LOG.info("Received a CR update request: {}", cr.getMetadata()); - OperatorRequest request = OperatorRequest.parseRequestByCR(cr); - AbstractController.this.enqueueRequest(request); - } - - @Override - public void onDelete(T cr, boolean deletedStateUnknown) { - LOG.info("Received a CR delete request: {}", cr.getMetadata()); - OperatorRequest request = OperatorRequest.parseRequestByCR(cr); - AbstractController.this.enqueueRequest(request); - } - }); - this.informerMap.put(this.crClass, crInformer); - } - - protected void registerOwnsEvent(SharedInformerFactory informerFactory, - long resyncPeriod) { - this.ownsClassSet.forEach(ownsClass -> { - @SuppressWarnings("unchecked") - SharedIndexInformer informer = - informerFactory.sharedIndexInformerFor( - (Class) ownsClass, resyncPeriod); - - informer.addEventHandler(new ResourceEventHandler() { - @Override - public void onAdd(HasMetadata resource) { - AbstractController.this.handleOwnsResource(resource); - } - - @Override - public void onUpdate(HasMetadata oldResource, - HasMetadata newResource) { - String oldVersion = oldResource.getMetadata() - .getResourceVersion(); - String newVersion = newResource.getMetadata() - .getResourceVersion(); - if (Objects.equals(oldVersion, newVersion)) { - return; - } - AbstractController.this.handleOwnsResource(newResource); - } - - @Override - public void onDelete(HasMetadata resource, boolean b) { - AbstractController.this.handleOwnsResource(resource); - } - }); - - this.informerMap.put(ownsClass, informer); - }); - } - - protected T getCR(OperatorRequest request) { - return this.getResourceByName(request.namespace(), request.name(), - this.crClass); - } - - protected R getResourceByName(String namespace, - String name, - Class rClass) { - @SuppressWarnings("unchecked") - SharedIndexInformer informer = (SharedIndexInformer) - this.informerMap.get(rClass); - String key = new OperatorRequest(namespace, name).key(); - R resource = informer.getIndexer().getByKey(key); - if (resource == null) { - return null; - } - return Serialization.clone(resource); - } - - protected List getResourceList(String namespace, - Class rClass) { - @SuppressWarnings("unchecked") - SharedIndexInformer informer = (SharedIndexInformer) - this.informerMap.get(rClass); - List rs = informer.getIndexer() - .byIndex(Cache.NAMESPACE_INDEX, namespace); - if (CollectionUtils.isEmpty(rs)) { - return rs; - } - for (int i = 0; i < rs.size(); i++) { - rs.set(i, Serialization.clone(rs.get(i))); - } - return rs; - } - - protected List getResourceListWithLabels( - String namespace, Class rClass, - Map matchLabels) { - @SuppressWarnings("unchecked") - SharedIndexInformer informer = (SharedIndexInformer) - this.informerMap.get(rClass); - List rs = informer.getIndexer() - .byIndex(Cache.NAMESPACE_INDEX, namespace); - if (CollectionUtils.isEmpty(rs)) { - return rs; - } - - if (MapUtils.isEmpty(matchLabels)) { - return this.getResourceList(namespace, rClass); - } - - List matchRS = new ArrayList<>(); - - Set> matchLabelSet = matchLabels.entrySet(); - for (R r : rs) { - Map label = KubernetesResourceUtil - .getLabels(r.getMetadata()); - if (MapUtils.isEmpty(label)) { - continue; - } - if (label.entrySet().containsAll(matchLabelSet)) { - matchRS.add(Serialization.clone(r)); - } - } - - return matchRS; - } - - protected List getPodsByJob(Job job) { - String namespace = job.getMetadata().getNamespace(); - LabelSelector selector = job.getSpec().getSelector(); - - if (selector != null) { - Map matchLabels = selector.getMatchLabels(); - if (MapUtils.isNotEmpty(matchLabels)) { - return this.getResourceListWithLabels(namespace, Pod.class, - matchLabels); - } - } - return Collections.emptyList(); - } - - protected void recordEvent(HasMetadata eventRef, - EventType eventType, String eventName, - String reason, String message) { - String component = HasMetadata.getKind(this.crClass) + "Operator"; - EventSource eventSource = new EventSource(); - eventSource.setComponent(component); - Event event = KubeUtil.buildEvent(eventRef, eventSource, - eventType, eventName, - reason, message); - KubernetesClient client = this.kubeClient; - String namespace = event.getMetadata().getNamespace(); - if (!Objects.equals(this.kubeClient.getNamespace(), namespace)) { - client = this.kubeClient.inNamespace(namespace); - } - client.v1().events().createOrReplace(event); - } - - private void handleOwnsResource(HasMetadata ownsResource) { - MatchWithMsg ownsMatch = this.ownsPredicate(ownsResource); - if (ownsMatch.isMatch()) { - String namespace = ownsResource.getMetadata().getNamespace(); - OperatorRequest request = new OperatorRequest(namespace, - ownsMatch.msg()); - this.enqueueRequest(request); - } - } - - protected MatchWithMsg ownsPredicate(HasMetadata ownsResource) { - OwnerReference owner = this.getControllerOf(ownsResource); - if (owner != null && owner.getController() && - StringUtils.isNotBlank(owner.getName()) && - StringUtils.equalsIgnoreCase(owner.getKind(), this.kind)) { - return new MatchWithMsg(true, owner.getName()); - } - return MatchWithMsg.NO_MATCH; - } - - protected OwnerReference getControllerOf(HasMetadata resource) { - List ownerReferences = resource.getMetadata() - .getOwnerReferences(); - for (OwnerReference ownerReference : ownerReferences) { - if (Boolean.TRUE.equals(ownerReference.getController())) { - return ownerReference; - } - } - return null; - } - - private void enqueueRequest(OperatorRequest request) { - if (request != null) { - LOG.debug("Enqueue a resource request: {}", request); - this.workQueue.add(request); - } - } - - private boolean hasSynced() { - if (MapUtils.isEmpty(this.informerMap)) { - return true; - } - - Long internal = this.config.get(OperatorOptions.READY_CHECK_INTERNAL); - Long timeout = this.config.get(OperatorOptions.READY_TIMEOUT); - boolean synced; - synced = KubeUtil - .waitUntilReady(Duration.ZERO, - Duration.ofMillis(internal), - Duration.ofMillis(timeout), - () -> { - return this.informerMap - .values().stream() - .allMatch(SharedInformer::hasSynced); - }, - this.executor); - return synced; - } - - private Class getCRClass() { - Type type = this.getClass().getGenericSuperclass(); - ParameterizedType parameterizedType = (ParameterizedType) type; - Type[] types = parameterizedType.getActualTypeArguments(); - @SuppressWarnings("unchecked") - Class crClass = (Class) types[0]; - return crClass; - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/MatchWithMsg.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/MatchWithMsg.java deleted file mode 100644 index 181c46de6..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/MatchWithMsg.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.common; - -public class MatchWithMsg { - - private final boolean match; - private final String msg; - - public static final MatchWithMsg NO_MATCH = new MatchWithMsg(false, null); - - public MatchWithMsg(boolean match, String msg) { - this.match = match; - this.msg = msg; - } - - public String msg() { - return this.msg; - } - - public boolean isMatch() { - return this.match; - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorRequest.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorRequest.java deleted file mode 100644 index 5236bba6f..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorRequest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.common; - -import java.util.Objects; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.driver.util.JsonUtil; -import org.apache.hugegraph.util.E; - -import io.fabric8.kubernetes.api.model.ObjectMeta; -import io.fabric8.kubernetes.client.CustomResource; -import io.fabric8.kubernetes.client.informers.cache.Cache; - -public class OperatorRequest { - - private String namespace; - private String name; - private final AtomicInteger retryTimes; - - public static OperatorRequest parseRequestByCR( - CustomResource resource) { - E.checkNotNull(resource, "resource"); - ObjectMeta metadata = resource.getMetadata(); - E.checkNotNull(resource, "metadata"); - String name = metadata.getName(); - E.checkArgument(StringUtils.isNotBlank(name), "resourceName"); - return new OperatorRequest(metadata.getNamespace(), name); - } - - public OperatorRequest(String name) { - this(null, name); - } - - public OperatorRequest(String namespace, String name) { - this.namespace = namespace; - this.name = name; - this.retryTimes = new AtomicInteger(0); - } - - public String name() { - return this.name; - } - - public OperatorRequest name(String name) { - this.name = name; - return this; - } - - public String namespace() { - return this.namespace; - } - - public OperatorRequest namespace(String namespace) { - this.namespace = namespace; - return this; - } - - public String key() { - return Cache.namespaceKeyFunc(this.namespace, this.name); - } - - public int retryIncrGet() { - return this.retryTimes.incrementAndGet(); - } - - public int retryTimes() { - return this.retryTimes.get(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - - if (!(obj instanceof OperatorRequest)) { - return false; - } - - final OperatorRequest other = (OperatorRequest) obj; - return Objects.equals(other.namespace, this.namespace) && - Objects.equals(other.name, this.name); - } - - @Override - public int hashCode() { - return Objects.hash(this.namespace, this.name); - } - - @Override - public String toString() { - return JsonUtil.toJson(this); - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/WorkQueue.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/WorkQueue.java deleted file mode 100644 index 4d82ddf02..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/WorkQueue.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.common; - -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Set; - -/** - * This class ensures the added work items are not in dirty set or currently - * processing set, before append them to the list. - * - * This has been taken from official client: - * https://github.com/kubernetes-client/java/blob/master/extended/src/main/java - * /io/kubernetes/client/extended/workqueue/DefaultWorkQueue.java - * - * Which has been ported from official go client: - * https://github.com/kubernetes/client-go/blob/master/util/workqueue/queue.go - */ -public class WorkQueue { - - /** - * queue defines the order in which we will work on items. - * Every element of queue should be in the dirty set and not in the - * processing set. - */ - private final LinkedList queue; - - /** - * incoming defines all of the items that need to be processed. - */ - private final Set incoming; - - /** - * Things that are currently being processed are in the processing set. - * These things may be simultaneously in the dirty set. When we finish - * processing something and remove it from this set, we'll check if - * it's in the dirty set, and if so, add it to the queue. - */ - private final Set processing; - - private boolean shutdown; - - public WorkQueue() { - this.queue = new LinkedList<>(); - this.incoming = new HashSet<>(); - this.processing = new HashSet<>(); - } - - public synchronized void add(T item) { - if (this.shutdown) { - return; - } - - if (this.incoming.contains(item)) { - return; - } - - this.incoming.add(item); - if (this.processing.contains(item)) { - return; - } - - this.queue.add(item); - this.notify(); - } - - public synchronized int length() { - return this.queue.size(); - } - - public synchronized T get() throws InterruptedException { - while (this.queue.size() == 0) { - if (this.shutdown) { - // We must be shutting down - return null; - } else { - this.wait(); - } - } - T obj = this.queue.poll(); - this.processing.add(obj); - this.incoming.remove(obj); - return obj; - } - - public synchronized void done(T item) { - this.processing.remove(item); - if (this.incoming.contains(item)) { - this.queue.add(item); - this.notify(); - } - } - - public synchronized void shutdown() { - this.shutdown = true; - this.notifyAll(); - } - - public synchronized boolean isShutdown() { - return this.shutdown; - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/config/OperatorOptions.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/config/OperatorOptions.java deleted file mode 100644 index f9ac66103..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/config/OperatorOptions.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.config; - -import static org.apache.hugegraph.config.OptionChecker.allowValues; -import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; -import static org.apache.hugegraph.config.OptionChecker.positiveInt; - -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.OptionHolder; - -public class OperatorOptions extends OptionHolder { - - private OperatorOptions() { - super(); - } - - private static volatile OperatorOptions INSTANCE; - - public static synchronized OperatorOptions instance() { - if (INSTANCE == null) { - INSTANCE = new OperatorOptions(); - // Should initialize all static members first, then register. - INSTANCE.registerOptions(); - } - return INSTANCE; - } - - public static final ConfigOption WATCH_NAMESPACE = - new ConfigOption<>( - "k8s.watch_namespace", - "The value is watch custom resources in the namespace, " + - "ignore other namespaces, the '*' means is all namespaces" + - " will be watched.", - disallowEmpty(), - Constants.DEFAULT_NAMESPACE - ); - - public static final ConfigOption TIMEZONE = - new ConfigOption<>( - "k8s.timezone", - "The timezone of computer job and operator.", - disallowEmpty(), - "Asia/Shanghai" - ); - - public static final ConfigOption PROBE_PORT = - new ConfigOption<>( - "k8s.probe_port", - "The value is the port that the controller bind to for " + - "serving health probes.", - positiveInt(), - 9892 - ); - - public static final ConfigOption PROBE_BACKLOG = - new ConfigOption<>( - "k8s.probe_backlog", - "The maximum backlog for serving health probes.", - positiveInt(), - 50 - ); - - public static final ConfigOption RESYNC_PERIOD = - new ConfigOption<>( - "k8s.resync_period", - "The minimum frequency at which watched resources are " + - "reconciled.", - positiveInt(), - 10 * 60 * 1000L - ); - - public static final ConfigOption RECONCILER_COUNT = - new ConfigOption<>( - "k8s.reconciler_count", - "The max number of reconciler thread.", - positiveInt(), - Runtime.getRuntime().availableProcessors() - ); - - public static final ConfigOption CLOSE_RECONCILER_TIMEOUT = - new ConfigOption<>( - "k8s.close_reconciler_timeout", - "The max timeout(in ms) to close reconciler.", - positiveInt(), - 120L - ); - - public static final ConfigOption READY_CHECK_INTERNAL = - new ConfigOption<>( - "k8s.ready_check_internal", - "The time interval(ms) of check ready.", - positiveInt(), - 1000L - ); - - public static final ConfigOption READY_TIMEOUT = - new ConfigOption<>( - "k8s.ready_timeout", - "The max timeout(in ms) of check ready.", - positiveInt(), - 30 * 1000L - ); - - public static final ConfigOption MAX_RECONCILE_RETRY = - new ConfigOption<>( - "k8s.max_reconcile_retry", - "The max retry times of reconcile.", - positiveInt(), - 3 - ); - - public static final ConfigOption INTERNAL_ETCD_URL = - new ConfigOption<>( - "k8s.internal_etcd_url", - "The internal etcd url for operator system.", - disallowEmpty(), - "http://127.0.0.1:2379" - ); - - public static final ConfigOption INTERNAL_MINIO_URL = - new ConfigOption<>( - "k8s.internal_minio_url", - "The internal minio url for operator system.", - disallowEmpty(), - "http://127.0.0.1:9000" - ); - - public static final ConfigOption AUTO_DESTROY_POD = - new ConfigOption<>( - "k8s.auto_destroy_pod", - "Whether to automatically destroy all pods when the job " + - "is completed or failed.", - allowValues(true, false), - true - ); -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobComponent.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobComponent.java deleted file mode 100644 index 035967ead..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobComponent.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.controller; - -import java.util.List; - -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; - -import io.fabric8.kubernetes.api.model.ConfigMap; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.batch.v1.Job; - -public class ComputerJobComponent { - - private HugeGraphComputerJob computerJob; - private Job masterJob; - private Job workerJob; - private List masterPods; - private List workerPods; - private ConfigMap configMap; - - public HugeGraphComputerJob computerJob() { - return this.computerJob; - } - - public void computerJob(HugeGraphComputerJob computerJob) { - this.computerJob = computerJob; - } - - public List masterPods() { - return this.masterPods; - } - - public void masterPods(List masterPods) { - this.masterPods = masterPods; - } - - public List workerPods() { - return this.workerPods; - } - - public void workerPods(List workerPods) { - this.workerPods = workerPods; - } - - public Job masterJob() { - return this.masterJob; - } - - public void masterJob(Job masterJob) { - this.masterJob = masterJob; - } - - public Job workerJob() { - return this.workerJob; - } - - public void workerJob(Job workerJob) { - this.workerJob = workerJob; - } - - public ConfigMap configMap() { - return this.configMap; - } - - public void configMap(ConfigMap configMap) { - this.configMap = configMap; - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobController.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobController.java deleted file mode 100644 index 353eda3ab..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobController.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.controller; - -import java.net.HttpURLConnection; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.mutable.MutableInt; -import org.apache.hugegraph.computer.driver.JobStatus; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.computer.k8s.crd.model.CommonComponentState; -import org.apache.hugegraph.computer.k8s.crd.model.ComponentState; -import org.apache.hugegraph.computer.k8s.crd.model.ComponentStateBuilder; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatus; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatusBuilder; -import org.apache.hugegraph.computer.k8s.crd.model.EventType; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJobList; -import org.apache.hugegraph.computer.k8s.crd.model.JobComponentState; -import org.apache.hugegraph.computer.k8s.crd.model.PodPhase; -import org.apache.hugegraph.computer.k8s.operator.common.AbstractController; -import org.apache.hugegraph.computer.k8s.operator.common.MatchWithMsg; -import org.apache.hugegraph.computer.k8s.operator.common.OperatorRequest; -import org.apache.hugegraph.computer.k8s.operator.common.OperatorResult; -import org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.base.Throwables; - -import io.fabric8.kubernetes.api.model.ConfigMap; -import io.fabric8.kubernetes.api.model.ContainerState; -import io.fabric8.kubernetes.api.model.ContainerStateWaiting; -import io.fabric8.kubernetes.api.model.ContainerStatus; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.ObjectMeta; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.PodCondition; -import io.fabric8.kubernetes.api.model.batch.v1.Job; -import io.fabric8.kubernetes.api.model.batch.v1.JobCondition; -import io.fabric8.kubernetes.client.CustomResource; -import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.NamespacedKubernetesClient; -import io.fabric8.kubernetes.client.dsl.MixedOperation; -import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.utils.PodStatusUtil; -import io.fabric8.kubernetes.client.utils.Serialization; - -public class ComputerJobController - extends AbstractController { - - private static final Logger LOG = Log.logger(AbstractController.class); - - private final MixedOperation> operation; - private final Boolean autoDestroyPod; - - private static final int TOTAL_COMPONENTS = 2; - private static final int ALLOW_FAILED_JOBS = 0; - private static final int ALLOW_FAILED_COMPONENTS = 0; - private static final int ERROR_LOG_TAILING_LINES = 500; - private static final String POD_REASON_UNSCHEDULABLE = "Unschedulable"; - private static final String IMAGE_PULL_BACKOFF = "ImagePullBackOff"; - private static final String CONDITION_STATUS_FALSE = "False"; - private static final String FINALIZER_NAME = CustomResource.getCRDName( - HugeGraphComputerJob.class) + "/finalizers"; - - public ComputerJobController(HugeConfig config, - NamespacedKubernetesClient kubeClient) { - super(config, kubeClient); - this.operation = this.kubeClient.customResources( - HugeGraphComputerJob.class, - HugeGraphComputerJobList.class); - this.autoDestroyPod = this.config.get(OperatorOptions.AUTO_DESTROY_POD); - } - - @Override - protected OperatorResult reconcile(OperatorRequest request) { - HugeGraphComputerJob computerJob = this.getCR(request); - if (computerJob == null) { - LOG.info("Unable to fetch HugeGraphComputerJob {}, " + - "it may have been deleted", request.name()); - return OperatorResult.NO_REQUEUE; - } - - this.fillCRStatus(computerJob); - - if (this.finalizer(computerJob)) { - return OperatorResult.NO_REQUEUE; - } - - ComputerJobComponent observed = this.observeComponent(computerJob); - if (!this.updateStatus(observed) && request.retryTimes() == 0) { - LOG.debug("Wait status to be stable before taking further actions"); - return OperatorResult.NO_REQUEUE; - } - - if (Objects.equals(computerJob.getStatus().getJobStatus(), - JobStatus.RUNNING.name())) { - String crName = computerJob.getMetadata().getName(); - LOG.info("ComputerJob {} already running, no action", crName); - return OperatorResult.NO_REQUEUE; - } - - ComputerJobDeployer deployer = new ComputerJobDeployer(this.kubeClient, - this.config); - deployer.deploy(observed); - - return OperatorResult.NO_REQUEUE; - } - - @Override - protected void handleFailOverLimit(OperatorRequest request, Exception e) { - HugeGraphComputerJob computerJob = this.getCR(request); - if (computerJob == null) { - LOG.info("Unable to fetch HugeGraphComputerJob {}, " + - "it may have been deleted", request.name()); - return; - } - - String crName = computerJob.getMetadata().getName(); - - LOG.warn("ComputerJob {} reconcile failed reach {} times", - crName, request.retryTimes()); - - this.recordEvent(computerJob, EventType.WARNING, - KubeUtil.failedEventName(crName), - String.format("ComputerJob %s reconcile failed\n", - crName), - Throwables.getStackTraceAsString(e)); - - computerJob.getStatus().setJobStatus(JobStatus.FAILED.name()); - this.updateStatus(computerJob); - } - - @Override - protected MatchWithMsg ownsPredicate(HasMetadata ownsResource) { - MatchWithMsg ownsMatch = super.ownsPredicate(ownsResource); - if (ownsMatch.isMatch()) { - return ownsMatch; - } - - if (ownsResource instanceof Pod) { - ObjectMeta metadata = ownsResource.getMetadata(); - if (metadata != null && metadata.getLabels() != null) { - Map labels = metadata.getLabels(); - String kind = HasMetadata.getKind(HugeGraphComputerJob.class); - String crName = KubeUtil.matchKindAndGetCrName(labels, kind); - if (StringUtils.isNotBlank(crName)) { - return new MatchWithMsg(true, crName); - } - } - } - return MatchWithMsg.NO_MATCH; - } - - private boolean finalizer(HugeGraphComputerJob computerJob) { - if (computerJob.addFinalizer(FINALIZER_NAME)) { - this.replaceCR(computerJob); - return true; - } - - ComputerJobStatus status = computerJob.getStatus(); - if (computerJob.isMarkedForDeletion()) { - if (!JobStatus.finished(status.getJobStatus())) { - status.setJobStatus(JobStatus.CANCELLED.name()); - this.updateStatus(computerJob); - } else { - if (computerJob.removeFinalizer(FINALIZER_NAME)) { - this.replaceCR(computerJob); - } - } - return true; - } else { - if (JobStatus.finished(status.getJobStatus())) { - if (this.autoDestroyPod) { - this.deleteCR(computerJob); - } - return true; - } - } - - return false; - } - - private boolean updateStatus(ComputerJobComponent observed) { - ComputerJobStatus newStatus = this.derivedCRStatus(observed); - ComputerJobStatus oldStatus = observed.computerJob().getStatus(); - if (!Objects.deepEquals(oldStatus, newStatus)) { - HugeGraphComputerJob computerJob = observed.computerJob(); - computerJob.setStatus(newStatus); - this.updateStatus(computerJob); - return true; - } - - return false; - } - - private ComputerJobStatus derivedCRStatus(ComputerJobComponent observed) { - HugeGraphComputerJob computerJob = observed.computerJob(); - ComputerJobSpec spec = computerJob.getSpec(); - - MutableInt failedComponents = new MutableInt(0); - MutableInt succeededComponents = new MutableInt(0); - MutableInt runningComponents = new MutableInt(0); - - ComputerJobStatus status = Serialization.clone(computerJob.getStatus()); - - // ConfigMap - ConfigMap configMap = observed.configMap(); - if (configMap != null) { - ComponentState configMapState = new ComponentStateBuilder() - .withName(configMap.getMetadata().getName()) - .withState(CommonComponentState.READY.value()) - .build(); - status.getComponentStates().setConfigMap(configMapState); - } else if (status.getComponentStates().getConfigMap() != null) { - status.getComponentStates().getConfigMap() - .setState(CommonComponentState.DELETED.value()); - } - - // MasterJob - Job masterJob = observed.masterJob(); - ComponentState masterJobState = this.deriveJobStatus( - masterJob, - observed.masterPods(), - status.getComponentStates().getMasterJob(), - Constants.MASTER_INSTANCES, - failedComponents, - succeededComponents, - runningComponents - ); - status.getComponentStates().setMasterJob(masterJobState); - - // WorkerJob - Job workerJob = observed.workerJob(); - ComponentState workerJobState = this.deriveJobStatus( - workerJob, - observed.workerPods(), - status.getComponentStates().getWorkerJob(), - spec.getWorkerInstances(), - failedComponents, - succeededComponents, - runningComponents - ); - status.getComponentStates().setWorkerJob(workerJobState); - - if (failedComponents.intValue() > ALLOW_FAILED_COMPONENTS) { - status.setJobStatus(JobStatus.FAILED.name()); - this.recordFailedEvent(computerJob, masterJobState, workerJobState); - return status; - } else if (succeededComponents.intValue() == TOTAL_COMPONENTS) { - status.setJobStatus(JobStatus.SUCCEEDED.name()); - String crName = computerJob.getMetadata().getName(); - long cost = this.calculateJobCost(computerJob); - this.recordEvent(computerJob, EventType.NORMAL, - KubeUtil.succeedEventName(crName), - "ComputerJobSucceed", - String.format("Job %s run successfully, took %ss", - crName, cost)); - return status; - } - - int activeComponents = runningComponents.intValue() + - succeededComponents.intValue(); - if (activeComponents == TOTAL_COMPONENTS) { - status.setJobStatus(JobStatus.RUNNING.name()); - } else { - status.setJobStatus(JobStatus.INITIALIZING.name()); - } - - return status; - } - - private long calculateJobCost(HugeGraphComputerJob computerJob) { - String creationTimestamp = computerJob.getMetadata() - .getCreationTimestamp(); - long createTime = OffsetDateTime.parse(creationTimestamp) - .toEpochSecond(); - long now = OffsetDateTime.now().toEpochSecond(); - return now - createTime; - } - - private ComponentState deriveJobStatus(Job job, - List pods, - ComponentState oldSate, - int instances, - MutableInt failedComponents, - MutableInt succeededComponents, - MutableInt runningComponents) { - if (job != null && job.getStatus() != null) { - ComponentState newState = new ComponentState(); - newState.setName(job.getMetadata().getName()); - - int succeeded = KubeUtil.intVal(job.getStatus().getSucceeded()); - int failed = KubeUtil.intVal(job.getStatus().getFailed()); - MatchWithMsg unSchedulable = this.unSchedulable(pods); - MatchWithMsg failedPullImage = this.imagePullBackOff(pods); - - if (succeeded >= instances) { - newState.setState(JobComponentState.SUCCEEDED.name()); - succeededComponents.increment(); - } else if (failed > ALLOW_FAILED_JOBS) { - newState.setState(JobComponentState.FAILED.name()); - List conditions = job.getStatus().getConditions(); - if (CollectionUtils.isNotEmpty(conditions)) { - newState.setMessage(conditions.get(0).getMessage()); - } - String errorLog = this.getErrorLog(pods); - if (StringUtils.isNotBlank(errorLog)) { - newState.setErrorLog(errorLog); - } - failedComponents.increment(); - } else if (unSchedulable.isMatch()) { - newState.setState(JobStatus.FAILED.name()); - newState.setMessage(unSchedulable.msg()); - failedComponents.increment(); - } else if (failedPullImage.isMatch()) { - newState.setState(JobStatus.FAILED.name()); - newState.setMessage(failedPullImage.msg()); - failedComponents.increment(); - } else { - int running = pods.stream().filter(PodStatusUtil::isRunning) - .mapToInt(x -> 1).sum(); - int active = running + succeeded; - if (active >= instances) { - newState.setState(JobComponentState.RUNNING.value()); - runningComponents.increment(); - } else { - newState.setState(JobComponentState.PENDING.value()); - } - } - return newState; - } else if (oldSate != null) { - oldSate.setState(JobComponentState.CANCELLED.value()); - } - - return oldSate; - } - - private void fillCRStatus(HugeGraphComputerJob computerJob) { - ComputerJobStatus status = computerJob.getStatus() == null ? - new ComputerJobStatus() : - computerJob.getStatus(); - status = new ComputerJobStatusBuilder(status) - .editOrNewComponentStates().endComponentStates() - .editOrNewJobState().endJobState() - .build(); - computerJob.setStatus(status); - } - - private ComputerJobComponent observeComponent( - HugeGraphComputerJob computerJob) { - ComputerJobComponent observed = new ComputerJobComponent(); - observed.computerJob(computerJob); - - String namespace = computerJob.getMetadata().getNamespace(); - String crName = computerJob.getMetadata().getName(); - - String masterName = KubeUtil.masterJobName(crName); - Job master = this.getResourceByName(namespace, masterName, Job.class); - observed.masterJob(master); - - if (master != null) { - List masterPods = this.getPodsByJob(master); - observed.masterPods(masterPods); - } - - String workerName = KubeUtil.workerJobName(crName); - Job worker = this.getResourceByName(namespace, workerName, Job.class); - observed.workerJob(worker); - - if (worker != null) { - List workerPods = this.getPodsByJob(worker); - observed.workerPods(workerPods); - } - - String configMapName = KubeUtil.configMapName(crName); - ConfigMap configMap = this.getResourceByName(namespace, configMapName, - ConfigMap.class); - observed.configMap(configMap); - - return observed; - } - - private void updateStatus(HugeGraphComputerJob computerJob) { - computerJob.getStatus().setLastUpdateTime(KubeUtil.now()); - String namespace = computerJob.getMetadata().getNamespace(); - if (Objects.equals(this.kubeClient.getNamespace(), namespace)) { - this.operation.replaceStatus(computerJob); - } else { - this.operation.inNamespace(namespace).replaceStatus(computerJob); - } - } - - private void replaceCR(HugeGraphComputerJob computerJob) { - computerJob.getStatus().setLastUpdateTime(KubeUtil.now()); - String namespace = computerJob.getMetadata().getNamespace(); - if (Objects.equals(this.kubeClient.getNamespace(), namespace)) { - this.operation.replace(computerJob); - } else { - this.operation.inNamespace(namespace).replace(computerJob); - } - } - - private void deleteCR(HugeGraphComputerJob computerJob) { - String namespace = computerJob.getMetadata().getNamespace(); - if (Objects.equals(this.kubeClient.getNamespace(), namespace)) { - this.operation.delete(computerJob); - } else { - this.operation.inNamespace(namespace).delete(computerJob); - } - } - - private MatchWithMsg unSchedulable(List pods) { - if (CollectionUtils.isEmpty(pods)) { - return MatchWithMsg.NO_MATCH; - } - - for (Pod pod : pods) { - List conditions = pod.getStatus() - .getConditions(); - for (PodCondition condition : conditions) { - if (Objects.equals(condition.getStatus(), - CONDITION_STATUS_FALSE) && - Objects.equals(condition.getReason(), - POD_REASON_UNSCHEDULABLE)) { - return new MatchWithMsg(true, - condition.getReason() + ", " + - condition.getMessage()); - } - } - } - return MatchWithMsg.NO_MATCH; - } - - private MatchWithMsg imagePullBackOff(List pods) { - if (CollectionUtils.isEmpty(pods)) { - return MatchWithMsg.NO_MATCH; - } - - for (Pod pod : pods) { - List containerStatus = - PodStatusUtil.getContainerStatus(pod); - - if (CollectionUtils.isNotEmpty(containerStatus)) { - for (ContainerStatus status : containerStatus) { - ContainerState state = status.getState(); - if (state != null) { - ContainerStateWaiting waiting = state.getWaiting(); - if (waiting != null && - IMAGE_PULL_BACKOFF.equals(waiting.getReason())) { - return new MatchWithMsg(true, - waiting.getReason() + ", " + - waiting.getMessage()); - } - } - } - } - } - - return MatchWithMsg.NO_MATCH; - } - - private void recordFailedEvent(HugeGraphComputerJob computerJob, - ComponentState masterJobState, - ComponentState workerJobState) { - StringBuilder builder = new StringBuilder(); - - String masterFailedMsg = masterJobState.getMessage(); - if (StringUtils.isNotBlank(masterFailedMsg)) { - builder.append("master failed message: \n"); - builder.append(masterFailedMsg); - } - - String masterErrorLog = masterJobState.getErrorLog(); - if (StringUtils.isNotBlank(masterErrorLog)) { - builder.append("\n"); - builder.append("master error log: \n"); - builder.append(masterErrorLog); - } - - String workerFailedMsg = workerJobState.getMessage(); - if (StringUtils.isNotBlank(workerFailedMsg)) { - builder.append("\n"); - builder.append("worker failed message: \n"); - builder.append(workerFailedMsg); - } - - String workerErrorLog = workerJobState.getErrorLog(); - if (StringUtils.isNotBlank(workerErrorLog)) { - builder.append("\n"); - builder.append("worker error log: \n"); - builder.append(workerErrorLog); - } - - String crName = computerJob.getMetadata().getName(); - this.recordEvent(computerJob, EventType.WARNING, - KubeUtil.failedEventName(crName), "ComputerJobFailed", - builder.toString()); - } - - private String getErrorLog(List pods) { - for (Pod pod : pods) { - String namespace = pod.getMetadata().getNamespace(); - String name = pod.getMetadata().getName(); - if (pod.getStatus() != null && - PodPhase.FAILED.value().equals(pod.getStatus().getPhase())) { - - KubernetesClient client = this.kubeClient; - if (!Objects.equals(this.kubeClient.getNamespace(), - namespace)) { - client = this.kubeClient.inNamespace(namespace); - } - - String log; - try { - log = client.pods().withName(name) - .tailingLines(ERROR_LOG_TAILING_LINES) - .getLog(true); - } catch (KubernetesClientException e) { - if (e.getCode() == HttpURLConnection.HTTP_NOT_FOUND) { - // Fixed the pod deleted when job failed - continue; - } else { - throw e; - } - } - if (StringUtils.isNotBlank(log) && - !log.contains("Unable to retrieve container logs")) { - return log + "\n podName:" + pod.getMetadata().getName() + - "\n nodeIp:" + pod.getStatus().getHostIP(); - } - } - } - return StringUtils.EMPTY; - } -} diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobDeployer.java b/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobDeployer.java deleted file mode 100644 index 08775088f..000000000 --- a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/controller/ComputerJobDeployer.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.operator.controller; - -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; -import org.apache.hugegraph.computer.k8s.crd.model.ResourceName; -import org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.collect.Lists; -import com.google.common.collect.Sets; - -import io.fabric8.kubernetes.api.model.ConfigMap; -import io.fabric8.kubernetes.api.model.ConfigMapBuilder; -import io.fabric8.kubernetes.api.model.Container; -import io.fabric8.kubernetes.api.model.ContainerBuilder; -import io.fabric8.kubernetes.api.model.ContainerPort; -import io.fabric8.kubernetes.api.model.ContainerPortBuilder; -import io.fabric8.kubernetes.api.model.EnvVar; -import io.fabric8.kubernetes.api.model.EnvVarBuilder; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.LabelSelector; -import io.fabric8.kubernetes.api.model.ObjectMeta; -import io.fabric8.kubernetes.api.model.ObjectMetaBuilder; -import io.fabric8.kubernetes.api.model.OwnerReference; -import io.fabric8.kubernetes.api.model.OwnerReferenceBuilder; -import io.fabric8.kubernetes.api.model.PodSpec; -import io.fabric8.kubernetes.api.model.PodTemplateSpec; -import io.fabric8.kubernetes.api.model.Quantity; -import io.fabric8.kubernetes.api.model.Secret; -import io.fabric8.kubernetes.api.model.TopologySpreadConstraint; -import io.fabric8.kubernetes.api.model.Volume; -import io.fabric8.kubernetes.api.model.VolumeBuilder; -import io.fabric8.kubernetes.api.model.VolumeMount; -import io.fabric8.kubernetes.api.model.VolumeMountBuilder; -import io.fabric8.kubernetes.api.model.batch.v1.Job; -import io.fabric8.kubernetes.api.model.batch.v1.JobBuilder; -import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.NamespacedKubernetesClient; -import io.fabric8.kubernetes.client.utils.Serialization; - -public class ComputerJobDeployer { - - private static final Logger LOG = Log.logger(ComputerJobDeployer.class); - - private final NamespacedKubernetesClient kubeClient; - - // NO BACKOFF - private static final int JOB_BACKOFF_LIMIT = 0; - private static final String JOB_RESTART_POLICY = "Never"; - private static final String TOPOLOGY_KEY = "kubernetes.io/hostname"; - private static final String SCHEDULE_ANYWAY = "ScheduleAnyway"; - private static final Integer MAX_SKEW = 1; - - private static final String RANDOM_PORT = "0"; - private static final String PROTOCOL = "TCP"; - private static final String TRANSPORT_PORT_NAME = "transport-port"; - private static final String RPC_PORT_NAME = "rpc-port"; - private static final int DEFAULT_TRANSPORT_PORT = 8099; - private static final int DEFAULT_RPC_PORT = 8190; - private static final String COMPUTER_CONFIG_MAP_VOLUME = "computer-config-map-volume"; - - private static final String POD_IP_KEY = "status.podIP"; - private static final String POD_NAMESPACE_KEY = "metadata.namespace"; - private static final String POD_NAME_KEY = "metadata.name"; - - private static final Long TERMINATION_GRACE_PERIOD = 180L; - - private final String internalEtcdUrl; - private final String internalMinIOUrl; - private final String timezone; - - public ComputerJobDeployer(NamespacedKubernetesClient kubeClient, - HugeConfig config) { - this.kubeClient = kubeClient; - this.internalEtcdUrl = config.get(OperatorOptions.INTERNAL_ETCD_URL); - this.internalMinIOUrl = config.get(OperatorOptions.INTERNAL_MINIO_URL); - this.timezone = config.get(OperatorOptions.TIMEZONE); - } - - public void deploy(ComputerJobComponent observed) { - HugeGraphComputerJob computerJob = observed.computerJob(); - - Set ports = this.handleConfig(computerJob.getSpec()); - - ComputerJobComponent desired = new ComputerJobComponent(); - desired.configMap(this.desiredConfigMap(computerJob)); - desired.masterJob(this.desiredMasterJob(computerJob, ports)); - desired.workerJob(this.desiredWorkerJob(computerJob, ports)); - - this.reconcileComponent(computerJob.getMetadata().getNamespace(), - desired, observed); - } - - private void reconcileComponent(String namespace, - ComputerJobComponent desired, - ComputerJobComponent observed) { - ConfigMap desiredConfigMap = desired.configMap(); - ConfigMap observedConfigMap = observed.configMap(); - - final KubernetesClient client; - if (!Objects.equals(this.kubeClient.getNamespace(), namespace)) { - client = this.kubeClient.inNamespace(namespace); - } else { - client = this.kubeClient; - } - - if (desiredConfigMap == null && observedConfigMap != null) { - client.configMaps().delete(observedConfigMap); - } else if (desiredConfigMap != null && observedConfigMap == null) { - KubeUtil.ignoreExists(() -> client.configMaps() - .create(desiredConfigMap)); - } - if (desiredConfigMap != null && observedConfigMap != null) { - LOG.debug("ConfigMap already exists, no action"); - } - - Job desiredMasterJob = desired.masterJob(); - Job observedMasterJob = observed.masterJob(); - if (desiredMasterJob == null && observedMasterJob != null) { - client.batch().v1().jobs().delete(observedMasterJob); - } else if (desiredMasterJob != null && observedMasterJob == null) { - KubeUtil.ignoreExists(() -> client.batch().v1().jobs() - .create(desiredMasterJob)); - } - if (desiredMasterJob != null && observedMasterJob != null) { - LOG.debug("MasterJob already exists, no action"); - } - - Job desiredWorkerJob = desired.workerJob(); - Job observedWorkerJob = observed.workerJob(); - if (desiredWorkerJob == null && observedWorkerJob != null) { - client.batch().v1().jobs().delete(observedWorkerJob); - } else if (desiredWorkerJob != null && observedWorkerJob == null) { - KubeUtil.ignoreExists(() -> client.batch().v1().jobs() - .create(desiredWorkerJob)); - } - if (desiredWorkerJob != null && observedWorkerJob != null) { - LOG.debug("WorkerJob already exists, no action"); - } - } - - private Set handleConfig(ComputerJobSpec spec) { - Map config = spec.getComputerConf(); - - config.put(ComputerOptions.JOB_ID.name(), - String.valueOf(spec.getJobId())); - - config.put(ComputerOptions.JOB_WORKERS_COUNT.name(), - String.valueOf(spec.getWorkerInstances())); - - String ip = String.format("${%s}", Constants.ENV_POD_IP); - config.put(ComputerOptions.TRANSPORT_SERVER_HOST.name(), ip); - config.put(ComputerOptions.RPC_SERVER_HOST_NAME, ip); - config.putIfAbsent(ComputerOptions.BSP_ETCD_ENDPOINTS.name(), - this.internalEtcdUrl); - config.putIfAbsent(ComputerOptions.SNAPSHOT_MINIO_ENDPOINT.name(), - this.internalMinIOUrl); - - String transportPort = config.get( - ComputerOptions.TRANSPORT_SERVER_PORT.name()); - if (StringUtils.isBlank(transportPort) || - RANDOM_PORT.equals(transportPort)) { - transportPort = String.valueOf(DEFAULT_TRANSPORT_PORT); - config.put(ComputerOptions.TRANSPORT_SERVER_PORT.name(), - transportPort); - } - ContainerPort transportContainerPort = new ContainerPortBuilder() - .withName(TRANSPORT_PORT_NAME) - .withContainerPort(Integer.valueOf(transportPort)) - .withProtocol(PROTOCOL) - .build(); - - String rpcPort = config.get(ComputerOptions.RPC_SERVER_PORT_NAME); - if (StringUtils.isBlank(rpcPort) || RANDOM_PORT.equals(rpcPort)) { - rpcPort = String.valueOf(DEFAULT_RPC_PORT); - config.put(ComputerOptions.RPC_SERVER_PORT_NAME, rpcPort); - } - ContainerPort rpcContainerPort = new ContainerPortBuilder() - .withName(RPC_PORT_NAME) - .withContainerPort(Integer.valueOf(rpcPort)) - .withProtocol(PROTOCOL) - .build(); - - return Sets.newHashSet(transportContainerPort, rpcContainerPort); - } - - private ConfigMap desiredConfigMap(HugeGraphComputerJob computerJob) { - String crName = computerJob.getMetadata().getName(); - ComputerJobSpec spec = computerJob.getSpec(); - - Map computerConf = spec.getComputerConf(); - Map data = new HashMap<>(); - data.put(Constants.COMPUTER_CONF_FILE, - KubeUtil.asProperties(computerConf)); - - String log4jXml = spec.getLog4jXml(); - if (StringUtils.isNotBlank(log4jXml)) { - data.put(Constants.LOG_XML_FILE, log4jXml); - } - - String name = KubeUtil.configMapName(crName); - - return new ConfigMapBuilder() - .withMetadata(this.getMetadata(computerJob, name)) - .withData(data) - .build(); - } - - public Job desiredMasterJob(HugeGraphComputerJob computerJob, - Set ports) { - String crName = computerJob.getMetadata().getName(); - String namespace = computerJob.getMetadata().getNamespace(); - ComputerJobSpec spec = computerJob.getSpec(); - - List command = spec.getMasterCommand(); - if (CollectionUtils.isEmpty(command)) { - command = Constants.COMMAND; - } - List args = spec.getMasterArgs(); - if (CollectionUtils.isEmpty(args)) { - args = Constants.MASTER_ARGS; - } - - String name = KubeUtil.masterJobName(crName); - - ObjectMeta metadata = this.getMetadata(computerJob, name); - - Container container = this.getContainer(name, namespace, - spec, ports, - command, args); - List containers = Lists.newArrayList(container); - - final int instances = Constants.MASTER_INSTANCES; - return this.getJob(crName, metadata, spec, instances, containers); - } - - public Job desiredWorkerJob(HugeGraphComputerJob computerJob, - Set ports) { - String crName = computerJob.getMetadata().getName(); - String namespace = computerJob.getMetadata().getNamespace(); - ComputerJobSpec spec = computerJob.getSpec(); - - List command = spec.getWorkerCommand(); - if (CollectionUtils.isEmpty(command)) { - command = Constants.COMMAND; - } - List args = spec.getWorkerArgs(); - if (CollectionUtils.isEmpty(args)) { - args = Constants.WORKER_ARGS; - } - - String name = KubeUtil.workerJobName(crName); - - ObjectMeta metadata = this.getMetadata(computerJob, name); - - Container container = this.getContainer(name, namespace, - spec, ports, - command, args); - List containers = Lists.newArrayList(container); - - final int instances = spec.getWorkerInstances(); - return this.getJob(crName, metadata, spec, instances, containers); - } - - private Job getJob(String crName, ObjectMeta meta, ComputerJobSpec spec, - int instances, List containers) { - List volumes = spec.getVolumes(); - if (volumes == null) { - volumes = new ArrayList<>(); - } else { - volumes = Lists.newArrayList(volumes); - } - volumes.addAll(this.getConfigMapAndSecretVolumes(spec)); - - String configMapName = KubeUtil.configMapName(crName); - Volume configVolume = this.getComputerConfigVolume(configMapName); - volumes.add(configVolume); - - // Support PodSpec template - PodTemplateSpec podTemplateSpec = spec.getPodTemplateSpec(); - if (podTemplateSpec == null) { - podTemplateSpec = new PodTemplateSpec(); - } else { - podTemplateSpec = Serialization.clone(podTemplateSpec); - } - ObjectMeta metadata = podTemplateSpec.getMetadata(); - if (metadata == null) { - metadata = new ObjectMeta(); - } - metadata = new ObjectMetaBuilder(metadata) - .addToLabels(meta.getLabels()) - .addToAnnotations(meta.getAnnotations()) - .build(); - podTemplateSpec.setMetadata(metadata); - - PodSpec podSpec = podTemplateSpec.getSpec(); - if (podSpec == null) { - podSpec = new PodSpec(); - } - podSpec.setVolumes(volumes); - podSpec.setContainers(containers); - podSpec.setRestartPolicy(JOB_RESTART_POLICY); - - if (podSpec.getTerminationGracePeriodSeconds() == null) { - podSpec.setTerminationGracePeriodSeconds(TERMINATION_GRACE_PERIOD); - } - - if (CollectionUtils.isEmpty(podSpec.getImagePullSecrets())) { - podSpec.setImagePullSecrets(spec.getPullSecrets()); - } - - if (CollectionUtils.isEmpty(podSpec.getTopologySpreadConstraints())) { - // Pod topology spread constraints default by node - LabelSelector labelSelector = new LabelSelector(); - labelSelector.setMatchLabels(meta.getLabels()); - TopologySpreadConstraint spreadConstraint = - new TopologySpreadConstraint(labelSelector, MAX_SKEW, - TOPOLOGY_KEY, SCHEDULE_ANYWAY); - podSpec.setTopologySpreadConstraints( - Lists.newArrayList(spreadConstraint) - ); - } - podTemplateSpec.setSpec(podSpec); - - return new JobBuilder().withMetadata(meta) - .withNewSpec() - .withParallelism(instances) - .withCompletions(instances) - .withBackoffLimit(JOB_BACKOFF_LIMIT) - .withTemplate(podTemplateSpec) - .endSpec() - .build(); - } - - private List getConfigMapAndSecretVolumes(ComputerJobSpec spec) { - List volumes = new ArrayList<>(); - - Map configMapPaths = spec.getConfigMapPaths(); - if (MapUtils.isNotEmpty(configMapPaths)) { - Set configMapNames = configMapPaths.keySet(); - for (String configMapName : configMapNames) { - Volume volume = new VolumeBuilder() - .withName(this.volumeName(configMapName)) - .withNewConfigMap() - .withName(configMapName) - .endConfigMap() - .build(); - volumes.add(volume); - } - } - - Map secretPaths = spec.getSecretPaths(); - if (MapUtils.isNotEmpty(secretPaths)) { - Set secretNames = secretPaths.keySet(); - for (String secretName : secretNames) { - Volume volume = new VolumeBuilder() - .withName(this.volumeName(secretName)) - .withNewSecret() - .withSecretName(secretName) - .endSecret() - .build(); - volumes.add(volume); - } - } - - return volumes; - } - - private Container getContainer(String name, String namespace, - ComputerJobSpec spec, - Set ports, - Collection command, - Collection args) { - List envVars = spec.getEnvVars(); - if (envVars == null) { - envVars = new ArrayList<>(); - } - - // Add env - EnvVar podIP = new EnvVarBuilder() - .withName(Constants.ENV_POD_IP) - .withNewValueFrom() - .withNewFieldRef() - .withFieldPath(POD_IP_KEY) - .endFieldRef() - .endValueFrom() - .build(); - envVars.add(podIP); - - EnvVar podName = new EnvVarBuilder() - .withName(Constants.ENV_POD_NAME) - .withNewValueFrom() - .withNewFieldRef() - .withFieldPath(POD_NAME_KEY) - .endFieldRef() - .endValueFrom() - .build(); - envVars.add(podName); - - EnvVar podNamespace = new EnvVarBuilder() - .withName(Constants.ENV_POD_NAMESPACE) - .withNewValueFrom() - .withNewFieldRef() - .withFieldPath(POD_NAMESPACE_KEY) - .endFieldRef() - .endValueFrom() - .build(); - envVars.add(podNamespace); - - EnvVar confDir = new EnvVarBuilder() - .withName(Constants.ENV_CONFIG_DIR) - .withValue(Constants.CONFIG_DIR) - .build(); - envVars.add(confDir); - - EnvVar confPath = new EnvVarBuilder() - .withName(Constants.ENV_COMPUTER_CONF_PATH) - .withValue(Constants.COMPUTER_CONF_PATH) - .build(); - envVars.add(confPath); - - String log4jXml = spec.getLog4jXml(); - if (StringUtils.isNotBlank(log4jXml)) { - EnvVar logConfEnv = new EnvVarBuilder() - .withName(Constants.ENV_LOG4J_CONF_PATH) - .withValue(Constants.LOG_XML_PATH) - .build(); - envVars.add(logConfEnv); - } - - String jarFile = spec.getJarFile(); - if (StringUtils.isNotBlank(jarFile)) { - EnvVar jarFilePath = new EnvVarBuilder() - .withName(Constants.ENV_JAR_FILE_PATH) - .withValue(jarFile) - .build(); - envVars.add(jarFilePath); - } - - String remoteJarUri = spec.getRemoteJarUri(); - if (StringUtils.isNotBlank(remoteJarUri)) { - EnvVar jobJarURI = new EnvVarBuilder() - .withName(Constants.ENV_REMOTE_JAR_URI) - .withValue(remoteJarUri) - .build(); - envVars.add(jobJarURI); - } - - String jvmOptions = spec.getJvmOptions(); - StringBuilder jvmOptionsBuilder = jvmOptions == null ? - new StringBuilder() : - new StringBuilder(jvmOptions.trim()); - jvmOptionsBuilder.append(" ").append("-Duser.timezone=") - .append(this.timezone); - EnvVar jvmOptionsEnv = new EnvVarBuilder() - .withName(Constants.ENV_JVM_OPTIONS) - .withValue(jvmOptionsBuilder.toString().trim()) - .build(); - envVars.add(jvmOptionsEnv); - - Quantity cpu; - Quantity memory; - if (name.contains("master")) { - cpu = spec.getMasterCpu(); - memory = spec.getMasterMemory(); - } else { - cpu = spec.getWorkerCpu(); - memory = spec.getWorkerMemory(); - } - - if (cpu != null) { - EnvVar cpuLimit = new EnvVarBuilder() - .withName(Constants.ENV_CPU_LIMIT) - .withValue(cpu.toString()) - .build(); - envVars.add(cpuLimit); - } - - if (memory != null) { - EnvVar memoryLimit = new EnvVarBuilder() - .withName(Constants.ENV_MEMORY_LIMIT) - .withValue(memory.toString()) - .build(); - envVars.add(memoryLimit); - } - - List volumeMounts = spec.getVolumeMounts(); - if (volumeMounts == null) { - volumeMounts = new ArrayList<>(); - } else { - volumeMounts = Lists.newArrayList(volumeMounts); - } - - final KubernetesClient client; - if (!Objects.equals(this.kubeClient.getNamespace(), namespace)) { - client = this.kubeClient.inNamespace(namespace); - } else { - client = this.kubeClient; - } - - // Mount configmap and secret files - Map configMapPaths = spec.getConfigMapPaths(); - if (MapUtils.isNotEmpty(configMapPaths)) { - for (String key : configMapPaths.keySet()) { - ConfigMap configMap = client.configMaps().withName(key).get(); - E.checkArgument(configMap != null && - configMap.getData().size() > 0, - "The configMap '%s' don't exist", key); - - this.mountConfigMapOrSecret(volumeMounts, key, - configMapPaths.get(key), - configMap.getData()); - } - } - - Map secretPaths = spec.getSecretPaths(); - if (MapUtils.isNotEmpty(secretPaths)) { - for (String key : secretPaths.keySet()) { - Secret secret = client.secrets().withName(key).get(); - E.checkArgument(secret != null && - secret.getData().size() > 0, - "The secret '%s' don't exist", key); - - this.mountConfigMapOrSecret(volumeMounts, key, - secretPaths.get(key), - secret.getData()); - } - } - - VolumeMount configMount = this.getComputerConfigMount(); - volumeMounts.add(configMount); - - Container container = new ContainerBuilder() - .withName(KubeUtil.containerName(name)) - .withImage(spec.getImage()) - .withImagePullPolicy(spec.getPullPolicy()) - .withEnv(spec.getEnvVars()) - .withEnvFrom(spec.getEnvFrom()) - .withVolumeMounts(volumeMounts) - .addAllToCommand(command) - .addAllToArgs(args) - .addAllToPorts(ports) - .withNewResources() - .addToLimits(ResourceName.CPU.value(), cpu) - .addToLimits(ResourceName.MEMORY.value(), memory) - .endResources() - .build(); - - // Add security context - if (spec.getSecurityContext() != null) { - container.setSecurityContext(spec.getSecurityContext()); - } - return container; - } - - private void mountConfigMapOrSecret(List volumeMounts, - String key, String volumePath, - Map data) { - VolumeMountBuilder volumeMountBuilder = new VolumeMountBuilder() - .withName(this.volumeName(key)) - .withMountPath(volumePath); - // mount subPath if data only have one, otherwise mount the directory - if (data.size() == 1) { - String fileName = data.keySet().stream().findFirst().orElse(""); - volumeMountBuilder.withMountPath(Paths.get(volumePath, fileName) - .toString()); - volumeMountBuilder.withSubPath(fileName); - } - volumeMounts.add(volumeMountBuilder.build()); - } - - private VolumeMount getComputerConfigMount() { - return new VolumeMountBuilder() - .withName(COMPUTER_CONFIG_MAP_VOLUME) - .withMountPath(Constants.CONFIG_DIR) - .build(); - } - - private Volume getComputerConfigVolume(String configMapName) { - return new VolumeBuilder() - .withName(COMPUTER_CONFIG_MAP_VOLUME) - .withNewConfigMap() - .withName(configMapName) - .endConfigMap() - .build(); - } - - public ObjectMeta getMetadata(HugeGraphComputerJob computerJob, - String component) { - String namespace = computerJob.getMetadata().getNamespace(); - String crName = computerJob.getMetadata().getName(); - - OwnerReference ownerReference = new OwnerReferenceBuilder() - .withName(crName) - .withApiVersion(computerJob.getApiVersion()) - .withUid(computerJob.getMetadata().getUid()) - .withKind(computerJob.getKind()) - .withController(true) - .withBlockOwnerDeletion(true) - .build(); - - String kind = HasMetadata.getKind(HugeGraphComputerJob.class); - Map labels = KubeUtil.commonLabels(kind, crName, - component); - return new ObjectMetaBuilder().withNamespace(namespace) - .withName(component) - .addToLabels(labels) - .withOwnerReferences(ownerReference) - .build(); - } - - private String volumeName(String name) { - return name + "-volume"; - } -} diff --git a/computer-k8s-operator/src/main/resources/log4j2.xml b/computer-k8s-operator/src/main/resources/log4j2.xml deleted file mode 100644 index bc3a5619e..000000000 --- a/computer-k8s-operator/src/main/resources/log4j2.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - logs - hugegraph-computer-k8s-operator - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/computer-k8s/schema/crd-schema.json b/computer-k8s/schema/crd-schema.json deleted file mode 100644 index f8c76e19f..000000000 --- a/computer-k8s/schema/crd-schema.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "id": "http://fabric8.io/hugegraph-computer/ComputerSchema#", - "$schema": "http://json-schema.org/draft-05/schema#", - "definitions": { - "hugegraph_apache_org_operator_api_v1_ComponentState": { - "type": "object", - "properties": { - "errorLog": { - "type": "string" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "state": { - "type": "string" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentState", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "hugegraph_apache_org_operator_api_v1_ComponentsStatus": { - "type": "object", - "properties": { - "configMap": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentState" - }, - "masterJob": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentState" - }, - "workerJob": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentState" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentsStatus", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobSpec": { - "type": "object", - "properties": { - "algorithmName": { - "type": "string", - "existingJavaType": "String" - }, - "computerConf": { - "type": "object", - "existingJavaType": "java.util.Map\u003cString,String\u003e" - }, - "configMapPaths": { - "type": "object", - "existingJavaType": "java.util.Map\u003cString,String\u003e" - }, - "envFrom": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "existingJavaType": "io.fabric8.kubernetes.api.model.EnvFromSource" - } - }, - "envVars": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "existingJavaType": "io.fabric8.kubernetes.api.model.EnvVar" - } - }, - "image": { - "type": "string", - "existingJavaType": "String" - }, - "jarFile": { - "type": "string", - "existingJavaType": "String" - }, - "jobId": { - "type": "string", - "existingJavaType": "String" - }, - "jvmOptions": { - "type": "string", - "existingJavaType": "String" - }, - "log4jXml": { - "type": "string", - "existingJavaType": "String" - }, - "masterArgs": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "type": "string" - } - }, - "masterCommand": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "type": "string" - } - }, - "masterCpu": { - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "masterMemory": { - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "podTemplateSpec": { - "existingJavaType": "io.fabric8.kubernetes.api.model.PodTemplateSpec" - }, - "pullPolicy": { - "type": "string" - }, - "pullSecrets": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "existingJavaType": "io.fabric8.kubernetes.api.model.LocalObjectReference" - } - }, - "remoteJarUri": { - "type": "string", - "existingJavaType": "String" - }, - "secretPaths": { - "type": "object", - "existingJavaType": "java.util.Map\u003cString,String\u003e" - }, - "securityContext": { - "existingJavaType": "io.fabric8.kubernetes.api.model.SecurityContext" - }, - "volumeMounts": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "existingJavaType": "io.fabric8.kubernetes.api.model.VolumeMount" - } - }, - "volumes": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "existingJavaType": "io.fabric8.kubernetes.api.model.Volume" - } - }, - "workerArgs": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "type": "string" - } - }, - "workerCommand": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "type": "string" - } - }, - "workerCpu": { - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "workerInstances": { - "type": "integer" - }, - "workerMemory": { - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobState": { - "type": "object", - "properties": { - "lastSuperstepStat": { - "type": "string", - "existingJavaType": "String" - }, - "maxSuperstep": { - "type": "integer" - }, - "superstep": { - "type": "integer" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobState", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobStatus": { - "type": "object", - "properties": { - "componentStates": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentsStatus", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentsStatus" - }, - "jobState": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobState" - }, - "jobStatus": { - "type": "string", - "existingJavaType": "String" - }, - "lastUpdateTime": { - "existingJavaType": "java.lang.String" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatus", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource" - ] - }, - "hugegraph_apache_org_operator_api_v1_HugeGraphComputerJob": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "operator.hugegraph.apache.org/v1", - "required": true - }, - "kind": { - "type": "string", - "default": "HugeGraphComputerJob", - "required": true - }, - "metadata": { - "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectMeta" - }, - "spec": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobSpec", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec" - }, - "status": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobStatus", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatus" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.HasMetadata", - "io.fabric8.kubernetes.api.model.Namespaced" - ] - }, - "hugegraph_apache_org_operator_api_v1_HugeGraphComputerJobList": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "operator.hugegraph.apache.org/v1", - "required": true - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_HugeGraphComputerJob", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob" - } - }, - "kind": { - "type": "string", - "default": "HugeGraphComputerJobList", - "required": true - }, - "metadata": { - "existingJavaType": "io.fabric8.kubernetes.api.model.ListMeta" - } - }, - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJobList", - "javaInterfaces": [ - "io.fabric8.kubernetes.api.model.KubernetesResource", - "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003corg.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob\u003e" - ] - } - }, - "type": "object", - "properties": { - "hugegraph_apache_org_operator_api_v1_ComponentState": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentState" - }, - "hugegraph_apache_org_operator_api_v1_ComponentsStatus": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComponentsStatus", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComponentsStatus" - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobSpec": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobSpec", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec" - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobState": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobState", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobState" - }, - "hugegraph_apache_org_operator_api_v1_ComputerJobStatus": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_ComputerJobStatus", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatus" - }, - "hugegraph_apache_org_operator_api_v1_HugeGraphComputerJob": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_HugeGraphComputerJob", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob" - }, - "hugegraph_apache_org_operator_api_v1_HugeGraphComputerJobList": { - "$ref": "#/definitions/hugegraph_apache_org_operator_api_v1_HugeGraphComputerJobList", - "existingJavaType": "org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJobList" - } - }, - "additionalProperties": false -} diff --git a/computer-k8s/schema/enum-schema.json b/computer-k8s/schema/enum-schema.json deleted file mode 100644 index fb3126c09..000000000 --- a/computer-k8s/schema/enum-schema.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "http://fabric8.io/hugegraph-computer/ComputerSchema#", - "$schema": "http://json-schema.org/draft-06/schema#", - "type" : "object", - "definitions" : { - "NodePhase" : { - "type" : "string", - "enum" : ["NodePending", "NodeRunning", "NodeTerminated"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.NodePhase" - }, - "ResourceName" : { - "type" : "string", - "enum" : ["cpu", "memory", "storage", "ephemeral-storage"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.ResourceName" - }, - "RestartPolicy" : { - "type" : "string", - "enum" : ["Always", "OnFailure", "Never"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.RestartPolicy" - }, - "PullPolicy" : { - "type" : "string", - "enum" : ["Always", "Never", "IfNotPresent"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.PullPolicy" - }, - "PodPhase" : { - "type" : "string", - "enum" : ["Pending", "Running", "Succeeded", "Failed", "Unknown"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.PodPhase" - }, - "EventType" : { - "type" : "string", - "enum" : ["Normal", "Warning"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.EventType" - }, - "CommonComponentState" : { - "type" : "string", - "enum" : ["NotReady", "Ready", "Deleted"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.CommonComponentState" - }, - "JobComponentState" : { - "type" : "string", - "enum" : ["Pending", "Running", "Succeeded", "Failed", "Cancelled", "Unknown"], - "javaType": "org.apache.hugegraph.computer.k8s.crd.model.JobComponentState" - } - }, - "properties": { - "NodePhase": { - "$ref": "#/definitions/NodePhase" - }, - "ResourceName": { - "$ref": "#/definitions/ResourceName" - }, - "RestartPolicy": { - "$ref": "#/definitions/RestartPolicy" - }, - "PullPolicy" : { - "$ref": "#/definitions/PullPolicy" - }, - "PodPhase" : { - "$ref": "#/definitions/PodPhase" - }, - "EventType" : { - "$ref": "#/definitions/EventType" - }, - "CommonComponentState" : { - "$ref": "#/definitions/CommonComponentState" - }, - "JobComponentState" : { - "$ref": "#/definitions/JobComponentState" - } - } -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/Constants.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/Constants.java deleted file mode 100644 index b67a3dd90..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/Constants.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s; - -import java.util.List; - -import com.google.common.collect.Lists; - -import io.fabric8.kubernetes.client.utils.URLUtils; - -public class Constants { - - public static final String ALL_NAMESPACE = "*"; - public static final String DEFAULT_NAMESPACE = "hugegraph-computer-operator-system"; - - public static final int MASTER_INSTANCES = 1; - - // Container ENV - public static final String ENV_POD_IP = "POD_IP"; - public static final String ENV_POD_NAMESPACE = "POD_NAMESPACE"; - public static final String ENV_POD_NAME = "POD_NAME"; - public static final String ENV_CONFIG_DIR = "CONFIG_DIR"; - public static final String ENV_COMPUTER_CONF_PATH = "COMPUTER_CONF_PATH"; - public static final String ENV_LOG4J_CONF_PATH = "LOG4J_CONF_PATH"; - public static final String ENV_JAR_FILE_PATH = "JAR_FILE_PATH"; - public static final String ENV_REMOTE_JAR_URI = "REMOTE_JAR_URI"; - public static final String ENV_JVM_OPTIONS = "JVM_OPTIONS"; - public static final String ENV_CPU_LIMIT = "CPU_LIMIT"; - public static final String ENV_MEMORY_LIMIT = "MEMORY_LIMIT"; - - public static final String CONFIG_DIR = "/opt/hugegraph-computer/conf"; - public static final String COMPUTER_CONF_FILE = "computer.properties"; - public static final String LOG_XML_FILE = "log4j2.xml"; - public static final String COMPUTER_CONF_PATH = - URLUtils.pathJoin(CONFIG_DIR, COMPUTER_CONF_FILE); - public static final String LOG_XML_PATH = - URLUtils.pathJoin(CONFIG_DIR, LOG_XML_FILE); - - public static final String DEFAULT_LOG_PATH = - "/opt/hugegraph-computer/logs/hugegraph-computer.log"; - - public static final List COMMAND = - Lists.newArrayList("bin/start-computer.sh"); - public static final List MASTER_ARGS = - Lists.newArrayList("-r master", "-d k8s"); - public static final List WORKER_ARGS = - Lists.newArrayList("-r worker", "-d k8s"); - - public static final String K8S_SPEC_PREFIX = "k8s."; -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeDriverOptions.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeDriverOptions.java deleted file mode 100644 index 7715bc8a7..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeDriverOptions.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.config; - -import static org.apache.hugegraph.config.OptionChecker.allowValues; -import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.config.ConfigListOption; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.OptionHolder; - -public class KubeDriverOptions extends OptionHolder { - - private KubeDriverOptions() { - super(); - } - - private static volatile KubeDriverOptions INSTANCE; - - public static synchronized KubeDriverOptions instance() { - if (INSTANCE == null) { - INSTANCE = new KubeDriverOptions(); - // Should initialize all static members first, then register. - INSTANCE.registerOptions(); - } - return INSTANCE; - } - - public static final ConfigOption NAMESPACE = - new ConfigOption<>( - "k8s.namespace", - "The namespace of hugegraph-computer system.", - disallowEmpty(), - Constants.DEFAULT_NAMESPACE - ); - - public static final ConfigOption KUBE_CONFIG = - new ConfigOption<>( - "k8s.kube_config", - "The path of k8s config file.", - disallowEmpty(), - FileUtils.getUserDirectoryPath() + "/.kube/config" - ); - - public static final ConfigOption FRAMEWORK_IMAGE_URL = - new ConfigOption<>( - "k8s.framework_image_url", - "The image url of computer framework.", - disallowEmpty(), - "hugegraph/hugegraph-computer:latest" - ); - - public static final ConfigOption BUILD_IMAGE_BASH_PATH = - new ConfigOption<>( - "k8s.build_image_bash_path", - "The path of command used to build image.", - null, - "" - ); - - public static final ConfigOption IMAGE_REPOSITORY_REGISTRY = - new ConfigOption<>( - "k8s.image_repository_registry", - "The address for login image repository.", - null, - "" - ); - - public static final ConfigOption IMAGE_REPOSITORY_USERNAME = - new ConfigOption<>( - "k8s.image_repository_username", - "The username for login image repository.", - null, - "" - ); - - public static final ConfigOption IMAGE_REPOSITORY_PASSWORD = - new ConfigOption<>( - "k8s.image_repository_password", - "The password for login image repository.", - null, - "" - ); - - public static final ConfigOption IMAGE_REPOSITORY_URL = - new ConfigOption<>( - "k8s.image_repository_url", - "The url of image repository.", - disallowEmpty(), - "hugegraph/hugegraph-computer" - ); - - public static final ConfigOption JAR_FILE_DIR = - new ConfigOption<>( - "k8s.jar_file_dir", - "The directory where the algorithm jar to upload location.", - disallowEmpty(), - "/cache/jars/" - ); - - public static final ConfigListOption PULL_SECRET_NAMES = - new ConfigListOption<>( - "k8s.pull_secret_names", - "The names of pull-secret for pulling image.", - null, - "" - ); - - public static final ConfigOption LOG4J_XML_PATH = - new ConfigOption<>( - "k8s.log4j_xml_path", - "The log4j.xml path for computer job.", - null, - "" - ); - - public static final ConfigOption ENABLE_INTERNAL_ALGORITHM = - new ConfigOption<>( - "k8s.enable_internal_algorithm", - "Whether enable internal algorithm.", - allowValues(true, false), - true - ); - - public static final ConfigListOption INTERNAL_ALGORITHMS = - new ConfigListOption<>( - "k8s.internal_algorithm", - "The name list of all internal algorithm.", - disallowEmpty(), - "pageRank" - ); - - public static final ConfigOption INTERNAL_ALGORITHM_IMAGE_URL = - new ConfigOption<>( - "k8s.internal_algorithm_image_url", - "The image url of internal algorithm.", - disallowEmpty(), - "hugegraph/hugegraph-computer:latest" - ); -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJob.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJob.java deleted file mode 100644 index 1779ac60a..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJob.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.crd.model; - -import java.util.Map; - -import io.fabric8.kubernetes.api.model.Namespaced; -import io.fabric8.kubernetes.client.CustomResource; -import io.fabric8.kubernetes.client.utils.Serialization; -import io.fabric8.kubernetes.model.annotation.Group; -import io.fabric8.kubernetes.model.annotation.Kind; -import io.fabric8.kubernetes.model.annotation.Plural; -import io.fabric8.kubernetes.model.annotation.Singular; -import io.fabric8.kubernetes.model.annotation.Version; - -@Version(HugeGraphComputerJob.VERSION) -@Group(HugeGraphComputerJob.GROUP) -@Kind(HugeGraphComputerJob.KIND) -@Plural(HugeGraphComputerJob.PLURAL) -@Singular(HugeGraphComputerJob.SINGULAR) -public class HugeGraphComputerJob - extends CustomResource - implements Namespaced { - - private static final long serialVersionUID = 6788317713035067450L; - - public static final String VERSION = "v1"; - public static final String GROUP = "operator.hugegraph.apache.org"; - public static final String KIND = "HugeGraphComputerJob"; - public static final String PLURAL = "hugegraphcomputerjobs"; - public static final String SINGULAR = "hugegraphcomputerjob"; - public static final String API_VERSION = GROUP + "/" + VERSION; - - public static ComputerJobSpec mapToSpec(Map specMap) { - String yaml = Serialization.asYaml(specMap); - return Serialization.unmarshal(yaml, ComputerJobSpec.class); - } - - public static Map specToMap(ComputerJobSpec spec) { - String yaml = Serialization.asYaml(spec); - @SuppressWarnings("unchecked") - Map map = Serialization.unmarshal(yaml, Map.class); - return map; - } -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJobList.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJobList.java deleted file mode 100644 index 2cda58329..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/crd/model/HugeGraphComputerJobList.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.crd.model; - -import io.fabric8.kubernetes.client.CustomResourceList; - -public class HugeGraphComputerJobList - extends CustomResourceList { - - private static final long serialVersionUID = 2245141648184590009L; -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/driver/KubernetesDriver.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/driver/KubernetesDriver.java deleted file mode 100644 index a6e845b65..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/driver/KubernetesDriver.java +++ /dev/null @@ -1,578 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.driver; - -import static org.apache.hugegraph.computer.core.config.ComputerOptions.COMPUTER_PROHIBIT_USER_OPTIONS; -import static org.apache.hugegraph.computer.core.config.ComputerOptions.COMPUTER_REQUIRED_USER_OPTIONS; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; - -import io.fabric8.kubernetes.api.model.DeletionPropagation; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.mutable.MutableBoolean; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.driver.ComputerDriver; -import org.apache.hugegraph.computer.driver.ComputerDriverException; -import org.apache.hugegraph.computer.driver.DefaultJobState; -import org.apache.hugegraph.computer.driver.JobObserver; -import org.apache.hugegraph.computer.driver.JobState; -import org.apache.hugegraph.computer.driver.JobStatus; -import org.apache.hugegraph.computer.driver.SuperstepStat; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.computer.k8s.config.KubeDriverOptions; -import org.apache.hugegraph.computer.k8s.config.KubeSpecOptions; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobStatus; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJobList; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.config.ConfigListOption; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.TypedOption; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.fabric8.kubernetes.api.model.Event; -import io.fabric8.kubernetes.api.model.LocalObjectReference; -import io.fabric8.kubernetes.api.model.ObjectMeta; -import io.fabric8.kubernetes.api.model.ObjectMetaBuilder; -import io.fabric8.kubernetes.client.Config; -import io.fabric8.kubernetes.client.DefaultKubernetesClient; -import io.fabric8.kubernetes.client.NamespacedKubernetesClient; -import io.fabric8.kubernetes.client.Watch; -import io.fabric8.kubernetes.client.Watcher; -import io.fabric8.kubernetes.client.WatcherException; -import io.fabric8.kubernetes.client.dsl.MixedOperation; -import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.utils.IOHelpers; -import io.fabric8.kubernetes.client.utils.URLUtils; - -public class KubernetesDriver implements ComputerDriver { - - private static final Logger LOG = Log.logger(KubernetesDriver.class); - - private final HugeConfig conf; - private final String namespace; - private final NamespacedKubernetesClient kubeClient; - private final MixedOperation> operation; - private volatile Watch watch; - private final MutableBoolean watchActive; - private final Map, JobObserver>> waits; - private final Map defaultSpec; - private final Map defaultConf; - - private final String bashPath; - private final String jarFileDir; - private final String registry; - private final String username; - private final String password; - private final Boolean enableInternalAlgorithm; - private final List internalAlgorithms; - private final String internalAlgorithmImageUrl; - private final String frameworkImageUrl; - - private static final String DEFAULT_PUSH_BASH_PATH = "/docker_push.sh"; - private static final String BUILD_IMAGE_FUNC = "build_image"; - private static final String TMP_DIR = System.getProperty("java.io.tmpdir"); - - public KubernetesDriver(HugeConfig conf) { - this(conf, createKubeClient(conf)); - } - - public KubernetesDriver(HugeConfig conf, - NamespacedKubernetesClient kubeClient) { - this.conf = conf; - this.namespace = this.conf.get(KubeDriverOptions.NAMESPACE); - this.kubeClient = kubeClient.inNamespace(this.namespace); - this.operation = this.kubeClient.customResources( - HugeGraphComputerJob.class, - HugeGraphComputerJobList.class); - this.watch = this.initWatch(); - this.watchActive = new MutableBoolean(true); - this.waits = new ConcurrentHashMap<>(); - this.defaultSpec = this.defaultSpec(); - this.defaultConf = this.defaultComputerConf(); - - this.bashPath = this.conf.get(KubeDriverOptions.BUILD_IMAGE_BASH_PATH); - this.jarFileDir = this.conf.get(KubeDriverOptions.JAR_FILE_DIR); - this.registry = this.conf.get( - KubeDriverOptions.IMAGE_REPOSITORY_REGISTRY).trim(); - this.username = this.conf.get( - KubeDriverOptions.IMAGE_REPOSITORY_USERNAME); - this.password = this.conf.get( - KubeDriverOptions.IMAGE_REPOSITORY_PASSWORD); - this.enableInternalAlgorithm = this.conf.get( - KubeDriverOptions.ENABLE_INTERNAL_ALGORITHM); - this.internalAlgorithms = this.conf.get( - KubeDriverOptions.INTERNAL_ALGORITHMS); - this.internalAlgorithmImageUrl = this.conf.get( - KubeDriverOptions.INTERNAL_ALGORITHM_IMAGE_URL); - this.frameworkImageUrl = this.conf.get( - KubeDriverOptions.FRAMEWORK_IMAGE_URL); - } - - private static NamespacedKubernetesClient createKubeClient( - HugeConfig conf) { - String kubeConfig = conf.get(KubeDriverOptions.KUBE_CONFIG); - Config config; - try { - File file = new File(kubeConfig); - @SuppressWarnings("deprecation") - String kubeConfigContents = FileUtils.readFileToString(file); - config = Config.fromKubeconfig(kubeConfigContents); - } catch (IOException e) { - throw new ComputerDriverException("Failed to read KubeConfig: %s", - e, kubeConfig); - } - return new DefaultKubernetesClient(config); - } - - @Override - public void uploadAlgorithmJar(String algorithmName, InputStream input) { - File tempFile = null; - try { - Path path = Files.createDirectories( - Paths.get(TMP_DIR, UUID.randomUUID().toString())); - tempFile = File.createTempFile("userAlgorithm", ".jar", - path.toFile()); - FileUtils.copyInputStreamToFile(input, tempFile); - - InputStream bashStream; - if (StringUtils.isBlank(this.bashPath)) { - bashStream = this.getClass() - .getResourceAsStream(DEFAULT_PUSH_BASH_PATH); - } else { - bashStream = new FileInputStream(this.bashPath); - } - String bashAsStr = IOHelpers.readFully(bashStream); - - StringBuilder builder = new StringBuilder(); - builder.append(BUILD_IMAGE_FUNC); - if (StringUtils.isNotBlank(this.registry)) { - builder.append(" -r ").append(this.registry); - } - if (StringUtils.isNotBlank(this.username)) { - builder.append(" -u ").append(this.username); - } - if (StringUtils.isNotBlank(this.password)) { - builder.append(" -p ").append(this.password); - } - builder.append(" -s ").append(tempFile.getAbsolutePath()); - String jarFile = this.buildJarFile(this.jarFileDir, algorithmName); - builder.append(" -j ").append(jarFile); - String imageUrl = this.buildImageUrl(algorithmName); - builder.append(" -i ").append(imageUrl); - builder.append(" -f ").append(this.frameworkImageUrl); - String args = builder.toString(); - String[] command = {"bash", "-c", bashAsStr + "\n" + args}; - - Process process = Runtime.getRuntime().exec(command); - int code = process.waitFor(); - if (code != 0) { - InputStream errorStream = process.getErrorStream(); - String errorInfo = IOHelpers.readFully(errorStream); - if (StringUtils.isBlank(errorInfo)) { - InputStream stdoutStream = process.getInputStream(); - errorInfo = IOHelpers.readFully(stdoutStream); - } - throw new ComputerDriverException(errorInfo); - } - } catch (Throwable exception) { - throw new ComputerDriverException("Failed to upload algorithm Jar", - exception); - } finally { - FileUtils.deleteQuietly(tempFile); - } - } - - @Override - public String submitJob(String algorithmName, Map params) { - HugeGraphComputerJob computerJob = new HugeGraphComputerJob(); - String jobId = KubeUtil.genJobId(algorithmName); - String crName = KubeUtil.crName(jobId); - - ObjectMeta meta = new ObjectMetaBuilder().withNamespace(this.namespace) - .withName(crName) - .build(); - computerJob.setMetadata(meta); - - ComputerJobSpec spec = this.computerJobSpec(this.defaultSpec, params); - - Map computerConf = this.computerConf(this.defaultConf, - params); - this.checkComputerConf(computerConf, spec); - - spec.withAlgorithmName(algorithmName) - .withJobId(jobId) - .withComputerConf(computerConf); - - if (this.enableInternalAlgorithm && - this.internalAlgorithms.contains(algorithmName)) { - spec.withImage(this.internalAlgorithmImageUrl); - } else if (StringUtils.isNotBlank(spec.getRemoteJarUri())) { - spec.withImage(this.frameworkImageUrl); - } else { - String imageUrl = this.buildImageUrl(algorithmName); - String jarFileDir = this.conf.get(KubeDriverOptions.JAR_FILE_DIR); - String jarFile = this.buildJarFile(jarFileDir, algorithmName); - spec.withImage(imageUrl) - .withJarFile(jarFile); - } - - computerJob.setSpec(spec); - - this.operation.createOrReplace(computerJob); - return jobId; - } - - private void checkComputerConf(Map computerConf, - ComputerJobSpec spec) { - @SuppressWarnings("unchecked") - Collection unSetOptions = CollectionUtils.removeAll( - COMPUTER_REQUIRED_USER_OPTIONS, - computerConf.keySet()); - E.checkArgument(unSetOptions.isEmpty(), - "The %s options can't be null", unSetOptions); - - int partitionsCount = Integer.parseInt(computerConf.getOrDefault( - ComputerOptions.JOB_PARTITIONS_COUNT.name(), - "1")); - int workerInstances = spec.getWorkerInstances(); - E.checkArgument(partitionsCount >= workerInstances, - "The partitions count must be >= workers instances, " + - "but got %s < %s", partitionsCount, workerInstances); - } - - @Override - public boolean cancelJob(String jobId, Map params) { - return this.operation.withName(KubeUtil.crName(jobId)) - .withPropagationPolicy(DeletionPropagation.FOREGROUND) - .delete(); - } - - @Override - public CompletableFuture waitJobAsync(String jobId, - Map params, - JobObserver observer) { - JobState jobState = this.jobState(jobId, params); - if (jobState == null) { - LOG.warn("Unable to fetch state of job '{}', it may have been " + - "deleted", jobId); - return null; - } else { - observer.onJobStateChanged(jobState); - } - - CompletableFuture future = null; - synchronized (this.watchActive) { - if (!this.watchActive.getValue()) { - this.watch = this.initWatch(); - this.watchActive.setTrue(); - } else { - future = new CompletableFuture<>(); - this.waits.put(jobId, Pair.of(future, observer)); - } - } - - return future; - } - - private Watch initWatch() { - return this.operation.watch(new Watcher() { - @Override - public void eventReceived(Action action, - HugeGraphComputerJob computerJob) { - if (computerJob == null) { - return; - } - - if (action == Action.ERROR) { - return; - } - - String jobId = computerJob.getSpec().getJobId(); - if (StringUtils.isBlank(jobId)) { - return; - } - - Pair, - JobObserver> pair = KubernetesDriver.this.waits.get(jobId); - - if (pair != null) { - CompletableFuture future = pair.getLeft(); - JobObserver observer = pair.getRight(); - - @SuppressWarnings("resource") - KubernetesDriver driver = KubernetesDriver.this; - JobState jobState = driver.buildJobState(computerJob); - - observer.onJobStateChanged(jobState); - - if (JobStatus.finished(jobState.jobStatus())) { - future.complete(null); - driver.cancelWait(jobId); - } - } - } - - @Override - public void onClose(WatcherException cause) { - for (Pair, JobObserver> pair : - KubernetesDriver.this.waits.values()) { - if (pair != null) { - CompletableFuture future = pair.getLeft(); - future.completeExceptionally(cause); - } - } - synchronized (KubernetesDriver.this.watchActive) { - KubernetesDriver.this.waits.clear(); - Watch watch = KubernetesDriver.this.watch; - if (watch != null) { - watch.close(); - } - KubernetesDriver.this.watchActive.setFalse(); - } - } - }); - } - - private void cancelWait(String jobId) { - Pair, JobObserver> pair = this.waits.remove(jobId); - if (pair != null) { - CompletableFuture future = pair.getLeft(); - future.cancel(true); - } - } - - @Override - public JobState jobState(String jobId, Map params) { - String crName = KubeUtil.crName(jobId); - HugeGraphComputerJob computerJob = this.operation.withName(crName).get(); - if (computerJob == null) { - return null; - } - return this.buildJobState(computerJob); - } - - @Override - public List superstepStats(String jobId, Map params) { - // TODO: implement - return null; - } - - @Override - public String diagnostics(String jobId, Map params) { - String crName = KubeUtil.crName(jobId); - String eventName = KubeUtil.failedEventName(crName); - Event event = this.kubeClient.v1().events() - .withName(eventName) - .get(); - if (event == null) { - return null; - } - return event.getMessage(); - } - - @Override - public String log(String jobId, int containerId, long offset, long length, - Map params) { - // TODO: implement - return null; - } - - @Override - public void close() { - Iterator, JobObserver>> iterator = - this.waits.values().iterator(); - while (iterator.hasNext()) { - CompletableFuture future = iterator.next().getLeft(); - future.cancel(true); - iterator.remove(); - } - - if (this.watch != null) { - this.watch.close(); - this.watchActive.setFalse(); - } - - if (this.kubeClient != null) { - this.kubeClient.close(); - } - } - - private JobState buildJobState(HugeGraphComputerJob computerJob) { - E.checkNotNull(computerJob, "computerJob"); - ComputerJobStatus status = computerJob.getStatus(); - if (status == null || status.getJobStatus() == null) { - return new DefaultJobState().jobStatus(JobStatus.INITIALIZING); - } - JobStatus jobStatus = JobStatus.valueOf(status.getJobStatus()); - return new DefaultJobState().jobStatus(jobStatus); - } - - private String buildImageUrl(String algorithmName) { - String repository = this.conf.get( - KubeDriverOptions.IMAGE_REPOSITORY_URL); - return KubeUtil.imageUrl(repository, algorithmName, null); - } - - private String buildJarFile(String jarFileDir, String algorithmName) { - return URLUtils.join(jarFileDir, algorithmName + ".jar"); - } - - private Map computerConf(Map defaultConf, - Map params) { - Map computerConf = new HashMap<>(defaultConf); - Map> allOptions = ComputerOptions.instance().options(); - params.forEach((k, v) -> { - if (StringUtils.isNotBlank(k) && StringUtils.isNotBlank(v)) { - if (!k.startsWith(Constants.K8S_SPEC_PREFIX) && - !COMPUTER_PROHIBIT_USER_OPTIONS.contains(k)) { - ConfigOption typedOption = (ConfigOption) allOptions.get(k); - if (typedOption != null) { - // check value - typedOption.parseConvert(v); - } - computerConf.put(k, v); - } - } - }); - return computerConf; - } - - private Map defaultComputerConf() { - Map defaultConf = new HashMap<>(); - - Collection> options = ComputerOptions.instance().options().values(); - for (TypedOption typedOption : options) { - Object value = this.conf.get(typedOption); - String key = typedOption.name(); - if (value != null) { - defaultConf.put(key, String.valueOf(value)); - } else { - boolean required = ComputerOptions.REQUIRED_OPTIONS.contains(key); - E.checkArgument(!required, "The %s option can't be null", key); - } - } - return Collections.unmodifiableMap(defaultConf); - } - - private ComputerJobSpec computerJobSpec(Map defaultSpec, - Map params) { - Map specMap = new HashMap<>(defaultSpec); - KubeSpecOptions.ALLOW_USER_SETTINGS.forEach((key, typeOption) -> { - String value = params.get(key); - if (StringUtils.isNotBlank(value)) { - String specKey = KubeUtil.covertSpecKey(key); - if (KubeSpecOptions.MAP_TYPE_CONFIGS.contains(typeOption)) { - if (StringUtils.isNotBlank(value)) { - Map result = new HashMap<>(); - List values = (List) typeOption.parseConvert(value); - for (String str : values) { - String[] pair = str.split(":", 2); - assert pair.length == 2; - result.put(pair[0], pair[1]); - } - specMap.put(specKey, result); - } - } else { - Object parsed = typeOption.parseConvert(value); - specMap.put(specKey, parsed); - } - } - }); - return HugeGraphComputerJob.mapToSpec(specMap); - } - - private Map defaultSpec() { - Map defaultSpec = new HashMap<>(); - - Collection> options = KubeSpecOptions.instance().options().values(); - for (TypedOption typeOption : options) { - Object value = this.conf.get(typeOption); - if (value != null) { - String specKey = KubeUtil.covertSpecKey(typeOption.name()); - if (KubeSpecOptions.MAP_TYPE_CONFIGS.contains(typeOption)) { - if (!Objects.equals(String.valueOf(value), "[]")) { - value = this.conf.getMap((ConfigListOption) typeOption); - defaultSpec.put(specKey, value); - } - } else { - defaultSpec.put(specKey, value); - } - } - } - ComputerJobSpec spec = HugeGraphComputerJob.mapToSpec(defaultSpec); - - // Add pullSecrets - List secretNames = this.conf.get(KubeDriverOptions.PULL_SECRET_NAMES); - if (CollectionUtils.isNotEmpty(secretNames)) { - List secrets = new ArrayList<>(); - for (String name : secretNames) { - if (StringUtils.isBlank(name)) { - continue; - } - secrets.add(new LocalObjectReference(name)); - } - if (CollectionUtils.isNotEmpty(secrets)) { - spec.withPullSecrets(secrets); - } - } - - // Add log4j.xml - String log4jXmlPath = this.conf.get(KubeDriverOptions.LOG4J_XML_PATH); - if (StringUtils.isNotBlank(log4jXmlPath)) { - try { - File file = new File(log4jXmlPath); - @SuppressWarnings("deprecation") - String log4jXml = FileUtils.readFileToString(file); - spec.withLog4jXml(log4jXml); - } catch (IOException exception) { - throw new ComputerDriverException( - "Failed to read log4j file for computer job", - exception); - } - } - - Map specMap = HugeGraphComputerJob.specToMap(spec); - return Collections.unmodifiableMap(specMap); - } -} diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/util/KubeUtil.java b/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/util/KubeUtil.java deleted file mode 100644 index c76438f51..000000000 --- a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/util/KubeUtil.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s.util; - -import java.net.HttpURLConnection; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Base64; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Supplier; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.k8s.Constants; -import org.apache.hugegraph.computer.k8s.crd.model.EventType; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import io.fabric8.kubernetes.api.model.Event; -import io.fabric8.kubernetes.api.model.EventBuilder; -import io.fabric8.kubernetes.api.model.EventSource; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.ObjectReference; -import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder; -import io.fabric8.kubernetes.api.model.Secret; -import io.fabric8.kubernetes.api.model.SecretBuilder; -import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.utils.Serialization; -import io.fabric8.kubernetes.client.utils.Utils; - -public class KubeUtil { - - private static final Logger LOG = Log.logger(KubeUtil.class); - - private static final Pattern LINE_PATTERN = Pattern.compile("_([a-z])"); - - /** - * Tries a condition func until the initial delay specified. - * - * @param initialDelay the initial delay - * @param interval the check interval - * @param timeout the timeout period - * @param condition the condition - * @param executor the executor - * @return returns true if gracefully finished - */ - public static boolean waitUntilReady(Duration initialDelay, - Duration interval, - Duration timeout, - Supplier condition, - ScheduledExecutorService executor) { - AtomicBoolean result = new AtomicBoolean(false); - long deadline = System.currentTimeMillis() + timeout.toMillis(); - ScheduledFuture future = executor.scheduleAtFixedRate( - () -> { - try { - result.set(condition.get()); - } catch (Exception e) { - result.set(false); - } - }, - initialDelay.toMillis(), - interval.toMillis(), - TimeUnit.MILLISECONDS); - try { - while (System.currentTimeMillis() < deadline) { - if (result.get()) { - return true; - } - } - } finally { - future.cancel(true); - } - return result.get(); - } - - public static String crName(String jobId) { - return jobId.toLowerCase().replaceAll("_", "-"); - } - - public static String genJobId(String algorithmName) { - return algorithmName + "-" + Utils.randomString(10); - } - - public static String imageUrl(String repository, String algorithmName, - String version) { - if (StringUtils.isBlank(version)) { - version = "latest"; - } - return String.format("%s:%s-%s", repository, algorithmName, version); - } - - public static String masterJobName(String crName) { - return crName + "-master"; - } - - public static String workerJobName(String crName) { - return crName + "-worker"; - } - - public static String configMapName(String crName) { - return crName + "-configmap"; - } - - public static String containerName(String component) { - return component + "-container"; - } - - public static String failedEventName(String crName) { - return crName + "-failedEvent"; - } - - public static String succeedEventName(String crName) { - return crName + "-succeedEvent"; - } - - public static String now() { - return OffsetDateTime.now().toString(); - } - - public static int intVal(Integer value) { - return value != null ? value : 0; - } - - public static String asProperties(Map map) { - StringBuilder builder = new StringBuilder(); - for (Map.Entry entry : map.entrySet()) { - String key = entry.getKey(); - String value = entry.getValue(); - if (StringUtils.isNotBlank(key)) { - builder.append(key); - builder.append("="); - if (value != null) { - builder.append(value); - } - builder.append("\n"); - } - } - return builder.toString(); - } - - public static T ignoreExists(Supplier supplier) { - try { - return supplier.get(); - } catch (KubernetesClientException exception) { - if (exception.getCode() == HttpURLConnection.HTTP_CONFLICT) { - LOG.warn("K8s resource already exists: {}", - exception.getMessage()); - return null; - } else { - throw exception; - } - } - } - - public static Map commonLabels(String kind, - String crName, - String component) { - Map labels = new HashMap<>(); - labels.put("app", kind); - labels.put("resourceName", crName); - labels.put("component", component); - return labels; - } - - public static String matchKindAndGetCrName(Map labels, - String kind) { - String app = labels.get("app"); - String crName = labels.get("resourceName"); - if (Objects.equals(kind, app) && StringUtils.isNotBlank(crName)) { - return crName; - } - - return StringUtils.EMPTY; - } - - public static Event buildEvent(HasMetadata eventRef, - EventSource eventSource, - EventType eventType, String eventName, - String reason, String message) { - String namespace = eventRef.getMetadata().getNamespace(); - String eventRefName = eventRef.getMetadata().getName(); - ObjectReference objectReference = new ObjectReferenceBuilder() - .withKind(eventRef.getKind()) - .withNamespace(namespace) - .withName(eventRefName) - .withUid(eventRef.getMetadata().getUid()) - .withApiVersion(HasMetadata.getApiVersion(eventRef.getClass())) - .build(); - - return new EventBuilder() - .withNewMetadata() - .withNamespace(namespace) - .withName(eventName) - .endMetadata() - .withMessage(message) - .withLastTimestamp(KubeUtil.now()) - .withType(eventType.value()) - .withInvolvedObject(objectReference) - .withSource(eventSource) - .withReason(reason) - .build(); - } - - /** - * Convert config key to spec key. - * eg. "k8s.master_cpu" -> "masterCpu" - */ - public static String covertSpecKey(String configKey) { - configKey = configKey.substring(Constants.K8S_SPEC_PREFIX.length()); - Matcher matcher = LINE_PATTERN.matcher(configKey); - StringBuffer sb = new StringBuffer(); - while (matcher.find()) { - matcher.appendReplacement(sb, matcher.group(1).toUpperCase()); - } - matcher.appendTail(sb); - return sb.toString(); - } - - public static Secret dockerRegistrySecret(String namespace, - String dockerServer, - String username, - String password) { - Map dockerConfig = createDockerConfig(dockerServer, - username, - password); - String dockerConfigAsStr = Serialization.asJson(dockerConfig); - String dataBase64 = Base64.getEncoder() - .encodeToString(dockerConfigAsStr.getBytes()); - String name = "registry-secret-" + Utils.randomString(6); - return new SecretBuilder().withNewMetadata() - .withNamespace(namespace) - .withName(name) - .endMetadata() - .withType("kubernetes.io/dockerconfigjson") - .addToData(".dockerconfigjson", dataBase64) - .build(); - } - - private static Map createDockerConfig(String dockerServer, - String username, - String password) { - Map dockerConfigMap = new HashMap<>(); - Map auths = new HashMap<>(); - Map credentials = new HashMap<>(); - credentials.put("username", username); - credentials.put("password", password); - String usernameAndPasswordAuth = username + ":" + password; - byte[] bytes = usernameAndPasswordAuth.getBytes(); - credentials.put("auth", Base64.getEncoder().encodeToString(bytes)); - auths.put(dockerServer, credentials); - dockerConfigMap.put("auths", auths); - - return dockerConfigMap; - } -} diff --git a/computer-k8s/src/main/resources/docker_push.sh b/computer-k8s/src/main/resources/docker_push.sh deleted file mode 100755 index dbe3e6eb6..000000000 --- a/computer-k8s/src/main/resources/docker_push.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -# -# 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. -# -set -ev - -function print_usage() { - echo "USAGE: $0 -r {REGISTRY} -u {USER_NAME} -p {PASSWORD} -s {SOURCE_JAR_FILE} -j {JAR_FILE} -i {IMG_URL} -f {FRAMEWORK_IMG_URL}" -} - -function build_image() { - REGISTRY="" - USER_NAME="" - PASSWORD="" - SOURCE_JAR_FILE="" - JAR_FILE="" - IMG_URL="" - FRAMEWORK_IMG_URL="" - MAINTAINER="HugeGraph Docker Maintainers " - - while getopts "r:u:p:s:j:i:f:" arg; do - case ${arg} in - r) REGISTRY="$OPTARG" ;; - u) USER_NAME="$OPTARG" ;; - p) PASSWORD="$OPTARG" ;; - s) SOURCE_JAR_FILE="$OPTARG" ;; - j) JAR_FILE="$OPTARG" ;; - i) IMG_URL="$OPTARG" ;; - f) FRAMEWORK_IMG_URL="$OPTARG" ;; - ?) print_usage && exit 1 ;; - esac - done - - if [ "$SOURCE_JAR_FILE" = "" ]; then - print_usage - exit 1 - fi - - if [ "$JAR_FILE" = "" ]; then - print_usage - exit 1 - fi - - if [ "$IMG_URL" = "" ]; then - print_usage - exit 1 - fi - - if [ "$FRAMEWORK_IMG_URL" = "" ]; then - print_usage - exit 1 - fi - - # Build image - SOURCE_JAR_FILE_NAME=${SOURCE_JAR_FILE##*/} - DOCKER_CONTEXT=${SOURCE_JAR_FILE%/*} - echo "FROM ${FRAMEWORK_IMG_URL} - LABEL maintainer='${MAINTAINER}' - COPY ${source_jar_file_name} ${JAR_FILE}" | \ - docker build -t ${IMG_URL} -f - ${docker_context} - - # Login repository - if [ "$USER_NAME" != "" ]; then - docker login -u ${USER_NAME} -p ${PASSWORD} ${REGISTRY} - fi - - # Push image to repository - docker push ${IMG_URL} - - # Logout repository - if [ "$USER_NAME" != "" ]; then - docker logout ${REGISTRY} - fi -} diff --git a/computer-test/conf/images/docker_push_test.sh b/computer-test/conf/images/docker_push_test.sh deleted file mode 100644 index 5c45e8010..000000000 --- a/computer-test/conf/images/docker_push_test.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# -# 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. -# -set -ev - -function print_usage() { - echo "USAGE: $0 -r {REGISTRY} -u {USER_NAME} -p {PASSWORD} -s {SOURCE_JAR_FILE} -j {JAR_FILE} -i {IMG_URL} -f {FRAMEWORK_IMG_URL}" -} - -function build_image() { - REGISTRY="" - USER_NAME="" - PASSWORD="" - SOURCE_JAR_FILE="" - JAR_FILE="" - IMG_URL="" - FRAMEWORK_IMG_URL="" - MAINTAINER="HugeGraph Docker Maintainers " - - while getopts "r:u:p:s:j:i:f:" arg; do - case ${arg} in - r) REGISTRY="$OPTARG" ;; - u) USER_NAME="$OPTARG" ;; - p) PASSWORD="$OPTARG" ;; - s) SOURCE_JAR_FILE="$OPTARG" ;; - j) JAR_FILE="$OPTARG" ;; - i) IMG_URL="$OPTARG" ;; - f) FRAMEWORK_IMG_URL="$OPTARG" ;; - ?) print_usage && exit 1 ;; - esac - done - - if [ "$SOURCE_JAR_FILE" = "" ]; then - print_usage - exit 1 - fi - - if [ "$JAR_FILE" = "" ]; then - print_usage - exit 1 - fi - - if [ "$IMG_URL" = "" ]; then - print_usage - exit 1 - fi - - if [ "$FRAMEWORK_IMG_URL" = "" ]; then - print_usage - exit 1 - fi - - cat >/tmp/upload.txt< - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/computer-test/pom.xml b/computer-test/pom.xml deleted file mode 100644 index 16f17a7fa..000000000 --- a/computer-test/pom.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-test - - - - - org.apache.hugegraph - computer-dist - ${revision} - - - org.apache.hugegraph - hugegraph-common - - - kotlin-stdlib-jdk8 - org.jetbrains.kotlin - - - - - org.apache.hugegraph - computer-api - ${revision} - - - org.apache.hugegraph - computer-core - ${revision} - - - okhttp - com.squareup.okhttp - - - okhttp - com.squareup.okhttp3 - - - - - org.apache.hugegraph - computer-algorithm - ${revision} - - - org.apache.hugegraph - computer-driver - ${revision} - - - org.apache.hugegraph - computer-yarn - ${revision} - - - org.apache.hugegraph - computer-k8s - ${revision} - - - org.apache.hugegraph - computer-k8s-operator - ${revision} - - - junit - junit - 4.12 - compile - - - org.mockito - mockito-core - 3.8.0 - compile - - - com.squareup.okhttp3 - mockwebserver - 4.12.0 - test - - - junit - junit - - - kotlin-stdlib - org.jetbrains.kotlin - - - - - io.fabric8 - kubernetes-server-mock - 5.6.0 - compile - - - mockwebserver - com.squareup.okhttp3 - - - jackson-databind - com.fasterxml.jackson.core - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.20 - - - unit-test - - - ${basedir}/src/main/java/ - - - ${basedir}/target/classes/ - - - **/UnitTestSuite.java - - - - - integrate-test - - - ${basedir}/src/main/java/ - - - ${basedir}/target/classes/ - - - **/IntegrateTestSuite.java - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.4 - - - pre-test - - prepare-agent - - - - post-test - test - - report-aggregate - - - ${basedir}/../target/site/jacoco - - - - - - - - - src/main/resources/ - true - - - - diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestBase.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestBase.java deleted file mode 100644 index a499abdf0..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestBase.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.master.MasterService; -import org.apache.hugegraph.computer.core.util.ComputerContextUtil; -import org.apache.hugegraph.computer.core.worker.MockWorkerService; -import org.apache.hugegraph.computer.core.worker.WorkerService; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.RpcOptions; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -import com.google.common.collect.Sets; - -public class AlgorithmTestBase extends UnitTestBase { - - public static final Logger LOG = Log.logger(AlgorithmTestBase.class); - - public static void runAlgorithm(String algorithmParams, String... options) - throws InterruptedException { - final Logger log = Log.logger(AlgorithmTestBase.class); - ExecutorService pool = Executors.newFixedThreadPool(2); - CountDownLatch countDownLatch = new CountDownLatch(2); - Throwable[] exceptions = new Throwable[2]; - AtomicReference masterServiceRef = new AtomicReference<>(); - Set workerServices = Sets.newConcurrentHashSet(); - pool.submit(() -> { - WorkerService workerService = null; - try { - Map params = new HashMap<>(); - params.put(ComputerOptions.JOB_ID.name(), - "algo_test_job1"); - params.put(ComputerOptions.JOB_WORKERS_COUNT.name(), - "1"); - params.put(ComputerOptions.TRANSPORT_SERVER_PORT.name(), - "8086"); - params.put(ComputerOptions.BSP_REGISTER_TIMEOUT.name(), - "100000"); - params.put(ComputerOptions.BSP_LOG_INTERVAL.name(), - "30000"); - params.put(ComputerOptions.BSP_MAX_SUPER_STEP.name(), - "10"); - params.put(ComputerOptions.ALGORITHM_PARAMS_CLASS.name(), - algorithmParams); - if (options != null) { - for (int i = 0; i < options.length; i += 2) { - params.put(options[i], options[i + 1]); - } - } - Config config = ComputerContextUtil.initContext(params); - workerService = new MockWorkerService(); - workerServices.add(workerService); - workerService.init(config); - workerService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start worker", e); - exceptions[0] = e; - // If worker failed, the master also should quit - while (countDownLatch.getCount() > 0) { - countDownLatch.countDown(); - } - } finally { - countDownLatch.countDown(); - } - }); - - pool.submit(() -> { - MasterService masterService = null; - try { - Map params = new HashMap<>(); - params.put(RpcOptions.RPC_SERVER_HOST.name(), - "localhost"); - params.put(ComputerOptions.JOB_ID.name(), - "algo_test_job1"); - params.put(ComputerOptions.JOB_WORKERS_COUNT.name(), - "1"); - params.put(ComputerOptions.BSP_REGISTER_TIMEOUT.name(), - "100000"); - params.put(ComputerOptions.BSP_LOG_INTERVAL.name(), - "30000"); - params.put(ComputerOptions.BSP_MAX_SUPER_STEP.name(), - "10"); - params.put(ComputerOptions.ALGORITHM_PARAMS_CLASS.name(), - algorithmParams); - if (options != null) { - for (int i = 0; i < options.length; i += 2) { - params.put(options[i], options[i + 1]); - } - } - - Config config = ComputerContextUtil.initContext(params); - - masterService = new MasterService(); - masterServiceRef.set(masterService); - masterService.init(config); - masterService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start master", e); - exceptions[1] = e; - // If master failed, the worker also should quit - while (countDownLatch.getCount() > 0) { - countDownLatch.countDown(); - } - } finally { - countDownLatch.countDown(); - } - }); - - try { - countDownLatch.await(); - } finally { - for (WorkerService workerService : workerServices) { - workerService.close(); - } - masterServiceRef.get().close(); - } - pool.shutdownNow(); - - Assert.assertFalse(Arrays.asList(exceptions).toString(), - existError(exceptions)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java deleted file mode 100644 index f5124d010..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/AlgorithmTestSuite.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm; - -import org.apache.hugegraph.computer.algorithm.centrality.betweenness.BetweennessCentralityTest; -import org.apache.hugegraph.computer.algorithm.centrality.closeness.ClosenessCentralityTest; -import org.apache.hugegraph.computer.algorithm.centrality.degree.DegreeCentralityTest; -import org.apache.hugegraph.computer.algorithm.centrality.pagerank.PageRankTest; -import org.apache.hugegraph.computer.algorithm.community.cc.ClusteringCoefficientTest; -import org.apache.hugegraph.computer.algorithm.community.kcore.KcoreTest; -import org.apache.hugegraph.computer.algorithm.community.lpa.LpaTest; -import org.apache.hugegraph.computer.algorithm.community.trianglecount.TriangleCountTest; -import org.apache.hugegraph.computer.algorithm.community.wcc.WccTest; -import org.apache.hugegraph.computer.algorithm.path.rings.RingsDetectionTest; -import org.apache.hugegraph.computer.algorithm.path.rings.RingsDetectionWithFilterTest; -import org.apache.hugegraph.computer.algorithm.path.shortest.SingleSourceShortestPathTest; -import org.apache.hugegraph.computer.algorithm.sampling.RandomWalkTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - PageRankTest.class, - DegreeCentralityTest.class, - WccTest.class, - LpaTest.class, - KcoreTest.class, - TriangleCountTest.class, - RingsDetectionTest.class, - RingsDetectionWithFilterTest.class, - ClusteringCoefficientTest.class, - ClosenessCentralityTest.class, - BetweennessCentralityTest.class, - RandomWalkTest.class, - SingleSourceShortestPathTest.class -}) -public class AlgorithmTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityTest.java deleted file mode 100644 index 6ad54e951..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/betweenness/BetweennessCentralityTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.betweenness; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; - -public class BetweennessCentralityTest extends AlgorithmTestBase { - - private static final Map EXPECT_RESULTS = - ImmutableMap.builder() - .put("0", 0D) - .put("1", 4.666666666666D) - .put("2", 8.0D) - .put("3", 0.666666666666D) - .put("4", 8.666666666666D) - .put("5", 10.0D) - .put("6", 0.0D) - .put("7", 0.0D) - .build(); - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - schema.vertexLabel("user") - .useCustomizeStringId() - .ifNotExist() - .create(); - - schema.edgeLabel("link") - .sourceLabel("user") - .targetLabel("user") - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex v0 = graph.addVertex(T.LABEL, "user", T.ID, "0"); - Vertex v1 = graph.addVertex(T.LABEL, "user", T.ID, "1"); - Vertex v2 = graph.addVertex(T.LABEL, "user", T.ID, "2"); - Vertex v3 = graph.addVertex(T.LABEL, "user", T.ID, "3"); - Vertex v4 = graph.addVertex(T.LABEL, "user", T.ID, "4"); - Vertex v5 = graph.addVertex(T.LABEL, "user", T.ID, "5"); - Vertex v6 = graph.addVertex(T.LABEL, "user", T.ID, "6"); - Vertex v7 = graph.addVertex(T.LABEL, "user", T.ID, "7"); - - v0.addEdge("link", v1); - v0.addEdge("link", v2); - - v1.addEdge("link", v0); - v1.addEdge("link", v2); - v1.addEdge("link", v5); - - v2.addEdge("link", v0); - v2.addEdge("link", v1); - v2.addEdge("link", v3); - v2.addEdge("link", v4); - - v3.addEdge("link", v2); - v3.addEdge("link", v4); - v3.addEdge("link", v5); - - v4.addEdge("link", v2); - v4.addEdge("link", v3); - v4.addEdge("link", v5); - v4.addEdge("link", v6); - v4.addEdge("link", v7); - - v5.addEdge("link", v1); - v5.addEdge("link", v3); - v5.addEdge("link", v4); - v5.addEdge("link", v6); - v5.addEdge("link", v7); - - v6.addEdge("link", v4); - v6.addEdge("link", v5); - v6.addEdge("link", v7); - - v7.addEdge("link", v4); - v7.addEdge("link", v5); - v7.addEdge("link", v6); - - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(BetweennessCentralityParams.class.getName(), - BetweennessCentrality.OPTION_SAMPLE_RATE, "1.0D", - ComputerOptions.BSP_MAX_SUPER_STEP.name(), "5", - ComputerOptions.OUTPUT_CLASS.name(), - BetweennessCentralityTestOutput.class.getName()); - - } - - public static class BetweennessCentralityTestOutput extends HugeGraphDoubleOutput { - - @Override - protected Double value(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - Double result = super.value(vertex); - Double expect = EXPECT_RESULTS.get(vertex.id().string()); - Assert.assertNotNull(expect); - assertEquals(expect, result); - return result; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityTest.java deleted file mode 100644 index d66b01a83..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/closeness/ClosenessCentralityTest.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.closeness; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; - -public class ClosenessCentralityTest extends AlgorithmTestBase { - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - - schema.propertyKey("rate").asInt().ifNotExist().create(); - - schema.vertexLabel("user") - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel("link") - .sourceLabel("user") - .targetLabel("user") - .properties("rate") - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex vA = graph.addVertex(T.LABEL, "user", T.ID, "A"); - Vertex vB = graph.addVertex(T.LABEL, "user", T.ID, "B"); - Vertex vC = graph.addVertex(T.LABEL, "user", T.ID, "C"); - Vertex vD = graph.addVertex(T.LABEL, "user", T.ID, "D"); - Vertex vE = graph.addVertex(T.LABEL, "user", T.ID, "E"); - Vertex vF = graph.addVertex(T.LABEL, "user", T.ID, "F"); - - vA.addEdge("link", vB, "rate", 1); - vB.addEdge("link", vA, "rate", 1); - - vB.addEdge("link", vC, "rate", 2); - vC.addEdge("link", vB, "rate", 2); - - vB.addEdge("link", vD, "rate", 2); - vD.addEdge("link", vB, "rate", 2); - - vC.addEdge("link", vD, "rate", 1); - vD.addEdge("link", vC, "rate", 1); - - vC.addEdge("link", vE, "rate", 3); - vE.addEdge("link", vC, "rate", 3); - - vD.addEdge("link", vE, "rate", 1); - vE.addEdge("link", vD, "rate", 1); - - vD.addEdge("link", vF, "rate", 4); - vF.addEdge("link", vD, "rate", 4); - - vE.addEdge("link", vF, "rate", 2); - vF.addEdge("link", vE, "rate", 2); - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testWithWeightProperty() throws InterruptedException { - runAlgorithm(ClosenessCentralityParams.class.getName(), - ClosenessCentrality.OPTION_WEIGHT_PROPERTY, "rate", - ClosenessCentrality.OPTION_SAMPLE_RATE, "1.0D", - ComputerOptions.BSP_MAX_SUPER_STEP.name(), "5", - ComputerOptions.OUTPUT_CLASS.name(), - ClosenessWithWeightPropertyTestOutput.class.getName()); - } - - public static class ClosenessWithWeightPropertyTestOutput - extends HugeGraphDoubleOutput { - - private final Map expectResults = - ImmutableMap.builder() - .put("A", 2.083333333333333) - .put("B", 2.5333333333333337) - .put("C", 2.583333333333333) - .put("D", 3.1666666666666665) - .put("E", 2.583333333333333) - .put("F", 1.45) - .build(); - - @Override - protected Double value( - org.apache.hugegraph.computer.core.graph.vertex.Vertex - vertex) { - Double result = super.value(vertex); - Double expect = expectResults.get(vertex.id().string()); - Assert.assertNotNull(expect); - assertEquals(expect, result); - return result; - } - } - - @Test - public void testWithoutWeightProperty() throws InterruptedException { - runAlgorithm(ClosenessCentralityParams.class.getName(), - ClosenessCentrality.OPTION_SAMPLE_RATE, "1.0D", - ComputerOptions.BSP_MAX_SUPER_STEP.name(), "5", - ComputerOptions.OUTPUT_CLASS.name(), - ClosenessWithoutWeightPropertyTestOutput.class.getName()); - } - - public static class ClosenessWithoutWeightPropertyTestOutput - extends HugeGraphDoubleOutput { - - private final Map expectResults = - ImmutableMap.builder() - .put("A", 2.6666666666666665) - .put("B", 4.0) - .put("C", 4.0) - .put("D", 4.5) - .put("E", 3.833333333333333) - .put("F", 3.333333333333333) - .build(); - - @Override - protected Double value(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - Double result = super.value(vertex); - Double expect = expectResults.get(vertex.id().string()); - Assert.assertNotNull(expect); - assertEquals(expect, result); - return result; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityTest.java deleted file mode 100644 index b24640d83..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.degree; - -import java.util.Iterator; - -import org.apache.commons.lang.StringUtils; -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.output.hdfs.HdfsOutput; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphDoubleOutput; -import org.junit.Assert; -import org.junit.Test; - -import com.google.common.collect.Streams; - -public class DegreeCentralityTest extends AlgorithmTestBase { - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(DegreeCentralityParams.class.getName(), - DegreeCentrality.OPTION_WEIGHT_PROPERTY, - "rate", - ComputerOptions.OUTPUT_CLASS.name(), - DegreeCentralityTestOutput.class.getName()); - DegreeCentralityTestOutput.assertResult(); - } - - @Test - public void testRunAlgorithmFromHdfs() throws InterruptedException { - runAlgorithm(DegreeCentralityParams.class.getName(), - ComputerOptions.OUTPUT_CLASS.name(), - HdfsOutput.class.getName(), - ComputerOptions.INPUT_SOURCE_TYPE.name(), - "hugegraph-loader"); - } - - public static class DegreeCentralityTestOutput - extends HugeGraphDoubleOutput { - - private String weight; - private static boolean isRun; - - public DegreeCentralityTestOutput() { - } - - @Override - public void init(Config config, int partition) { - super.init(config, partition); - this.weight = config.getString( - DegreeCentrality.OPTION_WEIGHT_PROPERTY, ""); - isRun = false; - } - - @Override - public Double value(Vertex vertex) { - Double value = super.value(vertex); - isRun = true; - if (StringUtils.isEmpty(this.weight)) { - Assert.assertEquals(vertex.numEdges(), value, 0.000001); - } else { - Iterator edges = vertex.edges().iterator(); - double totalValue = Streams.stream(edges).map( - (edge) -> { - DoubleValue weightValue = edge.property(this.weight); - if (weightValue == null) { - return 1.0; - } else { - return weightValue.value(); - } - }).reduce(Double::sum).orElse(0.0); - Assert.assertEquals(totalValue, value, 0.000001); - } - return value; - } - - public static void assertResult() { - Assert.assertTrue(isRun); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankTest.java deleted file mode 100644 index ddea58068..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/centrality/pagerank/PageRankTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.centrality.pagerank; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.junit.Test; - -public class PageRankTest extends AlgorithmTestBase { - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(PageRankParams.class.getName()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientTest.java deleted file mode 100644 index 63d88e4ac..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficientTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.cc; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; - -public class ClusteringCoefficientTest extends AlgorithmTestBase { - - private static final String VERTX_LABEL = "tc_user"; - private static final String EDGE_LABEL = "tc_know"; - private static final String PROPERTY_KEY = "tc_weight"; - - protected static final Map EXPECTED_RESULTS = - ImmutableMap.of("tc_A", 0.6666667F, "tc_B", 1.0F, - "tc_C", 0.5F, "tc_D", 0.6666667F, - "tc_E", 1.0F); - - @BeforeClass - public static void setup() { - clearAll(); - - SchemaManager schema = client().schema(); - schema.propertyKey(PROPERTY_KEY) - .asInt() - .ifNotExist() - .create(); - schema.vertexLabel(VERTX_LABEL) - .properties(PROPERTY_KEY) - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel(EDGE_LABEL) - .sourceLabel(VERTX_LABEL) - .targetLabel(VERTX_LABEL) - .properties(PROPERTY_KEY) - .ifNotExist() - .create(); - - GraphManager graph = client().graph(); - Vertex vA = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_A", - PROPERTY_KEY, 1); - Vertex vB = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_B", - PROPERTY_KEY, 1); - Vertex vC = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_C", - PROPERTY_KEY, 1); - Vertex vD = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_D", - PROPERTY_KEY, 1); - Vertex vE = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_E", - PROPERTY_KEY, 1); - - vA.addEdge(EDGE_LABEL, vB, PROPERTY_KEY, 1); - vA.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - vB.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - vC.addEdge(EDGE_LABEL, vD, PROPERTY_KEY, 1); - vD.addEdge(EDGE_LABEL, vA, PROPERTY_KEY, 1); - vD.addEdge(EDGE_LABEL, vE, PROPERTY_KEY, 1); - vE.addEdge(EDGE_LABEL, vD, PROPERTY_KEY, 1); - vE.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - } - - @AfterClass - public static void teardown() { - clearAll(); - } - - @Test - public void testClusteringCoefficientValue() { - ClusteringCoefficientValue value = new ClusteringCoefficientValue(); - value.count(10); - Assert.assertThrows(UnsupportedOperationException.class, - () -> value.assign(null)); - Assert.assertThrows(UnsupportedOperationException.class, - () -> value.compareTo(new ClusteringCoefficientValue())); - - ClusteringCoefficientValue copy = value.copy(); - Assert.assertEquals(10, copy.count()); - Assert.assertNotSame(value.idSet(), copy.idSet()); - - Assert.assertContains("10", value.toString()); - } - - @Test - public void testClusteringCoefficient() throws InterruptedException { - runAlgorithm(ClusteringCoefficientParams.class.getName(), - ComputerOptions.OUTPUT_CLASS.name(), - ClusteringCoefficientOutputTest.class.getName()); - } - - public static class ClusteringCoefficientOutputTest extends ClusteringCoefficientOutput { - - @Override - public Vertex constructHugeVertex( - org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - Vertex result = super.constructHugeVertex(vertex); - Float expected = (Float) EXPECTED_RESULTS.get(result.id()); - - if (expected != null) { - Assert.assertEquals(expected, result.property(super.name())); - } - return result; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreTest.java deleted file mode 100644 index 919a54605..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/kcore/KcoreTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.kcore; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.junit.Test; - -public class KcoreTest extends AlgorithmTestBase { - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(KcoreParams.class.getName()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountTest.java deleted file mode 100644 index cece925c9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.trianglecount; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.output.hg.HugeGraphIntOutput; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; - -public class TriangleCountTest extends AlgorithmTestBase { - - private static final String VERTX_LABEL = "tc_user"; - private static final String EDGE_LABEL = "tc_know"; - private static final String PROPERTY_KEY = "tc_weight"; - - protected static final Map EXPECTED_RESULTS = ImmutableMap.of("tc_A", 2, - "tc_B", 1, - "tc_C", 3, - "tc_D", 2, - "tc_E", 1); - - @BeforeClass - public static void setup() { - clearAll(); - - SchemaManager schema = client().schema(); - schema.propertyKey(PROPERTY_KEY) - .asInt() - .ifNotExist() - .create(); - schema.vertexLabel(VERTX_LABEL) - .properties(PROPERTY_KEY) - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel(EDGE_LABEL) - .sourceLabel(VERTX_LABEL) - .targetLabel(VERTX_LABEL) - .properties(PROPERTY_KEY) - .ifNotExist() - .create(); - - GraphManager graph = client().graph(); - Vertex vA = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_A", - PROPERTY_KEY, 1); - Vertex vB = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_B", - PROPERTY_KEY, 1); - Vertex vC = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_C", - PROPERTY_KEY, 1); - Vertex vD = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_D", - PROPERTY_KEY, 1); - Vertex vE = graph.addVertex(T.LABEL, VERTX_LABEL, T.ID, "tc_E", - PROPERTY_KEY, 1); - - vA.addEdge(EDGE_LABEL, vB, PROPERTY_KEY, 1); - vA.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - vB.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - vC.addEdge(EDGE_LABEL, vD, PROPERTY_KEY, 1); - vD.addEdge(EDGE_LABEL, vA, PROPERTY_KEY, 1); - vD.addEdge(EDGE_LABEL, vE, PROPERTY_KEY, 1); - vE.addEdge(EDGE_LABEL, vD, PROPERTY_KEY, 1); - vE.addEdge(EDGE_LABEL, vC, PROPERTY_KEY, 1); - } - - @AfterClass - public static void teardown() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(TriangleCountParams.class.getName(), - ComputerOptions.OUTPUT_CLASS.name(), - TriangleCountIntOutputTest.class.getName()); - } - - @Test - public void testTriangleCountValue() { - TriangleCountValue value = new TriangleCountValue(); - value.count(10); - Assert.assertThrows(UnsupportedOperationException.class, - () -> value.assign(null)); - Assert.assertThrows(UnsupportedOperationException.class, - () -> value.compareTo(new TriangleCountValue())); - - TriangleCountValue copy = value.copy(); - Assert.assertEquals(10, copy.count()); - Assert.assertNotSame(value.idSet(), copy.idSet()); - - Assert.assertContains("10", value.toString()); - } - - public static class TriangleCountIntOutputTest extends HugeGraphIntOutput { - - @Override - public Integer value(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - Integer value = super.value(vertex); - Integer expected = EXPECTED_RESULTS.get(vertex.id().string()); - if (expected != null) { - Assert.assertEquals(expected, value); - } - - return value; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccTest.java deleted file mode 100644 index d1c10dec5..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/WccTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.community.wcc; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.junit.Test; - -public class WccTest extends AlgorithmTestBase { - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(WccParams.class.getName(), - ComputerOptions.JOB_ID.name(), "local_wcc", - ComputerOptions.JOB_WORKERS_COUNT.name(), "1", - ComputerOptions.BSP_REGISTER_TIMEOUT.name(), "100000", - ComputerOptions.BSP_LOG_INTERVAL.name(), "30000", - ComputerOptions.BSP_MAX_SUPER_STEP.name(), "10"); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionTest.java deleted file mode 100644 index 822a4ec35..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionTest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings; - -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; - -public class RingsDetectionTest extends AlgorithmTestBase { - - private static final Map> EXPECT_RINGS = - ImmutableMap.of( - "A", ImmutableSet.of("[A, B, C, A]", - "[A, C, A]", - "[A, B, C, E, D, A]", - "[A, D, A]", - "[A, D, C, A]", - "[A, C, E, D, A]"), - "C", ImmutableSet.of("[C, E, D, C]") - ); - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - - schema.vertexLabel("user") - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel("know") - .sourceLabel("user") - .targetLabel("user") - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex vA = graph.addVertex(T.LABEL, "user", T.ID, "A"); - Vertex vB = graph.addVertex(T.LABEL, "user", T.ID, "B"); - Vertex vC = graph.addVertex(T.LABEL, "user", T.ID, "C"); - Vertex vD = graph.addVertex(T.LABEL, "user", T.ID, "D"); - Vertex vE = graph.addVertex(T.LABEL, "user", T.ID, "E"); - - vA.addEdge("know", vB); - vA.addEdge("know", vC); - vA.addEdge("know", vD); - vB.addEdge("know", vC); - vC.addEdge("know", vA); - vC.addEdge("know", vE); - vD.addEdge("know", vA); - vD.addEdge("know", vC); - vE.addEdge("know", vD); - - RingsDetectionTestOutput.EXPECT_RINGS = EXPECT_RINGS; - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(RingsDetectionTestParams.class.getName()); - } - - public static class RingsDetectionTestParams extends RingsDetectionParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - RingsDetectionTestOutput.class.getName()); - super.setAlgorithmParameters(params); - } - } - - public static class RingsDetectionTestOutput extends RingsDetectionOutput { - - protected static Map> EXPECT_RINGS; - - @Override - public List value( - org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - List rings = super.value(vertex); - this.assertResult(vertex.id(), rings); - return rings; - } - - private void assertResult(Id id, List rings) { - Set expect = EXPECT_RINGS.getOrDefault(id.toString(), - new HashSet<>()); - - rings = rings.stream() - .distinct() - .collect(Collectors.toList()); - - Assert.assertEquals(expect.size(), rings.size()); - for (String ring : rings) { - String error = "Expect: '" + ring + "' in " + expect; - Assert.assertTrue(error, expect.contains(ring)); - } - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionWithFilterTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionWithFilterTest.java deleted file mode 100644 index 56d687c93..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionWithFilterTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.rings; - -import java.util.Map; -import java.util.Set; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.algorithm.path.rings.RingsDetectionTest.RingsDetectionTestOutput; -import org.apache.hugegraph.computer.algorithm.path.rings.filter.RingsDetectionWithFilter; -import org.apache.hugegraph.computer.algorithm.path.rings.filter.RingsDetectionWithFilterParams; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; - -public class RingsDetectionWithFilterTest extends AlgorithmTestBase { - - private static final Map> EXPECT_RINGS = - ImmutableMap.of( - "A", ImmutableSet.of("[A, C, A]", - "[A, D, C, A]", - "[A, B, C, A]"), - "B", ImmutableSet.of("[B, C, B]"), - "C", ImmutableSet.of("[C, D, C]") - ); - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - - schema.propertyKey("weight") - .asInt() - .ifNotExist() - .create(); - schema.vertexLabel("user") - .properties("weight") - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel("know") - .sourceLabel("user") - .targetLabel("user") - .properties("weight") - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex vA = graph.addVertex(T.LABEL, "user", T.ID, "A", "weight", 1); - Vertex vB = graph.addVertex(T.LABEL, "user", T.ID, "B", "weight", 1); - Vertex vC = graph.addVertex(T.LABEL, "user", T.ID, "C", "weight", 1); - Vertex vD = graph.addVertex(T.LABEL, "user", T.ID, "D", "weight", 1); - Vertex vE = graph.addVertex(T.LABEL, "user", T.ID, "E", "weight", 3); - - vA.addEdge("know", vB, "weight", 1); - vA.addEdge("know", vC, "weight", 1); - vA.addEdge("know", vD, "weight", 1); - vB.addEdge("know", vA, "weight", 2); - vB.addEdge("know", vC, "weight", 1); - vB.addEdge("know", vE, "weight", 1); - vC.addEdge("know", vA, "weight", 1); - vC.addEdge("know", vB, "weight", 1); - vC.addEdge("know", vD, "weight", 1); - vD.addEdge("know", vC, "weight", 1); - vD.addEdge("know", vE, "weight", 1); - vE.addEdge("know", vC, "weight", 1); - - RingsDetectionTestOutput.EXPECT_RINGS = EXPECT_RINGS; - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - String filter = "{" + - " \"vertex_filter\": [" + - " {" + - " \"label\": \"user\"," + - " \"property_filter\": \"$element" + - ".weight==1\"" + - " }" + - " ]," + - " \"edge_filter\": [" + - " {" + - " \"label\": \"know\"," + - " \"property_filter\": \"$message" + - ".weight==$element.weight\"" + - " }" + - " ]" + - "}"; - runAlgorithm(RingsDetectionsTestParams.class.getName(), - RingsDetectionWithFilter.OPTION_FILTER, filter); - } - - public static class RingsDetectionsTestParams - extends RingsDetectionWithFilterParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - RingsDetectionTestOutput.class.getName()); - super.setAlgorithmParameters(params); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathTest.java deleted file mode 100644 index 4b2b466a5..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.path.shortest; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.util.JsonUtil; -import org.apache.hugegraph.util.Log; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.slf4j.Logger; - -public class SingleSourceShortestPathTest extends AlgorithmTestBase { - - public static final String VL = "city"; - public static final String EL = "road"; - public static final String PROPERTY_KEY = "distance"; - - public static final String SOURCE_ID = "\"A\""; - public static final String TARGET_ID = "\"E\""; - public static final String SHORTEST_PATH = "[A, C, B, E]"; - public static final double TOTAL_WEIGHT = 28; - - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - - schema.propertyKey(PROPERTY_KEY) - .asDouble() - .ifNotExist() - .create(); - schema.vertexLabel(VL) - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel(EL) - .sourceLabel(VL) - .targetLabel(VL) - .properties(PROPERTY_KEY) - .nullableKeys(PROPERTY_KEY) - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex vA = graph.addVertex(T.LABEL, VL, T.ID, "A"); - Vertex vB = graph.addVertex(T.LABEL, VL, T.ID, "B"); - Vertex vC = graph.addVertex(T.LABEL, VL, T.ID, "C"); - Vertex vD = graph.addVertex(T.LABEL, VL, T.ID, "D"); - Vertex vE = graph.addVertex(T.LABEL, VL, T.ID, "E"); - Vertex vF = graph.addVertex(T.LABEL, VL, T.ID, "F"); - - Vertex vJ = graph.addVertex(T.LABEL, VL, T.ID, "J"); - Vertex vK = graph.addVertex(T.LABEL, VL, T.ID, "K"); - - vA.addEdge(EL, vC, PROPERTY_KEY, 5); - vA.addEdge(EL, vD, PROPERTY_KEY, 30); - - vB.addEdge(EL, vA, PROPERTY_KEY, 2); - vB.addEdge(EL, vE, PROPERTY_KEY, 8); - - vC.addEdge(EL, vB, PROPERTY_KEY, 15); - vC.addEdge(EL, vF, PROPERTY_KEY, 7); - - vE.addEdge(EL, vB, PROPERTY_KEY, 6); - vE.addEdge(EL, vD, PROPERTY_KEY, 4); - - vF.addEdge(EL, vC, PROPERTY_KEY, 8); - vF.addEdge(EL, vD, PROPERTY_KEY, 10); - vF.addEdge(EL, vE, PROPERTY_KEY, 18); - - vJ.addEdge(EL, vK); - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(SingleSourceShortestPathTestParams.class.getName()); - } - - public static class SingleSourceShortestPathTestParams extends SingleSourceShortestPathParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - SingleSourceShortestPathTestOutput.class.getName()); - this.setIfAbsent(params, SingleSourceShortestPath.OPTION_SOURCE_ID, SOURCE_ID); - this.setIfAbsent(params, SingleSourceShortestPath.OPTION_TARGET_ID, TARGET_ID); - this.setIfAbsent(params, SingleSourceShortestPath.OPTION_WEIGHT_PROPERTY, - SingleSourceShortestPathTest.PROPERTY_KEY); - - super.setAlgorithmParameters(params); - } - } - - public static class SingleSourceShortestPathTestOutput extends SingleSourceShortestPathOutput { - - private static final Logger LOG = Log.logger(SingleSourceShortestPathTestOutput.class); - - @Override - public String value(org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - String json = super.value(vertex); - - if (vertex.id().value().toString().equals(TARGET_ID)) { - Map map = JsonUtil.fromJson(json, Map.class); - - LOG.info("source vertex to target vertex: {}, {}, " + - "shortest path: {}, total weight: {}", - SOURCE_ID, TARGET_ID, - map.get("path"), map.get("total_weight")); - Assert.assertEquals(map.get("path"), SHORTEST_PATH); - Assert.assertEquals(map.get("total_weight"), TOTAL_WEIGHT); - } - return json; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkTest.java deleted file mode 100644 index 2d1a00c6e..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalkTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.algorithm.sampling; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.driver.GraphManager; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.driver.SchemaManager; -import org.apache.hugegraph.structure.constant.T; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.slf4j.Logger; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; - -public class RandomWalkTest extends AlgorithmTestBase { - - private static final String PROPERTY_KEY = "frequency"; - - private static final Map> EXPECT_WALK_PATH = - ImmutableMap.of( - "F", ImmutableList.of( - "[F, G]", - "[F, G]", - "[F, G]"), - "G", ImmutableList.of("[G]"), - "I", ImmutableList.of("[I]") - ); - - @BeforeClass - public static void setup() { - clearAll(); - - HugeClient client = client(); - SchemaManager schema = client.schema(); - - schema.propertyKey(PROPERTY_KEY) - .asDouble() - .ifNotExist() - .create(); - schema.vertexLabel("user") - .useCustomizeStringId() - .ifNotExist() - .create(); - schema.edgeLabel("know") - .sourceLabel("user") - .targetLabel("user") - .properties(PROPERTY_KEY) - .nullableKeys(PROPERTY_KEY) - .ifNotExist() - .create(); - - GraphManager graph = client.graph(); - Vertex vA = graph.addVertex(T.LABEL, "user", T.ID, "A"); - Vertex vB = graph.addVertex(T.LABEL, "user", T.ID, "B"); - Vertex vC = graph.addVertex(T.LABEL, "user", T.ID, "C"); - Vertex vD = graph.addVertex(T.LABEL, "user", T.ID, "D"); - Vertex vE = graph.addVertex(T.LABEL, "user", T.ID, "E"); - - Vertex vI = graph.addVertex(T.LABEL, "user", T.ID, "I"); - - Vertex vF = graph.addVertex(T.LABEL, "user", T.ID, "F"); - Vertex vG = graph.addVertex(T.LABEL, "user", T.ID, "G"); - - vA.addEdge("know", vB, PROPERTY_KEY, 9); - vA.addEdge("know", vC); - vA.addEdge("know", vD, PROPERTY_KEY, 3); - vB.addEdge("know", vC, PROPERTY_KEY, 2); - vC.addEdge("know", vA); - vC.addEdge("know", vE, PROPERTY_KEY, 2); - vD.addEdge("know", vA, PROPERTY_KEY, 7); - vD.addEdge("know", vC, PROPERTY_KEY, 1); - vE.addEdge("know", vD, PROPERTY_KEY, 8); - - vF.addEdge("know", vG, PROPERTY_KEY, 5); - } - - @AfterClass - public static void clear() { - clearAll(); - } - - @Test - public void testRunAlgorithm() throws InterruptedException { - runAlgorithm(RandomWalkTestParams.class.getName()); - } - - public static class RandomWalkTestParams extends RandomWalkParams { - - private static Integer WALK_PER_NODE = 3; - private static Integer WALK_LENGTH = 3; - - private static String WEIGHT_PROPERTY = PROPERTY_KEY; - private static Double DEFAULT_WEIGHT = 1.0; - private static Double MIN_WEIGHT_THRESHOLD = 3.0; - private static Double MAX_WEIGHT_THRESHOLD = 7.0; - - private static Double RETURN_FACTOR = 2.0; - private static Double INOUT_FACTOR = 1.0 / 2.0; - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - RandomWalkTest.RandomWalkTestOutput.class.getName()); - this.setIfAbsent(params, RandomWalk.OPTION_WALK_PER_NODE, - WALK_PER_NODE.toString()); - this.setIfAbsent(params, RandomWalk.OPTION_WALK_LENGTH, - WALK_LENGTH.toString()); - - this.setIfAbsent(params, RandomWalk.OPTION_WEIGHT_PROPERTY, - WEIGHT_PROPERTY); - this.setIfAbsent(params, RandomWalk.OPTION_DEFAULT_WEIGHT, - DEFAULT_WEIGHT.toString()); - this.setIfAbsent(params, RandomWalk.OPTION_MIN_WEIGHT_THRESHOLD, - MIN_WEIGHT_THRESHOLD.toString()); - this.setIfAbsent(params, RandomWalk.OPTION_MAX_WEIGHT_THRESHOLD, - MAX_WEIGHT_THRESHOLD.toString()); - - this.setIfAbsent(params, RandomWalk.OPTION_RETURN_FACTOR, - RETURN_FACTOR.toString()); - this.setIfAbsent(params, RandomWalk.OPTION_INOUT_FACTOR, - INOUT_FACTOR.toString()); - - super.setAlgorithmParameters(params); - } - } - - public static class RandomWalkTestOutput extends RandomWalkOutput { - - private static final Logger LOG = Log.logger(RandomWalkTestOutput.class); - - @Override - public List value( - org.apache.hugegraph.computer.core.graph.vertex.Vertex vertex) { - List pathList = super.value(vertex); - LOG.info("vertex: {}, walk path: {}", vertex.id(), pathList); - - this.assertResult(vertex.id(), pathList); - return pathList; - } - - private void assertResult(Id id, List path) { - Set keys = RandomWalkTest.EXPECT_WALK_PATH.keySet(); - if (keys.contains(id.string())) { - List expect = RandomWalkTest.EXPECT_WALK_PATH - .getOrDefault(id.toString(), new ArrayList<>()); - Assert.assertEquals(expect, path); - } else { - Assert.assertEquals(RandomWalkTestParams.WALK_PER_NODE.intValue(), path.size()); - } - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/AllocatorTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/AllocatorTestSuite.java deleted file mode 100644 index 86ee2338c..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/AllocatorTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - RecyclersTest.class, - DefaultAllocatorTest.class -}) -public class AllocatorTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocatorTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocatorTest.java deleted file mode 100644 index 7100119ea..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/DefaultAllocatorTest.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import java.lang.reflect.InvocationTargetException; -import java.util.Random; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DefaultAllocatorTest extends UnitTestBase { - - @Test - public void testVertexRecycle() { - Allocator allocator = context().allocator(); - RecyclerReference reference1 = allocator.newVertex(); - allocator.freeVertex(reference1); - - RecyclerReference reference2 = allocator.newVertex(); - Assert.assertSame(reference1, reference2); - Assert.assertSame(reference1.get(), reference2.get()); - - RecyclerReference reference3 = allocator.newVertex(); - Assert.assertNotSame(reference1, reference3); - Assert.assertNotSame(reference1.get(), reference3.get()); - - allocator.freeVertex(reference2); - allocator.freeVertex(reference3); - } - - @Test - public void testEdgeRecycle() { - Allocator allocator = context().allocator(); - RecyclerReference reference1 = allocator.newEdge(); - allocator.freeEdge(reference1); - - RecyclerReference reference2 = allocator.newEdge(); - Assert.assertSame(reference1, reference2); - Assert.assertSame(reference1.get(), reference2.get()); - - RecyclerReference reference3 = allocator.newEdge(); - Assert.assertNotSame(reference1, reference3); - Assert.assertNotSame(reference1.get(), reference3.get()); - - allocator.freeEdge(reference2); - allocator.freeEdge(reference3); - } - - @Test - public void testMultiRecycle() { - Allocator allocator = context().allocator(); - RecyclerReference reference1 = allocator.newVertex(); - allocator.freeVertex(reference1); - - Assert.assertThrows(IllegalStateException.class, () -> { - allocator.freeVertex(reference1); - }, e -> { - Assert.assertTrue(e.getMessage().contains("recycled already")); - }); - } - - @Test - public void testMultiRecycleAtDifferentThread() - throws InterruptedException { - Allocator allocator = context().allocator(); - RecyclerReference reference1 = allocator.newVertex(); - Thread thread1 = new Thread(() -> allocator.freeVertex(reference1)); - thread1.start(); - thread1.join(); - - RecyclerReference reference2 = allocator.newVertex(); - Assert.assertSame(reference1, reference2); - Assert.assertSame(reference1.get(), reference2.get()); - allocator.freeVertex(reference2); - } - - @Test - public void testRecycleMoreThanOnceAtDifferentThread() - throws InterruptedException { - Allocator allocator = context().allocator(); - RecyclerReference reference1 = allocator.newVertex(); - - Thread thread1 = new Thread(() -> allocator.freeVertex(reference1)); - thread1.start(); - thread1.join(); - - Thread thread2 = new Thread(() -> { - Assert.assertThrows(IllegalStateException.class, () -> { - allocator.freeVertex(reference1); - }, e -> { - Assert.assertTrue(e.getMessage().contains("recycled already")); - }); - }); - thread2.start(); - thread2.join(); - } - - @Test - public void testAutoRecycle() { - Allocator allocator = context().allocator(); - RecyclerReference reference; - try (RecyclerReference reference1 = allocator.newVertex(); - RecyclerReference reference2 = allocator.newVertex()) { - reference = reference1; - Assert.assertNotSame(reference1, reference2); - Assert.assertNotSame(reference1.get(), reference2.get()); - } - Assert.assertThrows(IllegalStateException.class, () -> { - allocator.freeVertex(reference); - }, e -> { - Assert.assertTrue(e.getMessage().contains("recycled already")); - }); - } - - @Test - public void testMaxCapacity() throws InvocationTargetException, - IllegalAccessException { - testMaxCapacity(300); - Random rand = new Random(); - for (int i = 0; i < 50; i++) { - testMaxCapacity(rand.nextInt(1000) + 256); // 256 - 1256 - } - } - - private static void testMaxCapacity(final int maxCapacity) - throws InvocationTargetException, IllegalAccessException { - String capacityValue = String.valueOf(maxCapacity); - UnitTestBase.updateOptions( - ComputerOptions.ALLOCATOR_MAX_VERTICES_PER_THREAD, capacityValue - ); - Allocator allocator = context().allocator(); - @SuppressWarnings("unchecked") - RecyclerReference[] references = - new RecyclerReference[maxCapacity * 3]; - for (int i = 0; i < references.length; i++) { - references[i] = allocator.newVertex(); - } - - for (int i = 0; i < references.length; i++) { - allocator.freeVertex(references[i]); - references[i] = null; - } - - // TODO: Assert something - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclersTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclersTest.java deleted file mode 100644 index 313a594ac..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/RecyclersTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.allocator; - -import static org.junit.Assert.assertNotSame; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Random; - -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import io.netty.util.Recycler; - -public class RecyclersTest { - - private final Method threadLocalCapacityMethod; - private final Method threadLocalSizeMethod; - - public RecyclersTest() { - try { - Method method = Recycler.class - .getDeclaredMethod("threadLocalCapacity"); - method.setAccessible(true); - this.threadLocalCapacityMethod = method; - } catch (NoSuchMethodException e) { - throw new RuntimeException("No method 'threadLocalCapacity'"); - } - - try { - Method method = Recycler.class - .getDeclaredMethod("threadLocalSize"); - method.setAccessible(true); - this.threadLocalSizeMethod = method; - } catch (NoSuchMethodException e) { - throw new RuntimeException("No method 'threadLocalSize'"); - } - } - - private static Recycler newRecycler(final int max) { - return new Recycler(max) { - @Override - protected RecyclableObject newObject( - Recycler.Handle handle) { - return new RecyclableObject(handle); - } - }; - } - - @Test - public void testRecycle() { - Recycler recycler = newRecycler(16); - RecyclableObject object1 = recycler.get(); - object1.handle.recycle(object1); - - RecyclableObject object2 = recycler.get(); - Assert.assertSame(object1, object2); - object2.handle.recycle(object2); - } - - @Test - public void testMultiRecycle() { - Recycler recycler = newRecycler(16); - RecyclableObject object = recycler.get(); - object.handle.recycle(object); - Assert.assertThrows(IllegalStateException.class, () -> { - object.handle.recycle(object); - }, e -> { - Assert.assertTrue(e.getMessage().contains("recycled already")); - }); - } - - @Test - public void testMultiRecycleAtDifferentThread() - throws InterruptedException { - Recycler recycler = newRecycler(512); - RecyclableObject object = recycler.get(); - Thread thread1 = new Thread(() -> object.handle.recycle(object)); - thread1.start(); - thread1.join(); - Assert.assertSame(object, recycler.get()); - } - - @Test - public void testRecycleMoreThanOnceAtDifferentThread() - throws InterruptedException { - Recycler recyclers = newRecycler(1024); - RecyclableObject object = recyclers.get(); - - Thread thread1 = new Thread(() -> object.handle.recycle(object)); - thread1.start(); - thread1.join(); - - Thread thread2 = new Thread(() -> { - Assert.assertThrows(IllegalStateException.class, () -> { - object.handle.recycle(object); - }, e -> { - Assert.assertTrue(e.getMessage().contains("recycled already")); - }); - }); - thread2.start(); - thread2.join(); - } - - @Test - public void testRecycleDisable() { - Recycler recycler = newRecycler(-1); - RecyclableObject object1 = recycler.get(); - object1.handle.recycle(object1); - - RecyclableObject object2 = recycler.get(); - assertNotSame(object1, object2); - object2.handle.recycle(object2); - } - - @Test - public void testMaxCapacity() throws InvocationTargetException, - IllegalAccessException { - testMaxCapacity(300); - Random rand = new Random(); - for (int i = 0; i < 50; i++) { - testMaxCapacity(rand.nextInt(1000) + 256); // 256 - 1256 - } - } - - private void testMaxCapacity(final int maxCapacity) - throws InvocationTargetException, IllegalAccessException { - Recycler recycler = newRecycler(maxCapacity); - RecyclableObject[] objects = new RecyclableObject[maxCapacity * 3]; - for (int i = 0; i < objects.length; i++) { - objects[i] = recycler.get(); - } - - int threadLocalCapacity = (Integer) threadLocalCapacityMethod.invoke( - recycler); - Assert.assertTrue(maxCapacity >= threadLocalCapacity); - int threadLocalSize = (Integer) threadLocalSizeMethod.invoke(recycler); - Assert.assertEquals(0, threadLocalSize); - - for (int i = 0; i < objects.length; i++) { - objects[i].handle.recycle(objects[i]); - objects[i] = null; - } - - threadLocalCapacity = (Integer) threadLocalCapacityMethod.invoke( - recycler); - Assert.assertTrue(maxCapacity >= threadLocalCapacity); - threadLocalSize = (Integer) threadLocalSizeMethod.invoke(recycler); - Assert.assertTrue(maxCapacity >= threadLocalSize); - Assert.assertTrue(threadLocalSize > 0); - } - - private static final class RecyclableObject { - - private final Recycler.Handle handle; - - private RecyclableObject(Recycler.Handle handle) { - this.handle = handle; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEventTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEventTest.java deleted file mode 100644 index 1997b201a..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspEventTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class BspEventTest { - - @Test - public void testUniqueCodeAndKey() { - Map codeMap = new HashMap<>(); - Map keyMap = new HashMap<>(); - BspEvent[] events = BspEvent.values(); - for (BspEvent e : events) { - codeMap.put(e.code(), e.key()); - keyMap.put(e.key(), e.code()); - } - // Assert code in unique - Assert.assertEquals(events.length, codeMap.size()); - // Assert key in unique - Assert.assertEquals(events.length, keyMap.size()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspTestSuite.java deleted file mode 100644 index d1df1bc30..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/BspTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - EtcdBspTest.class, - EtcdClientTest.class -}) -public class BspTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspTest.java deleted file mode 100644 index 9e9187f82..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdBspTest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.apache.hugegraph.computer.core.common.ContainerInfo; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.SuperstepStat; -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class EtcdBspTest extends UnitTestBase { - - private Bsp4Master bsp4Master; - private Bsp4Worker bsp4Worker; - private ContainerInfo masterInfo; - private ContainerInfo workerInfo; - private ExecutorService executorService = Executors.newFixedThreadPool(2); - private int maxSuperStep; - - @Before - public void setup() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.BSP_LOG_INTERVAL, "30000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2" - ); - - this.bsp4Master = new Bsp4Master(config); - this.bsp4Master.clean(); - this.masterInfo = new ContainerInfo(-1, "localhost", 8001, 8002); - this.workerInfo = new ContainerInfo(0, "localhost", 8003, 8004); - this.bsp4Worker = new Bsp4Worker(config, this.workerInfo); - this.maxSuperStep = config.get(ComputerOptions.BSP_MAX_SUPER_STEP); - } - - @After - public void teardown() { - this.bsp4Worker.clean(); - this.bsp4Worker.close(); - this.bsp4Master.clean(); - this.bsp4Master.close(); - } - - @Test - public void testInit() throws InterruptedException { - // If both two threads reach countDown, it means no exception is thrown. - CountDownLatch countDownLatch = new CountDownLatch(2); - this.executorService.submit(() -> { - this.bsp4Master.masterInitDone(this.masterInfo); - List workers = this.bsp4Master.waitWorkersInitDone(); - Assert.assertEquals(1, workers.size()); - countDownLatch.countDown(); - }); - this.executorService.submit(() -> { - this.bsp4Worker.workerInitDone(); - ContainerInfo master = this.bsp4Worker.waitMasterInitDone(); - Assert.assertEquals(this.masterInfo, master); - List workers = this.bsp4Worker - .waitMasterAllInitDone(); - Assert.assertEquals(1, workers.size()); - Assert.assertEquals(this.workerInfo, workers.get(0)); - countDownLatch.countDown(); - }); - countDownLatch.await(); - } - - @Test - public void testInput() throws InterruptedException { - // If both two threads reach countDown, it means no exception is thrown. - WorkerStat workerStat = new WorkerStat(); - workerStat.add(new PartitionStat(0, 100L, 200L, 0L)); - workerStat.add(new PartitionStat(1, 200L, 300L, 0L)); - CountDownLatch countDownLatch = new CountDownLatch(2); - this.executorService.submit(() -> { - this.bsp4Master.masterResumeDone(-1); - this.bsp4Master.waitWorkersInputDone(); - this.bsp4Master.masterInputDone(); - List workerStats = this.bsp4Master - .waitWorkersStepDone(-1); - Assert.assertEquals(1, workerStats.size()); - Assert.assertEquals(workerStat, workerStats.get(0)); - countDownLatch.countDown(); - }); - this.executorService.submit(() -> { - int firstSuperStep = this.bsp4Worker.waitMasterResumeDone(); - Assert.assertEquals(-1, firstSuperStep); - this.bsp4Worker.workerInputDone(); - this.bsp4Worker.waitMasterInputDone(); - this.bsp4Worker.workerStepDone(-1, workerStat); - countDownLatch.countDown(); - }); - countDownLatch.await(); - } - - @Test - public void testIterate() throws InterruptedException { - // If both two threads reach countDown, it means no exception is thrown. - WorkerStat workerStat = new WorkerStat(); - workerStat.add(new PartitionStat(0, 100L, 200L, 0L)); - workerStat.add(new PartitionStat(1, 200L, 300L, 0L)); - CountDownLatch countDownLatch = new CountDownLatch(2); - this.executorService.submit(() -> { - for (int i = 0; i < this.maxSuperStep; i++) { - this.bsp4Master.waitWorkersStepPrepareDone(i); - this.bsp4Master.masterStepPrepareDone(i); - this.bsp4Master.waitWorkersStepComputeDone(i); - this.bsp4Master.masterStepComputeDone(i); - List list = this.bsp4Master.waitWorkersStepDone(i); - SuperstepStat superstepStat = new SuperstepStat(); - for (WorkerStat workerStat1 : list) { - superstepStat.increase(workerStat1); - } - if (i == this.maxSuperStep - 1) { - superstepStat.inactivate(); - } - this.bsp4Master.masterStepDone(i, superstepStat); - } - countDownLatch.countDown(); - }); - this.executorService.submit(() -> { - int superstep = -1; - SuperstepStat superstepStat = null; - while (superstepStat == null || superstepStat.active()) { - superstep++; - this.bsp4Worker.workerStepPrepareDone(superstep); - this.bsp4Worker.waitMasterStepPrepareDone(superstep); - this.bsp4Worker.workerStepComputeDone(superstep); - this.bsp4Worker.waitMasterStepComputeDone(superstep); - PartitionStat stat1 = new PartitionStat(0, 100L, 200L, 50L); - PartitionStat stat2 = new PartitionStat(1, 200L, 300L, 80L); - WorkerStat workerStatInSuperstep = new WorkerStat(); - workerStatInSuperstep.add(stat1); - workerStatInSuperstep.add(stat2); - // Sleep some time to simulate the worker do computation. - UnitTestBase.sleep(100L); - this.bsp4Worker.workerStepDone(superstep, - workerStatInSuperstep); - superstepStat = this.bsp4Worker.waitMasterStepDone(superstep); - } - countDownLatch.countDown(); - }); - countDownLatch.await(); - } - - @Test - public void testOutput() throws InterruptedException { - CountDownLatch countDownLatch = new CountDownLatch(2); - this.executorService.submit(() -> { - this.bsp4Master.waitWorkersOutputDone(); - this.bsp4Master.clean(); - countDownLatch.countDown(); - - }); - this.executorService.submit(() -> { - this.bsp4Worker.workerOutputDone(); - countDownLatch.countDown(); - }); - countDownLatch.await(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClientTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClientTest.java deleted file mode 100644 index 6b4c08498..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/bsp/EtcdClientTest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.bsp; - -import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import io.etcd.jetcd.ByteSequence; -import io.etcd.jetcd.KV; -import io.etcd.jetcd.kv.GetResponse; -import io.etcd.jetcd.kv.PutResponse; -import io.etcd.jetcd.options.GetOption; - -public class EtcdClientTest { - - private static String ENDPOINTS = "http://localhost:2579"; - private static String NAMESPACE = "test_job_0001"; - private static String KEY_PREFIX = "/key"; - private static String KEY1 = "/key1"; - private static String KEY2 = "/key2"; - private static String NO_SUCH_KEY = "/no-such-key"; - private static byte[] VALUE1 = "value1".getBytes(StandardCharsets.UTF_8); - private static byte[] VALUE2 = "value2".getBytes(StandardCharsets.UTF_8); - - private EtcdClient client; - - @Before - public void setup() { - this.client = new EtcdClient(ENDPOINTS, NAMESPACE); - } - - @After - public void tearDown() { - this.client.deleteAllKvsInNamespace(); - this.client.close(); - } - - @Test - public void testPut() { - this.client.put(KEY1, VALUE1); - byte[] bytes = this.client.get(KEY1); - Assert.assertArrayEquals(VALUE1, bytes); - this.client.delete(KEY1); - } - - @Test - public void testGet() { - this.client.put(KEY1, VALUE1); - byte[] bytes1 = this.client.get(KEY1); - Assert.assertArrayEquals(VALUE1, bytes1); - byte[] bytes2 = this.client.get(NO_SUCH_KEY); - Assert.assertNull(bytes2); - this.client.delete(KEY1); - } - - @Test - public void testGetByNotExistKey() { - this.client.put(KEY1, VALUE1); - byte[] bytes1 = this.client.get(KEY1); - Assert.assertArrayEquals(VALUE1, bytes1); - byte[] bytes2 = this.client.get(NO_SUCH_KEY); - Assert.assertNull(bytes2); - Assert.assertThrows(ComputerException.class, () -> { - this.client.get(NO_SUCH_KEY, true); - }); - this.client.delete(KEY1); - } - - @Test - public void testGetWithTimeout() throws InterruptedException { - ExecutorService executorService = Executors.newFixedThreadPool(1); - Runnable putThread = () -> { - UnitTestBase.sleep(100L); - this.client.put(KEY2, VALUE2); - this.client.put(KEY1, VALUE1); - }; - executorService.submit(putThread); - byte[] bytes1 = this.client.get(KEY1, 1000L, 500L); - executorService.shutdown(); - executorService.awaitTermination(1L, TimeUnit.SECONDS); - Assert.assertArrayEquals(VALUE1, bytes1); - Assert.assertThrows(ComputerException.class, () -> { - this.client.get(NO_SUCH_KEY, 1000L, 500L); - }); - this.client.delete(KEY1); - this.client.delete(KEY2); - } - - @Test - public void testGetTimeoutThrowException() throws InterruptedException { - ExecutorService executorService = Executors.newFixedThreadPool(1); - Runnable putThread = () -> { - UnitTestBase.sleep(1000L); - this.client.put(KEY1, VALUE1); - }; - executorService.submit(putThread); - Assert.assertThrows(ComputerException.class, () -> { - this.client.get(KEY1, 50L, 50L); - }); - executorService.shutdown(); - executorService.awaitTermination(1L, TimeUnit.SECONDS); - long deleteCount = this.client.delete(KEY1); - Assert.assertEquals(1L, deleteCount); - } - - @Test - public void testGetWithTimeoutAndDisturbKey() throws InterruptedException { - ExecutorService executorService = Executors.newFixedThreadPool(1); - Runnable putThread = () -> { - UnitTestBase.sleep(100L); - // Should ignore event prefix with KEY1 - this.client.put(KEY1 + "abc", VALUE2); - this.client.put(KEY1, VALUE1); - }; - executorService.submit(putThread); - byte[] bytes1 = this.client.get(KEY1, 1000L, 500L); - executorService.shutdown(); - executorService.awaitTermination(1L, TimeUnit.SECONDS); - Assert.assertArrayEquals(VALUE1, bytes1); - } - - @Test - public void testGetWithPrefix() { - this.client.put(KEY1, VALUE1); - this.client.put(KEY2, VALUE2); - List valueList1 = this.client.getWithPrefix(KEY_PREFIX); - Assert.assertEquals(2, valueList1.size()); - List valueList2 = this.client.getWithPrefix(NO_SUCH_KEY); - Assert.assertEquals(0, valueList2.size()); - this.client.delete(KEY1); - this.client.delete(KEY2); - } - - @Test - public void testGetWithPrefixAndCount() { - this.client.put(KEY2, VALUE2); - this.client.put(KEY1, VALUE1); - List valueList1 = this.client.getWithPrefix(KEY_PREFIX, 2); - Assert.assertEquals(2, valueList1.size()); - Assert.assertArrayEquals(VALUE1, valueList1.get(0)); - Assert.assertArrayEquals(VALUE2, valueList1.get(1)); - - Assert.assertThrows(ComputerException.class, () -> { - this.client.getWithPrefix(NO_SUCH_KEY, 1); - }); - - this.client.delete(KEY1); - this.client.delete(KEY2); - } - - @Test - public void testGetWithPrefixAndTimeout() throws InterruptedException { - ExecutorService executorService = Executors.newFixedThreadPool(1); - Runnable putThread = () -> { - UnitTestBase.sleep(100L); - this.client.put(KEY1, VALUE1); - this.client.put(KEY1, VALUE1); - this.client.put(KEY2, VALUE2); - }; - executorService.submit(putThread); - List valueList1 = this.client.getWithPrefix(KEY_PREFIX, 2, - 1000L, 200L); - executorService.shutdown(); - executorService.awaitTermination(1L, TimeUnit.SECONDS); - Assert.assertEquals(2, valueList1.size()); - Assert.assertArrayEquals(VALUE1, valueList1.get(0)); - Assert.assertArrayEquals(VALUE2, valueList1.get(1)); - - Assert.assertThrows(ComputerException.class, () -> { - this.client.getWithPrefix(KEY_PREFIX, 3, 1000L, 200L); - }); - Assert.assertThrows(ComputerException.class, () -> { - this.client.getWithPrefix(NO_SUCH_KEY, 1, 1000L, 200L); - }); - this.client.delete(KEY1); - this.client.delete(KEY2); - } - - @Test - public void testGetWithRevision() - throws ExecutionException, InterruptedException { - KV kv = this.client.getKv(); - ByteSequence key1Seq = ByteSequence.from(KEY1, StandardCharsets.UTF_8); - ByteSequence value1Seq = ByteSequence.from(VALUE1); - ByteSequence value2Seq = ByteSequence.from(VALUE2); - PutResponse putResponse1 = kv.put(key1Seq, value1Seq).get(); - long revision1 = putResponse1.getHeader().getRevision(); - PutResponse putResponse2 = kv.put(key1Seq, value2Seq).get(); - long revision2 = putResponse2.getHeader().getRevision(); - long deleteCount1 = kv.delete(ByteSequence.from(KEY1, - StandardCharsets.UTF_8)) - .get().getDeleted(); - Assert.assertEquals(1, deleteCount1); - GetOption getOption1 = GetOption.newBuilder().withRevision(revision1) - .build(); - GetResponse getResponse1 = kv.get(key1Seq, getOption1).get(); - Assert.assertEquals(value1Seq, - getResponse1.getKvs().get(0).getValue()); - GetOption getOption2 = GetOption.newBuilder().withRevision(revision2) - .build(); - GetResponse getResponse2 = kv.get(key1Seq, getOption2).get(); - Assert.assertEquals(value2Seq, - getResponse2.getKvs().get(0).getValue()); - } - - @Test - public void testDelete() { - this.client.put(KEY1, VALUE1); - long deleteCount1 = this.client.delete(KEY1); - Assert.assertEquals(1L, deleteCount1); - long deleteCount2 = this.client.delete(KEY1); - Assert.assertEquals(0L, deleteCount2); - byte[] value = this.client.get(KEY1); - Assert.assertNull(value); - long deleteCount3 = this.client.delete(NO_SUCH_KEY); - Assert.assertEquals(0L, deleteCount3); - } - - @Test - public void testDeleteWithPrefix() { - this.client.put(KEY1, VALUE1); - this.client.put(KEY2, VALUE2); - this.client.put(NO_SUCH_KEY, VALUE2); - long deleteCount1 = this.client.deleteWithPrefix(KEY_PREFIX); - Assert.assertEquals(2L, deleteCount1); - long deleteCount2 = this.client.delete(NO_SUCH_KEY); - Assert.assertEquals(1L, deleteCount2); - } - - @Test - public void testDeleteAllKvInNamespace() { - this.client.put(KEY1, VALUE1); - this.client.put(KEY2, VALUE2); - long deleteCount1 = this.client.deleteAllKvsInNamespace(); - Assert.assertEquals(2L, deleteCount1); - long deleteCount2 = this.client.delete(KEY1); - Assert.assertEquals(0L, deleteCount2); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/CombinerTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/CombinerTestSuite.java deleted file mode 100644 index 611d52771..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/CombinerTestSuite.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - OverwriteCombinerTest.class, - MergeOldPropertiesCombinerTest.class, - MergeNewPropertiesCombinerTest.class, - IntValueSumCombinerTest.class, - LongValueSumCombinerTest.class, - FloatValueSumCombinerTest.class, - DoubleValueSumCombinerTest.class, - ValueMinCombinerTest.class, - ValueMaxCombinerTest.class, - PointerCombinerTest.class -}) -public class CombinerTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombinerTest.java deleted file mode 100644 index 7ea600698..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/DoubleValueSumCombinerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DoubleValueSumCombinerTest { - - @Test - public void testCombine() { - DoubleValue sum = new DoubleValue(0.0D); - DoubleValueSumCombiner combiner = new DoubleValueSumCombiner(); - for (int i = 1; i <= 10; i++) { - DoubleValue value = new DoubleValue(i); - combiner.combine(sum, value, sum); - } - Assert.assertEquals(55.0D, sum.value(), 0.0D); - } - - @Test - public void testCombineNull() { - DoubleValue value1 = new DoubleValue(0.0D); - DoubleValue value2 = new DoubleValue(0.0D); - DoubleValueSumCombiner combiner = new DoubleValueSumCombiner(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombinerTest.java deleted file mode 100644 index 9af9084a1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/FloatValueSumCombinerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class FloatValueSumCombinerTest { - - @Test - public void testCombine() { - FloatValue sum = new FloatValue(0.0f); - FloatValueSumCombiner combiner = new FloatValueSumCombiner(); - for (int i = 1; i <= 10; i++) { - FloatValue value = new FloatValue(i); - combiner.combine(sum, value, sum); - } - Assert.assertEquals(55.0D, sum.value(), 0.0D); - } - - @Test - public void testCombineNull() { - FloatValue value1 = new FloatValue(0.0f); - FloatValue value2 = new FloatValue(0.0f); - FloatValueSumCombiner combiner = new FloatValueSumCombiner(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombinerTest.java deleted file mode 100644 index a8cd01543..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/IntValueSumCombinerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IntValueSumCombinerTest { - - @Test - public void testCombine() { - IntValue sum = new IntValue(0); - IntValueSumCombiner combiner = new IntValueSumCombiner(); - for (int i = 1; i <= 10; i++) { - IntValue value = new IntValue(i); - combiner.combine(sum, value, sum); - } - Assert.assertEquals(55, sum.value()); - } - - @Test - public void testCombineNull() { - IntValue value1 = new IntValue(1); - IntValue value2 = new IntValue(2); - IntValueSumCombiner combiner = new IntValueSumCombiner(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombinerTest.java deleted file mode 100644 index 925c7a74d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/LongValueSumCombinerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class LongValueSumCombinerTest { - - @Test - public void testCombine() { - LongValue sum = new LongValue(0L); - LongValueSumCombiner combiner = new LongValueSumCombiner(); - for (int i = 1; i <= 10; i++) { - LongValue value = new LongValue(i); - combiner.combine(sum, value, sum); - } - Assert.assertEquals(55L, sum.value()); - } - - @Test - public void testCombineNull() { - LongValue value1 = new LongValue(1L); - LongValue value2 = new LongValue(2L); - LongValueSumCombiner combiner = new LongValueSumCombiner(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombinerTest.java deleted file mode 100644 index 740a8b04d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeNewPropertiesCombinerTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class MergeNewPropertiesCombinerTest extends UnitTestBase { - @Test - public void testCombine() { - Properties properties1 = graphFactory().createProperties(); - properties1.put("name", BytesId.of("marko")); - properties1.put("city", BytesId.of("Beijing")); - - Properties properties2 = graphFactory().createProperties(); - properties2.put("name", BytesId.of("josh")); - properties2.put("age", BytesId.of("18")); - - Properties expect = graphFactory().createProperties(); - expect.put("name", BytesId.of("marko")); - expect.put("age", BytesId.of("18")); - expect.put("city", BytesId.of("Beijing")); - - Properties properties = graphFactory().createProperties(); - PropertiesCombiner combiner = new MergeNewPropertiesCombiner(); - combiner.combine(properties1, properties2, properties); - Assert.assertEquals(expect, properties); - } - - @Test - public void testCombineNull() { - Properties properties1 = graphFactory().createProperties(); - properties1.put("name", BytesId.of("marko")); - properties1.put("city", BytesId.of("Beijing")); - - Properties properties2 = graphFactory().createProperties(); - properties2.put("name", BytesId.of("josh")); - properties2.put("age", BytesId.of("18")); - - - PropertiesCombiner combiner = new MergeNewPropertiesCombiner(); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, properties2, properties2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(properties1, null, properties2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(properties1, properties2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombinerTest.java deleted file mode 100644 index c68f64074..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/MergeOldPropertiesCombinerTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class MergeOldPropertiesCombinerTest extends UnitTestBase { - - @Test - public void testCombine() { - Properties properties1 = graphFactory().createProperties(); - properties1.put("name", BytesId.of("marko")); - properties1.put("city", BytesId.of("Beijing")); - - Properties properties2 = graphFactory().createProperties(); - properties2.put("name", BytesId.of("josh")); - properties2.put("age", BytesId.of("18")); - - Properties expect = graphFactory().createProperties(); - expect.put("name", BytesId.of("josh")); - expect.put("age", BytesId.of("18")); - expect.put("city", BytesId.of("Beijing")); - - Properties properties = graphFactory().createProperties(); - PropertiesCombiner combiner = new MergeOldPropertiesCombiner(); - combiner.combine(properties1, properties2, properties); - Assert.assertEquals(expect, properties); - } - - @Test - public void testCombineNullValue() { - Properties properties1 = graphFactory().createProperties(); - properties1.put("name", BytesId.of("marko")); - properties1.put("city", BytesId.of("Beijing")); - - Properties properties2 = graphFactory().createProperties(); - properties2.put("name", BytesId.of("josh")); - properties2.put("age", BytesId.of("18")); - - PropertiesCombiner combiner = new MergeOldPropertiesCombiner(); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, properties2, properties2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(properties1, null, properties2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(properties1, properties2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombinerTest.java deleted file mode 100644 index 8de000448..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/OverwriteCombinerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class OverwriteCombinerTest extends UnitTestBase { - - @Test - public void testCombineValue() { - LongValue value1 = new LongValue(1L); - LongValue value2 = new LongValue(2L); - OverwriteCombiner combiner = new OverwriteCombiner<>(); - combiner.combine(value1, value2, value2); - Assert.assertEquals(value2, value2); - combiner.combine(value1, value2, value1); - Assert.assertEquals(value2, value1); - } - - @Test - public void testCombineNull() { - LongValue value1 = new LongValue(1L); - LongValue value2 = new LongValue(2L); - OverwriteCombiner combiner = new OverwriteCombiner<>(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombinerTest.java deleted file mode 100644 index 7beb32cfe..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombinerTest.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import java.io.IOException; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.sort.SorterTestUtil; -import org.apache.hugegraph.computer.core.store.entry.InlinePointer; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class PointerCombinerTest extends UnitTestBase { - - @Test - public void testMessageCombiner() throws IOException { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName() - ); - Combiner valueCombiner = config.createObject( - ComputerOptions.WORKER_COMBINER_CLASS); - - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - DoubleValue::new, - new DoubleValueSumCombiner()); - - try (BytesOutput bytesOutput1 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - BytesOutput bytesOutput2 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE);) { - DoubleValue value1 = new DoubleValue(1.0D); - DoubleValue value2 = new DoubleValue(2.0D); - value1.write(bytesOutput1); - value2.write(bytesOutput2); - - Pointer pointer1 = new InlinePointer(bytesOutput1.buffer(), - bytesOutput1.position()); - - Pointer pointer2 = new InlinePointer(bytesOutput2.buffer(), - bytesOutput2.position()); - - Pointer pointer = combiner.combine(pointer1, pointer2); - - BytesInput input = IOFactory.createBytesInput(pointer.bytes()); - - DoubleValue combinedValue = new DoubleValue(); - combinedValue.read(input); - Assert.assertEquals(new DoubleValue(3.0D), combinedValue); - } - } - - @Test - public void testVertexPropertiesCombiner() throws IOException { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName(), - ComputerOptions.WORKER_VERTEX_PROPERTIES_COMBINER_CLASS, - MergeOldPropertiesCombiner.class.getName() - ); - Combiner valueCombiner = config.createObject( - ComputerOptions.WORKER_VERTEX_PROPERTIES_COMBINER_CLASS); - - GraphFactory graphFactory = graphFactory(); - PointerCombiner combiner = - SorterTestUtil.createPointerCombiner( - graphFactory::createProperties, - valueCombiner); - - try (BytesOutput bytesOutput1 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - BytesOutput bytesOutput2 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - Properties value1 = graphFactory.createProperties(); - value1.put("p1", new LongValue(1L)); - Properties value2 = graphFactory.createProperties(); - value2.put("p2", new LongValue(2L)); - value1.write(bytesOutput1); - value2.write(bytesOutput2); - - Pointer pointer1 = new InlinePointer(bytesOutput1.buffer(), - bytesOutput1.position()); - - Pointer pointer2 = new InlinePointer(bytesOutput2.buffer(), - bytesOutput2.position()); - - Pointer pointer = combiner.combine(pointer1, pointer2); - - BytesInput input = IOFactory.createBytesInput(pointer.bytes()); - - Properties combinedValue = graphFactory.createProperties(); - combinedValue.read(input); - Map map = combinedValue.get(); - Assert.assertEquals(2, map.size()); - Assert.assertEquals(new LongValue(1L), map.get("p1")); - Assert.assertEquals(new LongValue(2L), map.get("p2")); - } - } - - @Test - public void testCombineEdgePropertiesFail() throws IOException { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName(), - ComputerOptions.WORKER_EDGE_PROPERTIES_COMBINER_CLASS, - MergeOldPropertiesCombiner.class.getName() - ); - Combiner valueCombiner = config.createObject( - ComputerOptions.WORKER_EDGE_PROPERTIES_COMBINER_CLASS); - - GraphFactory graphFactory = graphFactory(); - - PointerCombiner combiner = - SorterTestUtil.createPointerCombiner( - graphFactory::createProperties, - valueCombiner); - - try (BytesOutput bytesOutput1 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - BytesOutput bytesOutput2 = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - Properties value1 = graphFactory.createProperties(); - value1.put("p1", new LongValue(1L)); - Properties value2 = graphFactory.createProperties(); - value2.put("p2", new LongValue(2L)); - // Only write count. - bytesOutput1.writeInt(1); - value2.write(bytesOutput2); - - Pointer pointer1 = new InlinePointer(bytesOutput1.buffer(), - bytesOutput1.position()); - - Pointer pointer2 = new InlinePointer(bytesOutput2.buffer(), - bytesOutput2.position()); - - Assert.assertThrows(ComputerException.class, () -> { - combiner.combine(pointer1, pointer2); - }, e -> { - Assert.assertContains("Failed to combine pointer", - e.getMessage()); - }); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombinerTest.java deleted file mode 100644 index a452053be..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMaxCombinerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ValueMaxCombinerTest { - - @Test - public void testCombine() { - LongValue max = new LongValue(0L); - ValueMaxCombiner combiner = new ValueMaxCombiner<>(); - LongValue value1 = new LongValue(1L); - combiner.combine(max, value1, max); - LongValue value2 = new LongValue(2L); - combiner.combine(value2, max, max); - Assert.assertEquals(new LongValue(2L), max); - } - - @Test - public void testCombineNull() { - LongValue value1 = new LongValue(1L); - LongValue value2 = new LongValue(2L); - ValueMaxCombiner combiner = new ValueMaxCombiner<>(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value2); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, value2, null); - }, e -> { - Assert.assertEquals("The combine parameter result can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombinerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombinerTest.java deleted file mode 100644 index 6d23f43a9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/combiner/ValueMinCombinerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.combiner; - -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ValueMinCombinerTest { - - @Test - public void testCombine() { - LongValue min = new LongValue(0L); - ValueMinCombiner combiner = new ValueMinCombiner<>(); - LongValue value1 = new LongValue(1L); - combiner.combine(min, value1, min); - LongValue value2 = new LongValue(2L); - combiner.combine(value2, min, min); - Assert.assertEquals(new LongValue(0L), min); - } - - @Test - public void testCombineNull() { - LongValue value1 = new LongValue(1L); - LongValue value2 = new LongValue(2L); - ValueMinCombiner combiner = new ValueMinCombiner<>(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(null, value2, value2); - }, e -> { - Assert.assertEquals("The combine parameter v1 can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - combiner.combine(value1, null, value1); - }, e -> { - Assert.assertEquals("The combine parameter v2 can't be null", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/CommonTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/CommonTestSuite.java deleted file mode 100644 index ef150e797..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/CommonTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - ExceptionTest.class, - ContainerInfoTest.class -}) -public class CommonTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfoTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfoTest.java deleted file mode 100644 index 35eb303a3..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ContainerInfoTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import java.io.IOException; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ContainerInfoTest { - - private static final String HOST1 = "localhost"; - private static final String HOST2 = "not-exist-host"; - - @Test - public void testConstructor() { - ContainerInfo worker = new ContainerInfo(0, HOST1, 8001, 8002); - Assert.assertEquals(0, worker.id()); - Assert.assertEquals(HOST1, worker.hostname()); - Assert.assertEquals(8001, worker.rpcPort()); - Assert.assertEquals(8002, worker.dataPort()); - } - - @Test - public void testReadWrite() throws IOException { - ContainerInfo oldWorker = new ContainerInfo(0, HOST1, 8001, 8002); - ContainerInfo newWorker = new ContainerInfo(); - UnitTestBase.assertEqualAfterWriteAndRead(oldWorker, newWorker); - } - - @Test - public void testEquals() { - ContainerInfo container1 = new ContainerInfo(0, HOST1, 8001, 8002); - ContainerInfo container2 = new ContainerInfo(0, HOST1, 8001, 8002); - ContainerInfo container3 = new ContainerInfo(0, HOST2, 8001, 8002); - Assert.assertEquals(container1, container2); - Assert.assertNotEquals(container1, container3); - Assert.assertNotEquals(container1, new Object()); - } - - @Test - public void testHashCode() { - ContainerInfo container = new ContainerInfo(0, HOST1, 8001, 8002); - Assert.assertEquals(Integer.hashCode(0), container.hashCode()); - } - - @Test - public void testToString() { - ContainerInfo container = new ContainerInfo(0, HOST1, 8001, 8002); - String str = "ContainerInfo{\"id\":0,\"hostname\":\"localhost\"," + - "\"rpcPort\":8001,\"dataPort\":8002}"; - Assert.assertEquals(str, container.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ExceptionTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ExceptionTest.java deleted file mode 100644 index 7f4f86e1a..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/ExceptionTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import java.io.IOException; -import java.nio.charset.IllegalCharsetNameException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ExceptionTest { - - @Test - public void testComputerException() { - Assert.assertThrows(ComputerException.class, () -> { - throw new ComputerException("computer exception"); - }, e -> { - Assert.assertEquals("computer exception", e.getMessage()); - Assert.assertNull(e.getCause()); - }); - - Assert.assertThrows(ComputerException.class, () -> { - throw new ComputerException("computer exception", - new IOException()); - }, e -> { - Assert.assertEquals("computer exception", e.getMessage()); - Assert.assertEquals(IOException.class, e.getCause().getClass()); - }); - - Assert.assertThrows(ComputerException.class, () -> { - throw new ComputerException("computer exception at step %s", 1); - }, e -> { - Assert.assertEquals("computer exception at step 1", - e.getMessage()); - Assert.assertNull(e.getCause()); - }); - - Assert.assertThrows(ComputerException.class, () -> { - throw new ComputerException("computer exception at step %s", - new IOException(), 1); - }, e -> { - Assert.assertEquals("computer exception at step 1", - e.getMessage()); - Assert.assertEquals(IOException.class, e.getCause().getClass()); - }); - - - Throwable rootCause = new IllegalCharsetNameException("invalid"); - Assert.assertThrows(ComputerException.class, () -> { - throw new ComputerException("computer exception", - new IOException(rootCause)); - }, e -> { - Assert.assertEquals("computer exception", e.getMessage()); - Assert.assertEquals(IOException.class, e.getCause().getClass()); - Assert.assertEquals(rootCause, ComputerException.rootCause(e)); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/FakeMasterComputation.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/FakeMasterComputation.java deleted file mode 100644 index cbc2cea46..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/common/FakeMasterComputation.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.common; - -import org.apache.hugegraph.computer.core.master.MasterComputation; -import org.apache.hugegraph.computer.core.master.MasterComputationContext; -import org.apache.hugegraph.computer.core.master.MasterContext; - -/** - * Can't create instance, used for ObjectFactoryTest. - */ -public class FakeMasterComputation implements MasterComputation { - - private FakeMasterComputation() { - } - - @Override - public void init(MasterContext context) { - // pass - } - - @Override - public void close(MasterContext context) { - // pass - } - - @Override - public boolean compute(MasterComputationContext context) { - return false; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManagerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManagerTest.java deleted file mode 100644 index c8c1544ce..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManagerTest.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.Random; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.config.Null; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.GraphComputeOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.StreamGraphOutput; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.receiver.ReceiverUtil; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.sorting.SendSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class ComputeManagerTest extends UnitTestBase { - - private static final Random RANDOM = new Random(1); - - private Config config; - private Managers managers; - private ConnectionId connectionId; - private ComputeManager computeManager; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMBINER_CLASS, - Null.class.getName(), // Can't combine - ComputerOptions.ALGORITHM_RESULT_CLASS, - IdListList.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - IdList.class.getName(), - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "10000", - ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT, "1000", - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "10", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation.class.getName(), - ComputerOptions.INPUT_EDGE_FREQ, "SINGLE", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - - this.managers = new Managers(); - FileManager fileManager = new FileManager(); - this.managers.add(fileManager); - SortManager sortManager = new SendSortManager(context()); - this.managers.add(sortManager); - - MessageSendManager sendManager = new MessageSendManager( - context(), sortManager, - new MockMessageSender()); - this.managers.add(sendManager); - MessageRecvManager receiveManager = new MessageRecvManager(context(), - fileManager, - sortManager); - this.managers.add(receiveManager); - SnapshotManager snapshotManager = new SnapshotManager(context(), - null, - receiveManager, - null); - this.managers.add(snapshotManager); - this.managers.initAll(this.config); - this.connectionId = new ConnectionId(new InetSocketAddress("localhost", - 8081), - 0); - this.computeManager = new ComputeManager(0, context(), this.managers); - } - - @After - public void teardown() { - this.managers.closeAll(this.config); - } - - @Test - public void testProcess() throws IOException { - MessageRecvManager receiveManager = this.managers.get( - MessageRecvManager.NAME); - receiveManager.onStarted(this.connectionId); - add200VertexBuffer((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.VERTEX, 0, buffer); - }); - // Partition 1 only has vertex. - add200VertexBuffer((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.VERTEX, 1, buffer); - }); - receiveManager.onFinished(this.connectionId); - receiveManager.onStarted(this.connectionId); - addSingleFreqEdgeBuffer((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.EDGE, 0, buffer); - }); - receiveManager.onFinished(this.connectionId); - this.computeManager.input(); - - // Superstep 0 - receiveManager.beforeSuperstep(this.config, 0); - receiveManager.onStarted(this.connectionId); - addMessages((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.MSG, 0, buffer); - }); - receiveManager.onFinished(this.connectionId); - this.computeManager.compute(null, 0); - receiveManager.afterSuperstep(this.config, 0); - - // Superstep 1 - this.computeManager.takeRecvedMessages(); - receiveManager.beforeSuperstep(this.config, 1); - receiveManager.onStarted(this.connectionId); - receiveManager.onFinished(this.connectionId); - this.computeManager.compute(null, 1); - receiveManager.afterSuperstep(this.config, 1); - - // Output - this.computeManager.output(); - } - - private static void add200VertexBuffer(Consumer consumer) - throws IOException { - for (long i = 0L; i < 200L; i += 2) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - vertex.properties(graphFactory().createProperties()); - ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer); - } - } - - private static byte[] writeVertex(Vertex vertex) throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - GraphComputeOutput output = new StreamGraphOutput(context(), - entryOutput); - output.writeVertex(vertex); - return bytesOutput.toByteArray(); - } - - private static void addSingleFreqEdgeBuffer( - Consumer consumer) throws IOException { - for (long i = 0L; i < 200L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - int count = RANDOM.nextInt(20); - if (count == 0) { - continue; - } - Edges edges = graphFactory().createEdges(count); - - for (long j = 0; j < count; j++) { - Edge edge = graphFactory().createEdge(); - edge.targetId(BytesId.of(RANDOM.nextInt(200))); - Properties properties = graphFactory().createProperties(); - properties.put("p1", new LongValue(i)); - edge.properties(properties); - edges.add(edge); - } - vertex.edges(edges); - ReceiverUtil.consumeBuffer(writeEdges(vertex, EdgeFrequency.SINGLE), - consumer); - } - } - - private static byte[] writeEdges(Vertex vertex, EdgeFrequency freq) - throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - GraphComputeOutput output = new StreamGraphOutput(context(), - entryOutput); - Whitebox.setInternalState(output, "frequency", freq); - output.writeEdges(vertex); - return bytesOutput.toByteArray(); - } - - private static void addMessages(Consumer consumer) - throws IOException { - for (long i = 0L; i < 200L; i++) { - int count = RANDOM.nextInt(5); - for (int j = 0; j < count; j++) { - Id id = BytesId.of(i); - IdList message = new IdList(); - message.add(id); - ReceiverUtil.consumeBuffer(ReceiverUtil.writeMessage(id, - message), - consumer); - } - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeTestSuite.java deleted file mode 100644 index ae5d3f8d1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeTestSuite.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import org.apache.hugegraph.computer.core.compute.input.EdgesInputTest; -import org.apache.hugegraph.computer.core.compute.input.MessageInputTest; -import org.apache.hugegraph.computer.core.compute.input.ResuablePointerTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - EdgesInputTest.class, - ResuablePointerTest.class, - MessageInputTest.class, - ComputeManagerTest.class -}) -public class ComputeTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockComputation.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockComputation.java deleted file mode 100644 index 64792c5a9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockComputation.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import java.util.Iterator; -import java.util.Random; - -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; -import org.junit.Assert; - -public class MockComputation implements Computation { - - private static final String NAME = "MockComputation"; - private static final String CATEGORY = "Mock"; - private static final Random RANDOM = new Random(1001L); - - @Override - public String name() { - return NAME; - } - - @Override - public String category() { - return CATEGORY; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - IdListList value = new IdListList(); - vertex.value(value); - Edges edges = vertex.edges(); - checkEdgesSize(edges); - checkEdgesSize(edges); - if (RANDOM.nextInt() % 10 == 0) { - vertex.inactivate(); - } - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - IdListList value = vertex.value(); - while (messages.hasNext()) { - Assert.assertTrue(messages.hasNext()); - value.add(messages.next().copy()); - } - Assert.assertFalse(messages.hasNext()); - if (RANDOM.nextInt() % 10 == 0) { - vertex.inactivate(); - } - } - - private static void checkEdgesSize(Edges edges) { - int edgeSize = edges.size(); - int edgeIterSize = 0; - for (@SuppressWarnings("unused") Edge edge : edges) { - edgeIterSize++; - } - Assert.assertEquals(edgeSize, edgeIterSize); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockMessageSender.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockMessageSender.java deleted file mode 100644 index a19692008..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/MockMessageSender.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute; - -import java.util.concurrent.CompletableFuture; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.sender.MessageSender; -import org.apache.hugegraph.computer.core.sender.QueuedMessage; - -public class MockMessageSender implements MessageSender { - - @Override - public CompletableFuture send(int workerId, MessageType type) { - CompletableFuture future = new CompletableFuture<>(); - future.complete(null); - return future; - } - - @Override - public void send(int workerId, QueuedMessage message) { - // pass - } - - @Override - public void transportExceptionCaught(TransportException cause, ConnectionId connectionId) { - // pass - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInputTest.java deleted file mode 100644 index f164d868b..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInputTest.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.File; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.Iterator; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.compute.FileGraphPartition; -import org.apache.hugegraph.computer.core.compute.MockMessageSender; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.config.Null; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.GraphComputeOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.StreamGraphOutput; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.receiver.ReceiverUtil; -import org.apache.hugegraph.computer.core.sender.MessageSendManager; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.SendSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.After; -import org.junit.Test; - -public class EdgesInputTest extends UnitTestBase { - - private Config config; - private Managers managers; - - @After - public void teardown() { - if (this.managers != null) { - this.managers.closeAll(this.config); - } - } - - @Test - public void testSingle() throws IOException { - this.testEdgeFreq(EdgeFrequency.SINGLE); - } - - @Test - public void testSinglePerLabel() throws IOException { - this.testEdgeFreq(EdgeFrequency.SINGLE_PER_LABEL); - } - - @Test - public void testMultiple() throws IOException { - this.testEdgeFreq(EdgeFrequency.MULTIPLE); - } - - @Test - public void testEmptyEdges() { - EdgesInput.EmptyEdges edges = EdgesInput.EmptyEdges.instance(); - Iterator it = edges.iterator(); - Assert.assertFalse(it.hasNext()); - Assert.assertEquals(0, edges.size()); - Assert.assertThrows(ComputerException.class, () -> { - edges.add(graphFactory().createEdge()); - }, e -> { - Assert.assertContains("Not support adding edges during computing", - e.getMessage()); - }); - } - - private void testEdgeFreq(EdgeFrequency freq) - throws IOException { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_COMBINER_CLASS, - Null.class.getName(), // Can't combine - ComputerOptions.ALGORITHM_RESULT_CLASS, - IdListList.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - IdList.class.getName(), - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "10000", - ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT, "1000", - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "10", - ComputerOptions.INPUT_EDGE_FREQ, freq.name(), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - this.managers = new Managers(); - FileManager fileManager = new FileManager(); - this.managers.add(fileManager); - SortManager sortManager = new SendSortManager(context()); - this.managers.add(sortManager); - - MessageSendManager sendManager = new MessageSendManager( - context(), sortManager, - new MockMessageSender()); - this.managers.add(sendManager); - MessageRecvManager receiveManager = new MessageRecvManager(context(), - fileManager, - sortManager); - this.managers.add(receiveManager); - SnapshotManager snapshotManager = new SnapshotManager(context(), - null, - receiveManager, - null); - this.managers.add(snapshotManager); - this.managers.initAll(this.config); - ConnectionId connectionId = new ConnectionId(new InetSocketAddress( - "localhost", 8081), - 0); - FileGraphPartition partition = new FileGraphPartition( - context(), this.managers, 0); - receiveManager.onStarted(connectionId); - add200VertexBuffer((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.VERTEX, 0, buffer); - }); - receiveManager.onFinished(connectionId); - receiveManager.onStarted(connectionId); - addEdgeBuffer((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.EDGE, 0, buffer); - }, freq); - - receiveManager.onFinished(connectionId); - Whitebox.invoke(partition.getClass(), new Class[] { - PeekableIterator.class, PeekableIterator.class}, - "input", partition, - receiveManager.vertexPartitions().get(0), - receiveManager.edgePartitions().get(0)); - File edgeFile = Whitebox.getInternalState(partition, "edgeFile"); - EdgesInput edgesInput = new EdgesInput(context(), edgeFile); - edgesInput.init(); - this.checkEdgesInput(edgesInput, freq); - edgesInput.close(); - } - - private static void add200VertexBuffer(Consumer consumer) - throws IOException { - for (long i = 0L; i < 200L; i += 2) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - vertex.properties(graphFactory().createProperties()); - ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer); - } - } - - private static byte[] writeVertex(Vertex vertex) throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - GraphComputeOutput output = new StreamGraphOutput(context(), - entryOutput); - output.writeVertex(vertex); - return bytesOutput.toByteArray(); - } - - private static void addEdgeBuffer(Consumer consumer, - EdgeFrequency freq) throws IOException { - for (long i = 0L; i < 200L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - int count = (int) i; - if (count == 0) { - continue; - } - Edges edges = graphFactory().createEdges(count); - - for (long j = 0; j < count; j++) { - Edge edge = graphFactory().createEdge(); - switch (freq) { - case SINGLE: - edge.targetId(BytesId.of(j)); - break; - case SINGLE_PER_LABEL: - edge.label(String.valueOf(j)); - edge.targetId(BytesId.of(j)); - break; - case MULTIPLE: - edge.name(String.valueOf(j)); - edge.label(String.valueOf(j)); - edge.targetId(BytesId.of(j)); - break; - default: - throw new ComputerException( - "Illegal edge frequency %s", freq); - } - - Properties properties = graphFactory().createProperties(); - properties.put("p1", new LongValue(i)); - edge.properties(properties); - edges.add(edge); - } - vertex.edges(edges); - ReceiverUtil.consumeBuffer(writeEdges(vertex, freq), consumer); - } - } - - private static byte[] writeEdges(Vertex vertex, EdgeFrequency freq) - throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - GraphComputeOutput output = new StreamGraphOutput(context(), - entryOutput); - Whitebox.setInternalState(output, "frequency", freq); - output.writeEdges(vertex); - return bytesOutput.toByteArray(); - } - - private void checkEdgesInput(EdgesInput edgesInput, EdgeFrequency freq) - throws IOException { - - for (long i = 0L; i < 200L; i += 2) { - Id id = BytesId.of(i); - ReusablePointer idPointer = idToReusablePointer(id); - Edges edges = edgesInput.edges(idPointer); - Iterator edgesIt = edges.iterator(); - Assert.assertEquals(i, edges.size()); - for (int j = 0; j < edges.size(); j++) { - Assert.assertTrue(edgesIt.hasNext()); - Edge edge = edgesIt.next(); - switch (freq) { - case SINGLE: - Assert.assertEquals(BytesId.of(j), edge.targetId()); - break; - case SINGLE_PER_LABEL: - Assert.assertEquals(BytesId.of(j), edge.targetId()); - Assert.assertEquals(String.valueOf(j), edge.label()); - break; - case MULTIPLE: - Assert.assertEquals(BytesId.of(j), edge.targetId()); - Assert.assertEquals(String.valueOf(j), edge.label()); - Assert.assertEquals(String.valueOf(j), edge.name()); - break; - default: - throw new ComputerException( - "Illegal edge frequency %s", freq); - } - } - Assert.assertFalse(edgesIt.hasNext()); - } - } - - public static ReusablePointer idToReusablePointer(Id id) - throws IOException { - BytesOutput output = IOFactory.createBytesOutput(9); - id.write(output); - return new ReusablePointer(output.buffer(), (int) output.position()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInputTest.java deleted file mode 100644 index e2ad3de58..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/MessageInputTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.compute.MockComputation; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.config.Null; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.MessageRecvManager; -import org.apache.hugegraph.computer.core.receiver.ReceiverUtil; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class MessageInputTest extends UnitTestBase { - - private Config config; - private Managers managers; - private ConnectionId connectionId; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMBINER_CLASS, - Null.class.getName(), // Can't combine - ComputerOptions.ALGORITHM_RESULT_CLASS, - IdListList.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - IdList.class.getName(), - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "10000", - ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT, "1000", - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "10", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation.class.getName(), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - - this.managers = new Managers(); - FileManager fileManager = new FileManager(); - this.managers.add(fileManager); - SortManager sortManager = new RecvSortManager(context()); - this.managers.add(sortManager); - - MessageRecvManager receiveManager = new MessageRecvManager(context(), - fileManager, - sortManager); - this.managers.add(receiveManager); - SnapshotManager snapshotManager = new SnapshotManager(context(), - null, - receiveManager, - null); - this.managers.add(snapshotManager); - this.managers.initAll(this.config); - this.connectionId = new ConnectionId(new InetSocketAddress("localhost", - 8081), - 0); - } - - @After - public void teardown() { - this.managers.closeAll(this.config); - } - - @Test - public void testMessageInput() throws IOException { - MessageRecvManager receiveManager = this.managers.get( - MessageRecvManager.NAME); - receiveManager.onStarted(this.connectionId); - - // Superstep 0 - receiveManager.beforeSuperstep(this.config, 0); - receiveManager.onStarted(this.connectionId); - addMessages((NetworkBuffer buffer) -> { - receiveManager.handle(MessageType.MSG, 0, buffer); - }); - receiveManager.onFinished(this.connectionId); - PeekableIterator it = receiveManager.messagePartitions() - .get(0); - MessageInput input = new MessageInput<>(context(), it); - Map> expectedMessages = expectedMessages(); - checkMessages(expectedMessages, input); - } - - private void checkMessages(Map> expectedMessages, - MessageInput input) throws IOException { - for (long i = 0L; i < 200L; i++) { - List messages = expectedMessages.get(BytesId.of(i)); - Id id = BytesId.of(i); - ReusablePointer idPointer = EdgesInputTest.idToReusablePointer(id); - Iterator mit = input.iterator(idPointer); - if (messages == null) { - Assert.assertFalse(mit.hasNext()); - } else { - for (int j = 0; j < messages.size();j++) { - Assert.assertTrue(mit.hasNext()); - Assert.assertTrue(messages.contains(mit.next())); - } - } - } - } - - private static void addMessages(Consumer consumer) - throws IOException { - Random random = new Random(1); - for (long i = 0L; i < 200L; i++) { - int count = random.nextInt(5); - for (int j = 0; j < count; j++) { - Id id = BytesId.of(random.nextInt(200)); - IdList message = new IdList(); - message.add(id); - ReceiverUtil.consumeBuffer(ReceiverUtil.writeMessage(id, - message), - consumer); - } - } - } - - private static Map> expectedMessages() { - Random random = new Random(1); - Map> globalMessages = new HashMap<>(); - for (long i = 0L; i < 200L; i++) { - int count = random.nextInt(5); - for (int j = 0; j < count; j++) { - Id id = BytesId.of(random.nextInt(200)); - IdList message = new IdList(); - message.add(id); - List messages = globalMessages.computeIfAbsent( - id, nid -> new ArrayList<>()); - messages.add(message); - } - } - return globalMessages; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/ResuablePointerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/ResuablePointerTest.java deleted file mode 100644 index 7edc0b2f2..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/ResuablePointerTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.compute.input; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ResuablePointerTest { - - @Test - public void testReadWrite() throws IOException { - BytesOutput output1 = IOFactory.createBytesOutput(100); - long position = output1.position(); - output1.writeFixedInt(0); - output1.writeInt(Integer.MAX_VALUE); - int length = (int) (output1.position() - position - Constants.INT_LEN); - output1.writeFixedInt(position, length); - - ReusablePointer p1 = new ReusablePointer(); - p1.read(IOFactory.createBytesInput(output1.buffer())); - - BytesOutput output2 = IOFactory.createBytesOutput(100); - p1.write(output2); - - ReusablePointer p2 = new ReusablePointer(); - p2.read(IOFactory.createBytesInput(output2.buffer())); - Assert.assertEquals(0, p1.compareTo(p2)); - Assert.assertEquals(p1.length(), p2.length()); - Assert.assertEquals(0L, p1.offset()); - Assert.assertEquals(0L, p2.offset()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/ConfigTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/ConfigTestSuite.java deleted file mode 100644 index 78dd94399..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/ConfigTestSuite.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - DefaultConfigTest.class -}) -public class ConfigTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfigTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfigTest.java deleted file mode 100644 index efec818fe..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/config/DefaultConfigTest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.config; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.FakeMasterComputation; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; -import org.apache.hugegraph.computer.core.master.MasterComputation; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DefaultConfigTest extends UnitTestBase { - - private static final String KEY = "algorithm.page_rank.key"; - private static final String KEY_TRUE = "algorithm.page_rank.key_true"; - private static final String KEY_FALSE = "algorithm.page_rank.key_false"; - private static final String KEY_MAX = "algorithm.page_rank.key_max"; - private static final String KEY_MIN = "algorithm.page_rank.key_min"; - private static final String KEY_EMPTY = "algorithm.page_rank.no_key"; - private static final String KEY_ABC = "algorithm.page_rank.abc"; - private static final String VALUE_ABC = "abc"; - - @Test - public void testGetBoolean() { - final boolean defaultValue = false; - Map options = this.initialOptions(); - options.put(KEY_TRUE, Boolean.toString(Boolean.TRUE)); - options.put(KEY_FALSE, Boolean.toString(Boolean.FALSE)); - Config config = new DefaultConfig(options); - Assert.assertTrue(config.getBoolean(KEY_TRUE, defaultValue)); - Assert.assertFalse(config.getBoolean(KEY_FALSE, defaultValue)); - Assert.assertFalse(config.getBoolean(KEY_EMPTY, defaultValue)); - Assert.assertThrows(ComputerException.class, () -> { - config.getBoolean(KEY_ABC, Boolean.TRUE); - } ,e -> { - Assert.assertContains("Can't parse boolean value", e.getMessage()); - }); - } - - @Test - public void testGetInt() { - final int defaultValue = 1; - Map options = this.initialOptions(); - options.put(KEY_MAX, Integer.toString(Integer.MAX_VALUE)); - options.put(KEY_MIN, Integer.toString(Integer.MIN_VALUE)); - Config config = new DefaultConfig(options); - Assert.assertEquals(Integer.MAX_VALUE, - config.getInt(KEY_MAX, defaultValue)); - Assert.assertEquals(Integer.MIN_VALUE, - config.getInt(KEY_MIN, defaultValue)); - Assert.assertEquals(defaultValue, - config.getInt(KEY_EMPTY, defaultValue)); - Assert.assertThrows(ComputerException.class, () -> { - config.getInt(KEY_ABC, defaultValue); - } ,e -> { - Assert.assertContains("Can't parse int value", e.getMessage()); - }); - } - - @Test - public void testGetLong() { - final long defaultValue = 1L; - Map options = this.initialOptions(); - options.put(KEY_MAX, Long.toString(Long.MAX_VALUE)); - options.put(KEY_MIN, Long.toString(Long.MIN_VALUE)); - Config config = new DefaultConfig(options); - Assert.assertEquals(Long.MAX_VALUE, - config.getLong(KEY_MAX, defaultValue)); - Assert.assertEquals(Long.MIN_VALUE, - config.getLong(KEY_MIN, defaultValue)); - Assert.assertEquals(defaultValue, - config.getLong(KEY_EMPTY, defaultValue)); - Assert.assertThrows(ComputerException.class, () -> { - config.getLong(KEY_ABC, defaultValue); - } ,e -> { - Assert.assertContains("Can't parse long value", e.getMessage()); - }); - } - - @Test - public void testGetDouble() throws IOException { - final double defaultValue = 1.0D; - final double delta = 0.0D; - Map options = this.initialOptions(); - options.put(KEY_MAX, Double.toString(Double.MAX_VALUE)); - options.put(KEY_MIN, Double.toString(Double.MIN_VALUE)); - Config config = new DefaultConfig(options); - Assert.assertEquals(Double.MAX_VALUE, - config.getDouble(KEY_MAX, defaultValue), - delta); - Assert.assertEquals(Double.MIN_VALUE, - config.getDouble(KEY_MIN, defaultValue), - delta); - Assert.assertEquals(defaultValue, - config.getDouble(KEY_EMPTY, defaultValue), - delta); - Assert.assertThrows(ComputerException.class, () -> { - config.getDouble(KEY_ABC, defaultValue); - } ,e -> { - Assert.assertContains("Can't parse double value", e.getMessage()); - }); - } - - @Test - public void testString() throws IOException { - String value = "The value of string"; - final String defaultValue = "The default value of string"; - Map options = this.initialOptions(); - options.put(KEY, value); - Config config = new DefaultConfig(options); - Assert.assertEquals(value, config.getString(KEY, defaultValue)); - Assert.assertEquals(value, config.getString(KEY, null)); - Assert.assertEquals(defaultValue, - config.getString(KEY_EMPTY, defaultValue)); - Assert.assertNull(config.getString(KEY_EMPTY, null)); - } - - @Test - public void testCreateObject() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.MASTER_COMPUTATION_CLASS, - DefaultMasterComputation.class.getName() - ); - MasterComputation masterComputation = config.createObject( - ComputerOptions.MASTER_COMPUTATION_CLASS); - Assert.assertEquals(DefaultMasterComputation.class, - masterComputation.getClass()); - } - - @Test - public void testCreateObjectFail() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.MASTER_COMPUTATION_CLASS, - FakeMasterComputation.class.getName() - ); - Assert.assertThrows(ComputerException.class, () -> { - config.createObject(ComputerOptions.MASTER_COMPUTATION_CLASS); - }, e -> { - Assert.assertContains("Failed to create object for option", - e.getMessage()); - Assert.assertContains("with modifiers \"private\"", - e.getCause().getMessage()); - }); - } - - @Test - public void testNullClass() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.WORKER_COMBINER_CLASS, - Null.class.getName() - ); - Object combiner = config.createObject( - ComputerOptions.WORKER_COMBINER_CLASS, false); - Assert.assertNull(combiner); - } - - private Map initialOptions() { - Map options = new HashMap<>(); - options.put(ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES.name(), "false"); - options.put(ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES.name(), - "false"); - options.put(ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES.name(), - "false"); - options.put(KEY_ABC, VALUE_ABC); - return options; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactoryTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactoryTest.java deleted file mode 100644 index dd377c0c1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/BuiltinGraphFactoryTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.util.UUID; - -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class BuiltinGraphFactoryTest extends UnitTestBase { - - @Test - public void testCreateLongId() { - long value = 1L; - GraphFactory graphFactory = graphFactory(); - Id id = graphFactory.createId(value); - Assert.assertEquals(IdType.LONG, id.idType()); - Assert.assertEquals(BytesId.of(value), id); - } - - @Test - public void testCreateUtf8Id() { - String value = "John"; - GraphFactory graphFactory = graphFactory(); - Id id = graphFactory.createId(value); - Assert.assertEquals(IdType.UTF8, id.idType()); - Assert.assertEquals(BytesId.of(value), id); - } - - @Test - public void testCreateUuidId() { - UUID uuid = UUID.randomUUID(); - GraphFactory graphFactory = graphFactory(); - Id id = graphFactory.createId(uuid); - Assert.assertEquals(IdType.UUID, id.idType()); - Assert.assertEquals(BytesId.of(uuid), id); - } - - @Test - public void testCreateValue() { - GraphFactory factory = context().graphFactory(); - Assert.assertEquals(ValueType.NULL, - factory.createValue(ValueType.NULL.code()) - .valueType()); - Assert.assertEquals(ValueType.LONG, - factory.createValue(ValueType.LONG.code()) - .valueType()); - Assert.assertEquals(ValueType.DOUBLE, - factory.createValue(ValueType.DOUBLE.code()) - .valueType()); - Assert.assertEquals(ValueType.ID, - factory.createValue(ValueType.ID.code()) - .valueType()); - Assert.assertEquals(ValueType.ID_LIST, - factory.createValue(ValueType.ID_LIST.code()) - .valueType()); - Assert.assertEquals(ValueType.ID_LIST_LIST, - factory.createValue( - ValueType.ID_LIST_LIST.code()) - .valueType()); - - Assert.assertEquals(ValueType.NULL, - factory.createValue(ValueType.NULL).valueType()); - Assert.assertEquals(ValueType.LONG, - factory.createValue(ValueType.LONG).valueType()); - Assert.assertEquals(ValueType.DOUBLE, - factory.createValue(ValueType.DOUBLE).valueType()); - Assert.assertEquals(ValueType.ID, - factory.createValue(ValueType.ID) - .valueType()); - Assert.assertEquals(ValueType.ID_LIST, - factory.createValue(ValueType.ID_LIST) - .valueType()); - Assert.assertEquals(ValueType.ID_LIST_LIST, - factory.createValue(ValueType.ID_LIST_LIST) - .valueType()); - - Assert.assertThrows(NullPointerException.class, () -> { - factory.createValue(null); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultEdgeTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultEdgeTest.java deleted file mode 100644 index bd3b1f0b9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultEdgeTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.edge.DefaultEdge; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.DefaultProperties; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DefaultEdgeTest extends UnitTestBase { - - @Test - public void testConstructor() { - DefaultEdge edge = new DefaultEdge(graphFactory()); - Assert.assertEquals(Constants.EMPTY_STR, edge.label()); - Assert.assertEquals(Constants.EMPTY_STR, edge.name()); - Assert.assertNull(edge.targetId()); - Assert.assertEquals(new DefaultProperties(graphFactory()), - edge.properties()); - - edge = new DefaultEdge(graphFactory(), "knows", "2021-06-01", - BytesId.of(1L)); - Assert.assertEquals("knows", edge.label()); - Assert.assertEquals("2021-06-01", edge.name()); - Assert.assertEquals(BytesId.of(1L), edge.targetId()); - Assert.assertEquals(new DefaultProperties(graphFactory()), - edge.properties()); - } - - @Test - public void testOverwrite() { - DefaultEdge edge = new DefaultEdge(graphFactory()); - edge.label("knows"); - edge.name("2021-06-01"); - edge.targetId(BytesId.of(1L)); - Properties properties = new DefaultProperties(graphFactory()); - properties.put("p1", new LongValue(1L)); - properties.put("p2", new DoubleValue(2.0D)); - edge.properties(properties); - - Assert.assertEquals("knows", edge.label()); - Assert.assertEquals("2021-06-01", edge.name()); - Assert.assertEquals(BytesId.of(1L), edge.targetId()); - Assert.assertEquals(properties, edge.properties()); - } - - @Test - public void testEquals() { - DefaultEdge edge1 = new DefaultEdge(graphFactory()); - edge1.label("knows"); - edge1.name("2021-06-01"); - edge1.targetId(BytesId.of(1L)); - Properties properties = new DefaultProperties(graphFactory()); - properties.put("p1", new LongValue(1L)); - properties.put("p2", new DoubleValue(2.0D)); - edge1.properties(properties); - - DefaultEdge edge2 = new DefaultEdge(graphFactory(), "knows", - "2021-06-01", BytesId.of(1L)); - edge2.properties().put("p1", new LongValue(1L)); - edge2.properties().put("p2", new DoubleValue(2.0D)); - - Assert.assertEquals(edge1, edge2); - - Assert.assertNotEquals(edge1, properties); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultPropertiesTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultPropertiesTest.java deleted file mode 100644 index 54725b5d5..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/DefaultPropertiesTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.io.IOException; -import java.util.Map; - -import org.apache.hugegraph.computer.core.graph.properties.DefaultProperties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DefaultPropertiesTest extends UnitTestBase { - - @Test - public void testConstructor() { - DefaultProperties properties = new DefaultProperties(graphFactory()); - Assert.assertEquals(0, properties.get().size()); - properties.put("p1", new LongValue(1L)); - properties.put("p2", new DoubleValue(2.0D)); - - Map props = properties.get(); - Assert.assertEquals(2, props.size()); - Assert.assertEquals(new LongValue(1L), props.get("p1")); - Assert.assertEquals(new DoubleValue(2.0D), props.get("p2")); - } - - @Test - public void testOverwrite() { - DefaultProperties properties = new DefaultProperties(graphFactory()); - Assert.assertEquals(0, properties.get().size()); - properties.put("p1", new LongValue(1L)); - properties.put("p2", new DoubleValue(2.0D)); - - Assert.assertEquals(new LongValue(1L), properties.get("p1")); - properties.put("p1", new LongValue(2L)); - Assert.assertEquals(new LongValue(2L), properties.get("p1")); - - Map props = properties.get(); - Assert.assertEquals(2, props.size()); - Assert.assertEquals(new LongValue(2L), props.get("p1")); - Assert.assertEquals(new DoubleValue(2.0D), props.get("p2")); - } - - @Test - public void testReadWrite() throws IOException { - DefaultProperties properties = new DefaultProperties(graphFactory()); - Assert.assertEquals(0, properties.get().size()); - properties.put("p1", new LongValue(1L)); - properties.put("p2", new DoubleValue(2.0D)); - - DefaultProperties props2 = new DefaultProperties(graphFactory()); - UnitTestBase.assertEqualAfterWriteAndRead(properties, props2); - } - - @Test - public void testEquals() { - DefaultProperties props1 = new DefaultProperties(graphFactory()); - props1.put("p1", new LongValue(1L)); - props1.put("p2", new DoubleValue(2.0D)); - - DefaultProperties props2 = new DefaultProperties( - props1.get(), - UnitTestBase.graphFactory()); - Assert.assertEquals(props1, props2); - } - - @Test - public void testHashCode() { - DefaultProperties props = new DefaultProperties(graphFactory()); - props.put("p1", new LongValue(1L)); - props.put("p2", new DoubleValue(2.0D)); - - Assert.assertEquals(1073748897, props.hashCode()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/GraphTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/GraphTestSuite.java deleted file mode 100644 index 43dd38f31..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/GraphTestSuite.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import org.apache.hugegraph.computer.core.common.ContainerInfoTest; -import org.apache.hugegraph.computer.core.graph.id.BytesIdTest; -import org.apache.hugegraph.computer.core.graph.id.IdFactoryTest; -import org.apache.hugegraph.computer.core.graph.id.IdTypeTest; -import org.apache.hugegraph.computer.core.graph.partition.HashPartitionerTest; -import org.apache.hugegraph.computer.core.graph.partition.PartitionStatTest; -import org.apache.hugegraph.computer.core.graph.value.BooleanValueTest; -import org.apache.hugegraph.computer.core.graph.value.DoubleValueTest; -import org.apache.hugegraph.computer.core.graph.value.FloatValueTest; -import org.apache.hugegraph.computer.core.graph.value.IdListListTest; -import org.apache.hugegraph.computer.core.graph.value.IdValueListTest; -import org.apache.hugegraph.computer.core.graph.value.IdValueTest; -import org.apache.hugegraph.computer.core.graph.value.IntValueTest; -import org.apache.hugegraph.computer.core.graph.value.ListValueTest; -import org.apache.hugegraph.computer.core.graph.value.LongValueTest; -import org.apache.hugegraph.computer.core.graph.value.NullValueTest; -import org.apache.hugegraph.computer.core.graph.value.StringValueTest; -import org.apache.hugegraph.computer.core.graph.value.ValueTypeTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - BytesIdTest.class, - IdTypeTest.class, - IdFactoryTest.class, - NullValueTest.class, - BooleanValueTest.class, - IdValueTest.class, - IntValueTest.class, - LongValueTest.class, - FloatValueTest.class, - DoubleValueTest.class, - IdValueListTest.class, - IdListListTest.class, - ListValueTest.class, - ValueTypeTest.class, - StringValueTest.class, - BuiltinGraphFactoryTest.class, - ContainerInfoTest.class, - PartitionStatTest.class, - HashPartitionerTest.class, - SuperstepStatTest.class, - DefaultEdgeTest.class, - DefaultPropertiesTest.class -}) -public class GraphTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStatTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStatTest.java deleted file mode 100644 index 1f2f2a386..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/SuperstepStatTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.core.worker.WorkerStat; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class SuperstepStatTest { - - @Test - public void testIncreasePartitionStat() { - SuperstepStat stat = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat.increase(partitionStat); - stat.increase(partitionStat); - - Assert.assertEquals(partitionStat.vertexCount() * 2L, - stat.vertexCount()); - Assert.assertEquals(partitionStat.edgeCount() * 2L, stat.edgeCount()); - - Assert.assertEquals(partitionStat.finishedVertexCount() * 2L, - stat.finishedVertexCount()); - - Assert.assertEquals(partitionStat.messageSendCount() * 2L, - stat.messageSendCount()); - Assert.assertEquals(partitionStat.messageSendBytes() * 2L, - stat.messageSendBytes()); - - Assert.assertEquals(partitionStat.messageRecvCount() * 2L, - stat.messageRecvCount()); - Assert.assertEquals(partitionStat.messageRecvBytes() * 2L, - stat.messageRecvBytes()); - } - - @Test - public void testIncreaseWorkerStat() { - SuperstepStat stat = new SuperstepStat(); - PartitionStat partitionStat1 = new PartitionStat(1, 4L, 3L, 2L); - partitionStat1.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat1.mergeRecvMessageStat(new MessageStat(7L, 8L)); - - PartitionStat partitionStat2 = new PartitionStat(2, 14L, 13L, 12L); - partitionStat2.mergeSendMessageStat(new MessageStat(15L, 16L)); - partitionStat2.mergeRecvMessageStat(new MessageStat(17L, 18L)); - - WorkerStat workerStat = new WorkerStat(); - workerStat.add(partitionStat1); - workerStat.add(partitionStat2); - stat.increase(workerStat); - - Assert.assertEquals(18, stat.vertexCount()); - Assert.assertEquals(16, stat.edgeCount()); - - Assert.assertEquals(14L, stat.finishedVertexCount()); - - Assert.assertEquals(20L, stat.messageSendCount()); - Assert.assertEquals(22L, stat.messageSendBytes()); - - Assert.assertEquals(24L, stat.messageRecvCount()); - Assert.assertEquals(26L, stat.messageRecvBytes()); - } - - @Test - public void testReadWrite() throws IOException { - SuperstepStat stat1 = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat1.increase(partitionStat); - stat1.increase(partitionStat); - SuperstepStat stat1ReadObj = new SuperstepStat(); - UnitTestBase.assertEqualAfterWriteAndRead(stat1, stat1ReadObj); - } - - @Test - public void testEquals() { - SuperstepStat stat1 = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat1.increase(partitionStat); - stat1.increase(partitionStat); - SuperstepStat stat2 = new SuperstepStat(); - stat2.increase(partitionStat); - stat2.increase(partitionStat); - SuperstepStat stat3 = new SuperstepStat(); - - Assert.assertEquals(stat1, stat2); - Assert.assertNotEquals(stat1, stat3); - Assert.assertNotEquals(stat1, new Object()); - - stat1.inactivate(); - Assert.assertFalse(stat1.active()); - Assert.assertNotEquals(stat1, stat2); - } - - @Test - public void testHashCode() { - SuperstepStat stat1 = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat1.increase(partitionStat); - stat1.increase(partitionStat); - SuperstepStat stat2 = new SuperstepStat(); - stat2.increase(partitionStat); - stat2.increase(partitionStat); - SuperstepStat stat3 = new SuperstepStat(); - Assert.assertEquals(stat1.hashCode(), stat2.hashCode()); - Assert.assertNotEquals(stat1.hashCode(), stat3.hashCode()); - } - - @Test - public void testActive() { - SuperstepStat stat = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat.increase(partitionStat); - stat.increase(partitionStat); - Assert.assertTrue(stat.active()); - stat.inactivate(); - Assert.assertFalse(stat.active()); - } - - @Test - public void testToString() { - SuperstepStat stat = new SuperstepStat(); - PartitionStat partitionStat = new PartitionStat(1, 4L, 3L, 2L); - partitionStat.mergeSendMessageStat(new MessageStat(5L, 6L)); - partitionStat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - stat.increase(partitionStat); - String str = "SuperstepStat{\"vertexCount\":4,\"edgeCount\":3,\"" + - "finishedVertexCount\":2,\"messageSendCount\":5,\"" + - "messageSendBytes\":6,\"messageRecvCount\":7,\"" + - "messageRecvBytes\":8,\"active\":true}"; - Assert.assertEquals(str, stat.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesIdTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesIdTest.java deleted file mode 100644 index 8e450875f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/BytesIdTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class BytesIdTest extends UnitTestBase { - - @Test - public void testLongId() { - Id longId1 = BytesId.of(123L); - Id longId2 = BytesId.of(321L); - Id longId3 = BytesId.of(123L); - Id longId4 = BytesId.of(322L); - - Id longId5 = BytesId.of(-100L); - Id longId6 = BytesId.of(0L); - Id longId7 = BytesId.of(-100L); - - Id longId8 = BytesId.of(0L); - - Assert.assertEquals(IdType.LONG, longId1.idType()); - Assert.assertEquals(ValueType.ID, longId1.valueType()); - Assert.assertEquals(1, longId1.length()); - - Assert.assertEquals(IdType.LONG, longId2.idType()); - Assert.assertEquals(ValueType.ID, longId2.valueType()); - Assert.assertEquals(2, longId2.length()); - - Assert.assertEquals(new Long(123L), longId1.asObject()); - Assert.assertEquals(123L, longId1.asObject()); - - Assert.assertEquals(new Long(-100L), longId5.asObject()); - Assert.assertEquals(-100L, longId5.asObject()); - - Assert.assertTrue(longId1.compareTo(longId2) < 0); - Assert.assertTrue(longId2.compareTo(longId1) > 0); - Assert.assertEquals(0, longId1.compareTo(longId3)); - Assert.assertTrue(longId2.compareTo(longId4) < 0); - - Assert.assertTrue(longId5.compareTo(longId6) > 0); - Assert.assertTrue(longId6.compareTo(longId5) < 0); - Assert.assertEquals(0, longId5.compareTo(longId7)); - - Assert.assertEquals(0, longId8.compareTo(longId6)); - Assert.assertTrue(longId8.compareTo(longId1) < 0); - Assert.assertTrue(longId1.compareTo(longId8) > 0); - - Assert.assertEquals(longId1, longId3); - Assert.assertNotEquals(longId1, longId2); - Assert.assertEquals(longId1.hashCode(), longId3.hashCode()); - Assert.assertNotEquals(longId1.hashCode(), longId2.hashCode()); - Assert.assertEquals(longId1, BytesId.of((Long) longId1.asObject())); - } - - @Test - public void testUtf8Id() { - Id utf8Id1 = BytesId.of(Constants.EMPTY_STR); - Id utf8Id2 = BytesId.of("abc"); - Id utf8Id3 = BytesId.of("abcd"); - Id utf8Id4 = BytesId.of("abd"); - Id utf8Id5 = BytesId.of("abc"); - Id utf8Id6 = BytesId.of("100"); - Id utf8Id7 = new BytesId(); - - Assert.assertEquals(IdType.UTF8, utf8Id1.idType()); - Assert.assertEquals(ValueType.ID, utf8Id1.valueType()); - Assert.assertEquals(0, utf8Id1.length()); - - Assert.assertEquals(IdType.UTF8, utf8Id2.idType()); - Assert.assertEquals(ValueType.ID, utf8Id2.valueType()); - - Assert.assertEquals(IdType.UTF8, utf8Id3.idType()); - Assert.assertEquals(ValueType.ID, utf8Id3.valueType()); - Assert.assertEquals(4, utf8Id3.length()); - - Assert.assertEquals(IdType.UTF8, utf8Id7.idType()); - Assert.assertEquals(ValueType.ID, utf8Id7.valueType()); - Assert.assertEquals(0, utf8Id7.length()); - - Assert.assertEquals("", utf8Id1.asObject()); - Assert.assertEquals("abc", utf8Id2.asObject()); - Assert.assertEquals("abcd", utf8Id3.asObject()); - Assert.assertEquals("100", utf8Id6.asObject()); - Assert.assertEquals("", utf8Id7.asObject()); - - Assert.assertTrue(utf8Id3.compareTo(utf8Id2) > 0); - Assert.assertTrue(utf8Id2.compareTo(utf8Id3) < 0); - Assert.assertEquals(0, utf8Id2.compareTo(utf8Id2)); - Assert.assertTrue(utf8Id2.compareTo(utf8Id4) < 0); - Assert.assertTrue(utf8Id4.compareTo(utf8Id2) > 0); - - Assert.assertEquals(utf8Id2, utf8Id5); - Assert.assertNotEquals(utf8Id2, utf8Id4); - Assert.assertEquals(utf8Id1, utf8Id7); - - Assert.assertEquals(utf8Id2.hashCode(), utf8Id5.hashCode()); - Assert.assertNotEquals(utf8Id2.hashCode(), utf8Id3.hashCode()); - } - - @Test - public void testUuidId() { - UUID uuid1 = UUID.fromString("55b04935-15de-4ed8-a843-c4919f3b7cf0"); - UUID uuid2 = UUID.fromString("55b04935-15de-4ed8-a843-c4919f3b7cf1"); - Id uuidId1 = BytesId.of(uuid1); - Id uuidId2 = BytesId.of(uuid2); - Id uuidId3 = BytesId.of(uuid1); - - Assert.assertEquals(IdType.UUID, uuidId1.idType()); - Assert.assertEquals(ValueType.ID, uuidId1.valueType()); - Assert.assertEquals(19, uuidId1.length()); - - Assert.assertEquals(IdType.UUID, uuidId2.idType()); - Assert.assertEquals(ValueType.ID, uuidId2.valueType()); - Assert.assertEquals(19, uuidId2.length()); - - Assert.assertEquals(uuid1, uuidId1.asObject()); - ByteBuffer buffer = ByteBuffer.allocate(16); - buffer.putLong(uuid1.getMostSignificantBits()); - buffer.putLong(uuid1.getLeastSignificantBits()); - - Assert.assertTrue(uuidId1.compareTo(uuidId2) < 0); - Assert.assertTrue(uuidId2.compareTo(uuidId1) > 0); - Assert.assertEquals(0, uuidId1.compareTo(uuidId3)); - - Assert.assertEquals(uuidId1, uuidId3); - Assert.assertNotEquals(uuidId1, uuidId2); - Assert.assertEquals(uuidId1.hashCode(), uuidId3.hashCode()); - Assert.assertNotEquals(uuidId1.hashCode(), uuidId2.hashCode()); - } - - @Test - public void testBytesId() { - Id longId = BytesId.of(1L); - Id utf8Id = BytesId.of("1"); - UUID uuid = UUID.fromString("55b04935-15de-4ed8-a843-c4919f3b7cf0"); - Id uuidId = BytesId.of(uuid); - - Assert.assertTrue(longId.compareTo(utf8Id) < 0); - Assert.assertTrue(utf8Id.compareTo(uuidId) < 0); - Assert.assertTrue(longId.compareTo(uuidId) < 0); - - Assert.assertNotEquals(longId, utf8Id); - Assert.assertNotEquals(utf8Id, uuidId); - Assert.assertNotEquals(longId, uuidId); - } - - @Test - public void testReadWrite() throws IOException { - assertIdEqualAfterWriteAndRead(BytesId.of(100L)); - assertIdEqualAfterWriteAndRead(BytesId.of("abc")); - assertIdEqualAfterWriteAndRead(BytesId.of(UUID.randomUUID())); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactoryTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactoryTest.java deleted file mode 100644 index 6fa03fc1b..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdFactoryTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IdFactoryTest { - - @Test - public void testCreateIdFromCode() { - Assert.assertEquals(IdType.LONG, - IdFactory.createId(IdType.LONG.code()).idType()); - Assert.assertEquals(IdType.UTF8, - IdFactory.createId(IdType.UTF8.code()).idType()); - Assert.assertEquals(IdType.UUID, - IdFactory.createId(IdType.UUID.code()).idType()); - } - - @Test - public void testCreateIdFromType() { - Assert.assertEquals(IdType.LONG, - IdFactory.createId(IdType.LONG).idType()); - Assert.assertEquals(IdType.UTF8, - IdFactory.createId(IdType.UTF8).idType()); - Assert.assertEquals(IdType.UUID, - IdFactory.createId(IdType.UUID).idType()); - - Assert.assertEquals(BytesId.of(0L), IdFactory.createId(IdType.LONG)); - Assert.assertEquals(BytesId.of(Constants.EMPTY_STR), - IdFactory.createId(IdType.UTF8)); - Assert.assertEquals(BytesId.of(new UUID(0L, 0L)), - IdFactory.createId(IdType.UUID)); - } - - @Test - public void testParseId() { - UUID uuid = UUID.fromString("3b676b77-c484-4ba6-b627-8c040bc42863"); - Assert.assertEquals(IdType.LONG, IdFactory.parseId(IdType.LONG, 222).idType()); - Assert.assertEquals(IdType.UTF8, IdFactory.parseId(IdType.UTF8, "aaa222").idType()); - Assert.assertEquals(IdType.UUID, IdFactory.parseId(IdType.UUID, uuid).idType()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdTypeTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdTypeTest.java deleted file mode 100644 index 344f5bd9e..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdTypeTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.id; - -import org.apache.hugegraph.computer.core.common.SerialEnum; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IdTypeTest { - - @Test - public void testCode() { - Assert.assertEquals(1, IdType.LONG.code()); - Assert.assertEquals(2, IdType.UTF8.code()); - Assert.assertEquals(3, IdType.UUID.code()); - } - - @Test - public void testFromCode() { - for (IdType type : IdType.values()) { - Assert.assertEquals(type, SerialEnum.fromCode(IdType.class, - type.code())); - } - } - - @Test - public void testException() { - Assert.assertThrows(ComputerException.class, () -> { - SerialEnum.fromCode(IdType.class, (byte) -100); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitionerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitionerTest.java deleted file mode 100644 index 9c302d8e2..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/HashPartitionerTest.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.partition; - -import java.util.Arrays; -import java.util.Random; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.junit.Test; -import org.slf4j.Logger; - -public class HashPartitionerTest extends UnitTestBase { - - private static final Logger LOG = Log.logger(HashPartitionerTest.class); - - @Test - public void test1Worker1Partition() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1" - ); - Partitioner partitioner = config.createObject( - ComputerOptions.WORKER_PARTITIONER); - partitioner.init(config); - Id vertexId1 = BytesId.of(1L); - Id vertexId2 = BytesId.of(2L); - Id vertexId3 = BytesId.of(-1L); - Id vertexId4 = BytesId.of(-100L); - Id vertexId5 = BytesId.of(Long.MIN_VALUE); - Id vertexId6 = BytesId.of(Long.MAX_VALUE); - - int partition1 = partitioner.partitionId(vertexId1); - int partition2 = partitioner.partitionId(vertexId2); - int partition3 = partitioner.partitionId(vertexId3); - int partition4 = partitioner.partitionId(vertexId4); - int partition5 = partitioner.partitionId(vertexId5); - int partition6 = partitioner.partitionId(vertexId6); - Assert.assertEquals(0, partition1); - Assert.assertEquals(0, partition2); - Assert.assertEquals(0, partition3); - Assert.assertEquals(0, partition4); - Assert.assertEquals(0, partition5); - Assert.assertEquals(0, partition6); - - int workerId1 = partitioner.workerId(partition1); - int workerId2 = partitioner.workerId(partition2); - int workerId3 = partitioner.workerId(partition3); - int workerId4 = partitioner.workerId(partition4); - int workerId5 = partitioner.workerId(partition5); - int workerId6 = partitioner.workerId(partition6); - Assert.assertEquals(1, workerId1); - Assert.assertEquals(1, workerId2); - Assert.assertEquals(1, workerId3); - Assert.assertEquals(1, workerId4); - Assert.assertEquals(1, workerId5); - Assert.assertEquals(1, workerId6); - } - - @Test - public void test1Worker2Partition() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "2" - ); - Partitioner partitioner = config.createObject( - ComputerOptions.WORKER_PARTITIONER); - partitioner.init(config); - Id vertexId1 = BytesId.of(1L); - Id vertexId2 = BytesId.of(2L); - Id vertexId3 = BytesId.of(-1L); - Id vertexId4 = BytesId.of(-100L); - Id vertexId5 = BytesId.of(Long.MIN_VALUE); - Id vertexId6 = BytesId.of(Long.MAX_VALUE); - - int partition1 = partitioner.partitionId(vertexId1); - int partition2 = partitioner.partitionId(vertexId2); - int partition3 = partitioner.partitionId(vertexId3); - int partition4 = partitioner.partitionId(vertexId4); - int partition5 = partitioner.partitionId(vertexId5); - int partition6 = partitioner.partitionId(vertexId6); - Assert.assertTrue(partition1 < 2); - Assert.assertTrue(partition2 < 2); - Assert.assertTrue(partition3 < 2); - Assert.assertTrue(partition4 < 2); - Assert.assertTrue(partition5 < 2); - Assert.assertTrue(partition6 < 2); - - int workerId1 = partitioner.workerId(partition1); - int workerId2 = partitioner.workerId(partition2); - int workerId3 = partitioner.workerId(partition3); - int workerId4 = partitioner.workerId(partition4); - int workerId5 = partitioner.workerId(partition5); - int workerId6 = partitioner.workerId(partition6); - Assert.assertEquals(1, workerId1); - Assert.assertEquals(1, workerId2); - Assert.assertEquals(1, workerId3); - Assert.assertEquals(1, workerId4); - Assert.assertEquals(1, workerId5); - Assert.assertEquals(1, workerId6); - } - - @Test - public void test1Worker3Partition() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "3" - ); - Partitioner partitioner = config.createObject( - ComputerOptions.WORKER_PARTITIONER); - partitioner.init(config); - Id vertexId1 = BytesId.of(1L); - Id vertexId2 = BytesId.of(2L); - Id vertexId3 = BytesId.of(-1L); - Id vertexId4 = BytesId.of(-100L); - Id vertexId5 = BytesId.of(Long.MIN_VALUE); - Id vertexId6 = BytesId.of(Long.MAX_VALUE); - - int partition1 = partitioner.partitionId(vertexId1); - int partition2 = partitioner.partitionId(vertexId2); - int partition3 = partitioner.partitionId(vertexId3); - int partition4 = partitioner.partitionId(vertexId4); - int partition5 = partitioner.partitionId(vertexId5); - int partition6 = partitioner.partitionId(vertexId6); - Assert.assertTrue(partition1 < 3); - Assert.assertTrue(partition2 < 3); - Assert.assertTrue(partition3 < 3); - Assert.assertTrue(partition4 < 3); - Assert.assertTrue(partition5 < 3); - Assert.assertTrue(partition6 < 3); - - int workerId1 = partitioner.workerId(partition1); - int workerId2 = partitioner.workerId(partition2); - int workerId3 = partitioner.workerId(partition3); - int workerId4 = partitioner.workerId(partition4); - int workerId5 = partitioner.workerId(partition5); - int workerId6 = partitioner.workerId(partition6); - Assert.assertEquals(1, workerId1); - Assert.assertEquals(1, workerId2); - Assert.assertEquals(1, workerId3); - Assert.assertEquals(1, workerId4); - Assert.assertEquals(1, workerId5); - Assert.assertEquals(1, workerId6); - } - - @Test - public void test3Worker1Partition() { - Assert.assertThrows(ComputerException.class, () -> { - UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_WORKERS_COUNT, "3", - ComputerOptions.JOB_PARTITIONS_COUNT, "1" - ); - }, e -> { - Assert.assertTrue(e.getMessage().contains( - "The partitions count must be >= workers count")); - }); - } - - @Test - public void testDist() { - int workerCount = 2; - int partitionCount = 10; - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_WORKERS_COUNT, Integer.toString(workerCount), - ComputerOptions.JOB_PARTITIONS_COUNT, - Integer.toString(partitionCount) - ); - Partitioner partitioner = config.createObject( - ComputerOptions.WORKER_PARTITIONER); - partitioner.init(config); - int[] partitionStat = new int[partitionCount]; - int[] workerStat = new int[workerCount]; - Random random = new Random(); - int hashTimes = 1024; - for (int i = 0; i < hashTimes; i++) { - int partitionId = partitioner.partitionId( - BytesId.of(random.nextLong())); - partitionStat[partitionId]++; - int workerId = partitioner.workerId(partitionId); - workerStat[--workerId]++; - } - LOG.info("Partition distribution: {}", Arrays.toString(partitionStat)); - LOG.info("Worker distribution: {}", Arrays.toString(workerStat)); - Assert.assertEquals(hashTimes, Arrays.stream(partitionStat).sum()); - Assert.assertEquals(hashTimes, Arrays.stream(workerStat).sum()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStatTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStatTest.java deleted file mode 100644 index e5a580821..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/partition/PartitionStatTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.partition; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class PartitionStatTest { - - @Test - public void testConstructor() { - PartitionStat stat1 = new PartitionStat(); - - Assert.assertEquals(0, stat1.partitionId()); - Assert.assertEquals(0L, stat1.vertexCount()); - Assert.assertEquals(0L, stat1.edgeCount()); - Assert.assertEquals(0L, stat1.finishedVertexCount()); - Assert.assertEquals(0L, stat1.messageSendCount()); - Assert.assertEquals(0L, stat1.messageSendBytes()); - Assert.assertEquals(0L, stat1.messageRecvCount()); - Assert.assertEquals(0L, stat1.messageRecvBytes()); - - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - stat2.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat2.mergeRecvMessageStat(new MessageStat(7L, 8L)); - - Assert.assertEquals(1, stat2.partitionId()); - Assert.assertEquals(4L, stat2.vertexCount()); - Assert.assertEquals(3L, stat2.edgeCount()); - Assert.assertEquals(2L, stat2.finishedVertexCount()); - Assert.assertEquals(5L, stat2.messageSendCount()); - Assert.assertEquals(6L, stat2.messageSendBytes()); - Assert.assertEquals(7L, stat2.messageRecvCount()); - Assert.assertEquals(8L, stat2.messageRecvBytes()); - } - - @Test - public void testReadWrite() throws IOException { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat1ReadObj = new PartitionStat(); - UnitTestBase.assertEqualAfterWriteAndRead(stat1, stat1ReadObj); - - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - stat2.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat2.mergeRecvMessageStat(new MessageStat(7L, 8L)); - - PartitionStat stat2ReadObj = new PartitionStat(); - UnitTestBase.assertEqualAfterWriteAndRead(stat2, stat2ReadObj); - } - - @Test - public void testMerge() throws IOException { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - stat1.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat1.mergeRecvMessageStat(new MessageStat(7L, 8L)); - - Assert.assertEquals(1L, stat1.vertexCount()); - Assert.assertEquals(2L, stat1.edgeCount()); - Assert.assertEquals(5L, stat1.messageSendCount()); - Assert.assertEquals(6L, stat1.messageSendBytes()); - Assert.assertEquals(7L, stat1.messageRecvCount()); - Assert.assertEquals(8L, stat1.messageRecvBytes()); - - stat1.mergeSendMessageStat(new MessageStat(15L, 16L)); - stat1.mergeRecvMessageStat(new MessageStat(17L, 18L)); - Assert.assertEquals(20L, stat1.messageSendCount()); - Assert.assertEquals(22L, stat1.messageSendBytes()); - Assert.assertEquals(24L, stat1.messageRecvCount()); - Assert.assertEquals(26L, stat1.messageRecvBytes()); - - MessageStat messageStat = new MessageStat(100L, 400L); - stat1.mergeSendMessageStat(messageStat); - stat1.mergeRecvMessageStat(messageStat); - Assert.assertEquals(1L, stat1.vertexCount()); - Assert.assertEquals(2L, stat1.edgeCount()); - Assert.assertEquals(120L, stat1.messageSendCount()); - Assert.assertEquals(422L, stat1.messageSendBytes()); - Assert.assertEquals(124L, stat1.messageRecvCount()); - Assert.assertEquals(426L, stat1.messageRecvBytes()); - } - - @Test - public void testEquals() { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(0, 1L, 2L, 0L); - - PartitionStat stat3 = new PartitionStat(1, 4L, 3L, 2L); - stat3.mergeSendMessageStat(new MessageStat(5L, 6L)); - - PartitionStat stat4 = new PartitionStat(1, 4L, 3L, 2L); - stat4.mergeRecvMessageStat(new MessageStat(5L, 6L)); - - PartitionStat stat30 = new PartitionStat(1, 4L, 3L, 2L); - stat30.mergeSendMessageStat(new MessageStat(5L, 6L)); - - PartitionStat stat40 = new PartitionStat(1, 4L, 3L, 2L); - stat40.mergeRecvMessageStat(new MessageStat(5L, 6L)); - - Assert.assertEquals(stat1, stat2); - Assert.assertNotEquals(stat1, stat3); - Assert.assertNotEquals(stat1, stat4); - Assert.assertNotEquals(stat3, stat4); - Assert.assertNotEquals(stat1, new Object()); - Assert.assertEquals(stat3, stat30); - Assert.assertEquals(stat4, stat40); - } - - @Test - public void testHashCode() { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - stat2.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat2.mergeRecvMessageStat(new MessageStat(7L, 8L)); - Assert.assertEquals(Integer.hashCode(0), stat1.hashCode()); - Assert.assertEquals(Integer.hashCode(1), stat2.hashCode()); - } - - @Test - public void testToString() { - PartitionStat stat = new PartitionStat(1, 4L, 3L, 2L); - stat.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat.mergeRecvMessageStat(new MessageStat(7L, 8L)); - String str = "PartitionStat{\"partitionId\":1,\"vertexCount\":4,\"" + - "edgeCount\":3,\"finishedVertexCount\":2," + - "\"messageSendCount\":5,\"messageSendBytes\":6," + - "\"messageRecvCount\":7,\"messageRecvBytes\":8}"; - Assert.assertEquals(str, stat.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValueTest.java deleted file mode 100644 index 7651f2b9f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/DoubleValueTest.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DoubleValueTest extends UnitTestBase { - - @Test - public void testType() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(Double.MIN_VALUE); - - Assert.assertEquals(ValueType.DOUBLE, value1.valueType()); - Assert.assertEquals(ValueType.DOUBLE, value2.valueType()); - } - - @Test - public void testValue() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - - Assert.assertEquals(0d, value1.value(), 0d); - Assert.assertEquals(1234.56d, value2.value(), 0d); - Assert.assertEquals(Double.MIN_VALUE, value3.value(), 0d); - Assert.assertEquals(Double.MAX_VALUE, value4.value(), 0d); - - value3.value(Double.MAX_VALUE); - Assert.assertEquals(Double.MAX_VALUE, value3.value(), 0d); - Assert.assertEquals(value3, value4); - - DoubleValue value5 = new DoubleValue(value2.value()); - Assert.assertEquals(value2, value5); - } - - @Test - public void testNumber() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - - Assert.assertEquals(0, value1.intValue()); - Assert.assertEquals(0L, value1.longValue()); - Assert.assertEquals(0.0f, value1.floatValue(), 0.0f); - Assert.assertEquals(0.0d, value1.doubleValue(), 0.0d); - - Assert.assertEquals(1234, value2.intValue()); - Assert.assertEquals(1234L, value2.longValue()); - Assert.assertEquals(1234.56f, value2.floatValue(), 0.0f); - Assert.assertEquals(1234.56d, value2.doubleValue(), 0.0d); - - Assert.assertEquals(0, value3.intValue()); - Assert.assertEquals(0L, value3.longValue()); - Assert.assertEquals(0.0f, value3.floatValue(), 0.0f); - Assert.assertEquals(4.9E-324d, value3.doubleValue(), 0.0d); - - Assert.assertEquals(2147483647, value4.intValue()); - Assert.assertEquals(9223372036854775807L, value4.longValue()); - Assert.assertEquals(Float.POSITIVE_INFINITY, value4.floatValue(), 0.0f); - Assert.assertEquals(1.7976931348623157E308d, value4.doubleValue(), 0d); - } - - @Test - public void testString() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - - Assert.assertEquals("0.0", value1.string()); - Assert.assertEquals("1234.56", value2.string()); - Assert.assertEquals("4.9E-324", value3.string()); - Assert.assertEquals("1.7976931348623157E308", value4.string()); - } - - @Test - public void testAssign() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - - Assert.assertEquals(0d, value1.value(), 0d); - value1.assign(value2); - Assert.assertEquals(1234.56d, value1.value(), 0d); - Assert.assertEquals(1234.56d, value2.value(), 0d); - - value2.assign(value3); - Assert.assertEquals(1234.56d, value1.value(), 0d); - Assert.assertEquals(Double.MIN_VALUE, value2.value(), 0d); - - value2.assign(value4); - Assert.assertEquals(1234.56d, value1.value(), 0d); - Assert.assertEquals(Double.MAX_VALUE, value2.value(), 0d); - Assert.assertEquals(Double.MIN_VALUE, value3.value(), 0d); - Assert.assertEquals(Double.MAX_VALUE, value4.value(), 0d); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new IntValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(IntValue) to DoubleValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new FloatValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0.0'(FloatValue) to " + - "DoubleValue", e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to DoubleValue", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - - DoubleValue copy = value1.copy(); - Assert.assertEquals(0d, value1.value(), 0d); - Assert.assertEquals(0d, copy.value(), 0d); - - copy.assign(value2); - Assert.assertEquals(1234.56d, copy.value(), 0d); - Assert.assertEquals(0d, value1.value(), 0d); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(new DoubleValue(0.0d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-0.0d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(0.1d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-0.1d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(1.1d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-1.1d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(1.123456789d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-1.123456789d)); - assertValueEqualAfterWriteAndRead(new DoubleValue( - 987654321.123456789d)); - assertValueEqualAfterWriteAndRead(new DoubleValue( - -987654321.123456789d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(127d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-127d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(128d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-128d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(256d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-256d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(32767d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-32767d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(32768d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-32768d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(65536d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(-65535d)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Integer.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Integer.MAX_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Long.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Long.MAX_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Double.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Double.MAX_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Double.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new DoubleValue(Double.MAX_VALUE)); - } - - @Test - public void testCompare() { - DoubleValue value1 = new DoubleValue(123d); - DoubleValue value2 = new DoubleValue(123d); - DoubleValue value3 = new DoubleValue(321d); - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value1.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - - Assert.assertGt(0, value1.compareTo(NullValue.get())); - Assert.assertGt(0, value1.compareTo(new IntValue(123))); - Assert.assertGt(0, value1.compareTo(new FloatValue(123))); - Assert.assertLt(0, value1.compareTo(new StringValue("123"))); - } - - @Test - public void testEquals() { - DoubleValue value1 = new DoubleValue(); - Assert.assertTrue(value1.equals(value1)); - Assert.assertTrue(value1.equals(new DoubleValue(0d))); - Assert.assertFalse(value1.equals(new DoubleValue(1))); - Assert.assertFalse(value1.equals(new DoubleValue(1.0d))); - Assert.assertFalse(value1.equals(null)); - } - - @Test - public void testHashCode() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - - Assert.assertEquals(Double.hashCode(0d), - value1.hashCode()); - Assert.assertEquals(Double.hashCode(1234.56d), - value2.hashCode()); - Assert.assertEquals(Double.hashCode(Double.MIN_VALUE), - value3.hashCode()); - Assert.assertEquals(Double.hashCode(Double.MAX_VALUE), - value4.hashCode()); - } - - @Test - public void testToString() { - DoubleValue value1 = new DoubleValue(); - DoubleValue value2 = new DoubleValue(1234.56d); - DoubleValue value3 = new DoubleValue(Double.MIN_VALUE); - DoubleValue value4 = new DoubleValue(Double.MAX_VALUE); - DoubleValue value5 = new DoubleValue(-Double.MAX_VALUE); - - Assert.assertEquals("0.0", value1.toString()); - Assert.assertEquals("1234.56", value2.toString()); - Assert.assertEquals("4.9E-324", value3.toString()); - Assert.assertEquals("1.7976931348623157E308", value4.toString()); - Assert.assertEquals("-1.7976931348623157E308", value5.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListListTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListListTest.java deleted file mode 100644 index 5d637c0d6..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListListTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.commons.collections.ListUtils; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.Lists; - -public class IdListListTest extends UnitTestBase { - - @Test - public void test() { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - - IdList listValue1 = new IdList(); - IdList listValue2 = new IdList(); - IdListList listListValue1 = new IdListList(); - IdListList listListValue2 = new IdListList(); - - listValue1.add(longId1); - listValue2.add(longId2); - listListValue1.add(listValue1); - listListValue2.add(listValue1); - - Assert.assertEquals(ValueType.ID_LIST_LIST, - listListValue1.valueType()); - Assert.assertEquals(ValueType.ID_LIST, - listListValue1.elemType()); - Assert.assertTrue(ListUtils.isEqualList( - Lists.newArrayList(listValue1), - listListValue1.values())); - Assert.assertEquals(listListValue1, listListValue2); - - listValue2.add(longId2); - listListValue2.add(listValue2); - Assert.assertTrue(ListUtils.isEqualList( - Lists.newArrayList(listValue1, listValue2), - listListValue2.values())); - Assert.assertNotEquals(listListValue1, listListValue2); - Assert.assertEquals(ListUtils.hashCodeForList( - Lists.newArrayList(listValue1)), - listListValue1.hashCode()); - } - - @Test - public void testReadWrite() throws IOException { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - IdList listValue = new IdList(); - listValue.add(longId1); - listValue.add(longId2); - - IdListList oldValue = new IdListList(); - oldValue.add(listValue); - assertValueEqualAfterWriteAndRead(oldValue); - } - - @Test - public void testCompare() { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - IdList listValue = new IdList(); - listValue.add(longId1); - listValue.add(longId2); - - IdListList value1 = new IdListList(); - value1.add(listValue); - IdListList value2 = new IdListList(); - value2.add(listValue); - IdListList value3 = new IdListList(); - value3.add(listValue); - value3.add(listValue); - - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value1.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueListTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueListTest.java deleted file mode 100644 index 9fbc90457..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueListTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.commons.collections.ListUtils; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.Lists; - -public class IdValueListTest extends UnitTestBase { - - @Test - public void test() { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - IdList listValue1 = new IdList(); - IdList listValue2 = new IdList(); - - listValue1.add(longId1); - listValue2.add(longId1); - - Assert.assertEquals(ValueType.ID_LIST, listValue1.valueType()); - Assert.assertEquals(ValueType.ID, listValue1.elemType()); - Assert.assertTrue(ListUtils.isEqualList( - Lists.newArrayList(longId1), - listValue1.values())); - Assert.assertEquals(listValue1, listValue2); - - listValue2.add(longId2); - Assert.assertTrue(ListUtils.isEqualList( - Lists.newArrayList(longId1, longId2), - listValue2.values())); - Assert.assertNotEquals(listValue1, listValue2); - Assert.assertEquals(ListUtils.hashCodeForList( - Lists.newArrayList(longId1)), - listValue1.hashCode()); - } - - @Test - public void testReadWrite() throws IOException { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - IdList oldValue = new IdList(); - oldValue.add(longId1); - oldValue.add(longId2); - assertValueEqualAfterWriteAndRead(oldValue); - } - - @Test - public void testCompare() { - Id longId1 = BytesId.of(100L); - Id longId2 = BytesId.of(200L); - IdList value1 = new IdList(); - value1.add(longId1); - IdList value2 = new IdList(); - value2.add(longId1); - IdList value3 = new IdList(); - value3.add(longId1); - value3.add(longId2); - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value1.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueTest.java deleted file mode 100644 index 9d0a7f340..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdValueTest.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IdValueTest extends UnitTestBase { - - @Test - public void testType() { - Value value1 = new BytesId(); - Value value2 = new BytesId(IdType.LONG, new byte[]{1, 2, 3}); - Value value3 = BytesId.of(1L); - Value value4 = BytesId.of("1"); - - Assert.assertEquals(ValueType.ID, value1.valueType()); - Assert.assertEquals(ValueType.ID, value2.valueType()); - Assert.assertEquals(ValueType.ID, value3.valueType()); - Assert.assertEquals(ValueType.ID, value4.valueType()); - } - - @Test - public void testAssign() { - Value value1 = new BytesId(); - Value value2 = new BytesId(IdType.LONG, new byte[]{1, 2, 3}); - Value value3 = new BytesId(IdType.LONG, new byte[]{'1', '2', '3'}); - - value1.assign(value2); - Assert.assertEquals(value2, value1); - - value2.assign(value3); - Assert.assertEquals(value3, value2); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new FloatValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0.0'(FloatValue) to BytesId", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new LongValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(LongValue) to BytesId", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to BytesId", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - Value value1 = new BytesId(IdType.LONG, new byte[]{1, 2, 3}); - Value value2 = new BytesId(IdType.LONG, new byte[]{'1', '2', '3'}); - - Value copy = value1.copy(); - Assert.assertEquals(value1, copy); - - copy.assign(value2); - Assert.assertEquals(value2, copy); - } - - @Test - public void testValue() { - Value value1 = BytesId.of(1234L); - Value value2 = BytesId.of("1234"); - Value value3 = BytesId.of("12345"); - Value value4 = new BytesId(); - - Assert.assertEquals(1234L, value1.value()); - Assert.assertEquals("1234", value2.value()); - Assert.assertEquals("12345", value3.value()); - Assert.assertEquals("", value4.value()); - } - - @Test - public void testString() { - Value value1 = BytesId.of(1234L); - Value value2 = BytesId.of("1234"); - Value value3 = BytesId.of("12345"); - Value value4 = new BytesId(); - - Assert.assertEquals("1234", value1.string()); - Assert.assertEquals("1234", value2.string()); - Assert.assertEquals("12345", value3.string()); - Assert.assertEquals("", value4.string()); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(BytesId.of("text")); - assertValueEqualAfterWriteAndRead(BytesId.of("text2")); - assertValueEqualAfterWriteAndRead(BytesId.of(123456L)); - assertValueEqualAfterWriteAndRead(BytesId.of(new UUID(0L, 0L))); - } - - @Test - public void testReadWriteUtf8IdValue() throws IOException { - Value value1 = BytesId.of("long id"); - Value value2 = BytesId.of("short"); - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - value1.write(bao); - value2.write(bao); - bytes = bao.toByteArray(); - } - Value value3 = BytesId.of(Constants.EMPTY_STR); - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - value3.read(bai); - Assert.assertEquals(value1, value3); - value3.read(bai); - Assert.assertEquals(value2, value3); - } - } - - @Test - public void testCompare() { - Value value1 = BytesId.of(123L); - Value value2 = BytesId.of(123L); - Value value3 = BytesId.of(321L); - Value value4 = BytesId.of(322L); - - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value2.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - Assert.assertLt(0, value3.compareTo(value4)); - - Value value5 = BytesId.of("123"); - Value value6 = BytesId.of("456"); - - Assert.assertLt(0, value5.compareTo(value6)); - Assert.assertGt(0, value6.compareTo(value5)); - - Assert.assertGt(0, value5.compareTo(value1)); - Assert.assertGt(0, value6.compareTo(value1)); - - Assert.assertLt(0, value1.compareTo(value5)); - Assert.assertLt(0, value1.compareTo(value6)); - - Assert.assertGt(0, value1.compareTo(NullValue.get())); - Assert.assertGt(0, value1.compareTo(new BooleanValue())); - Assert.assertGt(0, value1.compareTo(new IntValue(123))); - Assert.assertGt(0, value1.compareTo(new FloatValue(123))); - Assert.assertGt(0, value1.compareTo(new DoubleValue(123))); - Assert.assertGt(0, value1.compareTo(new StringValue("123"))); - Assert.assertLt(0, value1.compareTo(new ListValue<>(ValueType.INT))); - } - - @Test - public void testEquals() { - Value value1 = new BytesId(); - Assert.assertEquals(value1, value1); - Assert.assertEquals(value1, new BytesId()); - Assert.assertNotEquals(value1, - new BytesId(IdType.LONG, new byte[] {1})); - - Assert.assertNotEquals(value1, new IntValue(1)); - Assert.assertNotEquals(null, value1); - } - - @Test - public void testHashCode() { - Value value1 = new BytesId(); - Value value2 = new BytesId(IdType.LONG, new byte[]{1, 2, 3}); - Value value3 = new BytesId(IdType.LONG, new byte[]{'1', '2', '3'}); - - Assert.assertNotEquals(value1.hashCode(), value2.hashCode()); - Assert.assertNotEquals(value1.hashCode(), value3.hashCode()); - Assert.assertNotEquals(value2.hashCode(), value3.hashCode()); - } - - @Test - public void testToString() { - Value value1 = new BytesId(); - Value value2 = BytesId.of(123); - Value value3 = BytesId.of("123"); - - Assert.assertEquals("", value1.toString()); - Assert.assertEquals("123", value2.toString()); - Assert.assertEquals("123", value3.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValueTest.java deleted file mode 100644 index 68e5ea892..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/IntValueTest.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IntValueTest extends UnitTestBase { - - @Test - public void testType() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(Integer.MIN_VALUE); - - Assert.assertEquals(ValueType.INT, intValue1.valueType()); - Assert.assertEquals(ValueType.INT, intValue2.valueType()); - } - - @Test - public void testValue() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals(0, intValue1.value()); - Assert.assertEquals(123456, intValue2.value()); - Assert.assertEquals(Integer.MIN_VALUE, intValue3.value()); - Assert.assertEquals(Integer.MAX_VALUE, intValue4.value()); - - intValue3.value(Integer.MAX_VALUE); - Assert.assertEquals(Integer.MAX_VALUE, intValue3.value()); - Assert.assertEquals(intValue3, intValue4); - - IntValue intValue5 = new IntValue(intValue2.value()); - Assert.assertEquals(intValue2, intValue5); - } - - @Test - public void testNumber() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals(0, intValue1.intValue()); - Assert.assertEquals(0L, intValue1.longValue()); - Assert.assertEquals(0.0f, intValue1.floatValue(), 0.0f); - Assert.assertEquals(0.0d, intValue1.doubleValue(), 0.0d); - - Assert.assertEquals(123456, intValue2.intValue()); - Assert.assertEquals(123456L, intValue2.longValue()); - Assert.assertEquals(123456f, intValue2.floatValue(), 0.0f); - Assert.assertEquals(123456d, intValue2.doubleValue(), 0.0d); - - Assert.assertEquals(-2147483648, intValue3.intValue()); - Assert.assertEquals(-2147483648L, intValue3.longValue()); - Assert.assertEquals(-2147483648f, intValue3.floatValue(), 0.0f); - Assert.assertEquals(-2147483648d, intValue3.doubleValue(), 0.0d); - - Assert.assertEquals(2147483647, intValue4.intValue()); - Assert.assertEquals(2147483647L, intValue4.longValue()); - Assert.assertEquals(2147483647f, intValue4.floatValue(), 0.0f); - Assert.assertEquals(2147483647d, intValue4.doubleValue(), 0.0d); - } - - @Test - public void testString() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals("0", intValue1.string()); - Assert.assertEquals("123456", intValue2.string()); - Assert.assertEquals("-2147483648", intValue3.string()); - Assert.assertEquals("2147483647", intValue4.string()); - } - - @Test - public void testAssign() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals(0, intValue1.value()); - intValue1.assign(intValue2); - Assert.assertEquals(123456, intValue1.value()); - Assert.assertEquals(123456, intValue2.value()); - - intValue2.assign(intValue3); - Assert.assertEquals(123456, intValue1.value()); - Assert.assertEquals(Integer.MIN_VALUE, intValue2.value()); - - intValue2.assign(intValue4); - Assert.assertEquals(123456, intValue1.value()); - Assert.assertEquals(Integer.MAX_VALUE, intValue2.value()); - Assert.assertEquals(Integer.MIN_VALUE, intValue3.value()); - Assert.assertEquals(Integer.MAX_VALUE, intValue4.value()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new FloatValue(); - intValue2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0.0'(FloatValue) to IntValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new LongValue(); - intValue2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(LongValue) to IntValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - intValue2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to IntValue", - e.getMessage()); - }); - } - - @Test - public void testAssignWithSubClass() { - IntValue intValue1 = new IntValue(123456); - Assert.assertEquals(123456, intValue1.value()); - - SubIntValue subIntValue = new SubIntValue(13579); - Assert.assertEquals(13579, subIntValue.value()); - Assert.assertEquals("SubIntValue:13579", subIntValue.toString()); - intValue1.assign(subIntValue); - Assert.assertEquals(13579, intValue1.value()); - Assert.assertEquals("13579", intValue1.toString()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - subIntValue.assign(intValue1); - }, e -> { - Assert.assertContains("Can't assign '13579'(IntValue) to " + - "SubIntValue", e.getMessage()); - }); - } - - @Test - public void testCopy() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - - IntValue copy = intValue1.copy(); - Assert.assertEquals(0, intValue1.value()); - Assert.assertEquals(0, copy.value()); - - copy.assign(intValue2); - Assert.assertEquals(123456, copy.value()); - Assert.assertEquals(0, intValue1.value()); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(new IntValue()); - assertValueEqualAfterWriteAndRead(new IntValue(123456)); - assertValueEqualAfterWriteAndRead(new IntValue(Integer.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new IntValue(Integer.MAX_VALUE)); - } - - @Test - public void testCompare() { - IntValue intValue1 = new IntValue(123); - IntValue intValue2 = new IntValue(123); - IntValue intValue3 = new IntValue(321); - Assert.assertEquals(0, intValue1.compareTo(intValue2)); - Assert.assertLt(0, intValue1.compareTo(intValue3)); - Assert.assertGt(0, intValue3.compareTo(intValue1)); - - Assert.assertGt(0, intValue1.compareTo(NullValue.get())); - Assert.assertGt(0, intValue1.compareTo(new BooleanValue())); - Assert.assertLt(0, intValue1.compareTo(new LongValue(123))); - Assert.assertLt(0, intValue1.compareTo(new FloatValue(123))); - Assert.assertLt(0, intValue1.compareTo(new DoubleValue(123))); - Assert.assertLt(0, intValue1.compareTo(new StringValue("123"))); - } - - @Test - public void testEquals() { - IntValue intValue1 = new IntValue(); - Assert.assertTrue(intValue1.equals(intValue1)); - Assert.assertTrue(intValue1.equals(new IntValue(0))); - Assert.assertFalse(intValue1.equals(new IntValue(1))); - Assert.assertFalse(intValue1.equals(new FloatValue(1f))); - Assert.assertFalse(intValue1.equals(null)); - } - - @Test - public void testHashCode() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals(Integer.hashCode(0), - intValue1.hashCode()); - Assert.assertEquals(Integer.hashCode(123456), - intValue2.hashCode()); - Assert.assertEquals(Integer.hashCode(Integer.MIN_VALUE), - intValue3.hashCode()); - Assert.assertEquals(Integer.hashCode(Integer.MAX_VALUE), - intValue4.hashCode()); - } - - @Test - public void testToString() { - IntValue intValue1 = new IntValue(); - IntValue intValue2 = new IntValue(123456); - IntValue intValue3 = new IntValue(Integer.MIN_VALUE); - IntValue intValue4 = new IntValue(Integer.MAX_VALUE); - - Assert.assertEquals("0", intValue1.toString()); - Assert.assertEquals("123456", intValue2.toString()); - Assert.assertEquals("-2147483648", intValue3.toString()); - Assert.assertEquals("2147483647", intValue4.toString()); - } - - private static class SubIntValue extends IntValue { - - private static final long serialVersionUID = 279936857611008457L; - - public SubIntValue(int value) { - super(value); - } - - @Override - public String toString() { - return "SubIntValue:" + super.toString(); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValueTest.java deleted file mode 100644 index 99c61288c..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ListValueTest.java +++ /dev/null @@ -1,458 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class ListValueTest extends UnitTestBase { - - @Test - public void testType() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(ValueType.LIST_VALUE, value1.valueType()); - Assert.assertEquals(ValueType.LIST_VALUE, value2.valueType()); - } - - @Test - public void testElemType() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(ValueType.INT, value1.elemType()); - Assert.assertEquals(ValueType.FLOAT, value2.elemType()); - } - - @Test - public void testAdd() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(0, value1.size()); - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - Assert.assertEquals(3, value1.size()); - - Assert.assertEquals(0, value2.size()); - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - Assert.assertEquals(2, value2.size()); - - ListValue> value3 = new ListValue<>(ValueType.FLOAT); - value3.add(new FloatValue(301f)); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value3.add(new IntValue(303)); - }, e -> { - Assert.assertContains("Invalid value '303' with type int", - e.getMessage()); - Assert.assertContains("expect element with type float", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value3.add(null); - }, e -> { - Assert.assertContains("Can't add null to list", - e.getMessage()); - }); - - ListValue> value4 = new ListValue<>(ValueType.UNKNOWN); - Assert.assertEquals(ValueType.UNKNOWN, value4.elemType()); - value4.add(new IntValue(303)); - Assert.assertEquals(ValueType.INT, value4.elemType()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value4.add(new FloatValue(303f)); - }, e -> { - Assert.assertContains("expect element with type int", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value4.add(null); - }, e -> { - Assert.assertContains("Can't add null to list", - e.getMessage()); - }); - } - - @Test - public void testGet() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(0, value1.size()); - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - Assert.assertEquals(3, value1.size()); - - Assert.assertEquals(0, value2.size()); - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - Assert.assertEquals(2, value2.size()); - - Assert.assertEquals(101, value1.get(0).value()); - Assert.assertEquals(102, value1.get(1).value()); - Assert.assertEquals(103, value1.get(2).value()); - - Assert.assertEquals(201f, value2.get(0).value(), 0f); - Assert.assertEquals(202f, value2.get(1).value(), 0f); - - Assert.assertThrows(IndexOutOfBoundsException.class, () -> { - value1.get(3); - }); - - Assert.assertThrows(IndexOutOfBoundsException.class, () -> { - value2.get(3); - }); - } - - @Test - public void testGetFirst() { - ListValue value = new ListValue<>(ValueType.INT); - - Assert.assertThrows(NoSuchElementException.class, () -> { - value.getFirst(); - }, e -> { - Assert.assertContains("The list is empty", e.getMessage()); - }); - - value.add(new IntValue(100)); - Assert.assertEquals(100, value.getFirst().value()); - - value.add(new IntValue(200)); - Assert.assertEquals(100, value.getFirst().value()); - } - - @Test - public void testGetLast() { - ListValue value1 = new ListValue<>(ValueType.INT); - - Assert.assertThrows(NoSuchElementException.class, () -> { - value1.getLast(); - }, e -> { - Assert.assertContains("The list is empty", e.getMessage()); - }); - - value1.add(new IntValue(100)); - Assert.assertEquals(100, value1.getLast().value()); - - value1.add(new IntValue(200)); - Assert.assertEquals(200, value1.getLast().value()); - } - - @Test - public void testContains() { - ListValue value1 = new ListValue<>(ValueType.INT); - value1.add(new IntValue(100)); - value1.add(new IntValue(200)); - Assert.assertTrue(value1.contains(new IntValue(100))); - Assert.assertTrue(value1.contains(new IntValue(200))); - Assert.assertFalse(value1.contains(new IntValue(300))); - } - - @Test - public void testSize() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(0, value1.size()); - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - Assert.assertEquals(3, value1.size()); - - Assert.assertEquals(0, value2.size()); - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - Assert.assertEquals(2, value2.size()); - } - - @Test - public void testClear() { - ListValue value = new ListValue<>(ValueType.INT); - value.add(new IntValue(101)); - value.add(new IntValue(102)); - value.add(new IntValue(103)); - Assert.assertEquals(3, value.size()); - - value.clear(); - Assert.assertEquals(0, value.size()); - } - - @Test - public void testValues() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(ImmutableList.of(), value1.values()); - Assert.assertEquals(ImmutableList.of(), value2.values()); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertEquals(ImmutableList.of(new IntValue(101), - new IntValue(102), - new IntValue(103)), - value1.values()); - - Assert.assertEquals(ImmutableList.of(new FloatValue(201f), - new FloatValue(202f)), - value2.values()); - } - - @Test - public void testValue() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertEquals(ImmutableList.of(101, 102, 103), value1.value()); - Assert.assertEquals(ImmutableList.of(201.0f, 202.0f), value2.value()); - } - - @Test - public void testString() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertEquals("[101, 102, 103]", value1.string()); - Assert.assertEquals("[201.0, 202.0]", value2.string()); - } - - @Test - public void testAssign() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - ListValue value3 = new ListValue<>(ValueType.INT); - ListValue value4 = new ListValue<>(ValueType.FLOAT); - Assert.assertEquals(ImmutableList.of(), value3.values()); - Assert.assertEquals(ImmutableList.of(), value4.values()); - - Assert.assertNotEquals(value1, value3); - value3.assign(value1); - Assert.assertEquals(value1, value3); - - /* - * NOTE: updating value1 lead to value3 to change - * TODO: should keep value1 unmodifiable and let value3 modifiable? - */ - Assert.assertEquals(3, value3.size()); - value1.add(new IntValue(104)); - Assert.assertEquals(4, value1.size()); - Assert.assertEquals(4, value3.size()); - - Assert.assertNotEquals(value2, value4); - value4.assign(value2); - Assert.assertEquals(value2, value4); - - Assert.assertThrows(UnsupportedOperationException.class, () -> { - value4.add(new FloatValue(203f)); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value3.assign(value2); - }, e -> { - Assert.assertContains("Can't assign list to list", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value4.assign(value1); - }, e -> { - Assert.assertContains("Can't assign list to list", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new IntValue(); - value3.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(IntValue) to ListValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new LongValue(); - value4.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(LongValue) to ListValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to ListValue", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - ListValue value1 = new ListValue<>(ValueType.INT); - value1.add(new IntValue(100)); - value1.add(new IntValue(200)); - - ListValue value2 = value1.copy(); - Assert.assertEquals(value1, value2); - - value2.add(new IntValue(300)); - - Assert.assertEquals(3, value2.size()); - Assert.assertEquals(100, value2.get(0).value()); - Assert.assertEquals(200, value2.get(1).value()); - Assert.assertEquals(300, value2.get(2).value()); - - Assert.assertEquals(2, value1.size()); - Assert.assertEquals(100, value1.get(0).value()); - Assert.assertEquals(200, value1.get(1).value()); - } - - @Test - public void testReadWrite() throws IOException { - ListValue oldValue = new ListValue<>(ValueType.INT); - assertValueEqualAfterWriteAndRead(oldValue); - - oldValue.add(new IntValue(100)); - oldValue.add(new IntValue(200)); - assertValueEqualAfterWriteAndRead(oldValue); - } - - @Test - public void testCompare() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.INT); - value1.add(new IntValue(100)); - value2.add(new IntValue(100)); - ListValue value3 = new ListValue<>(ValueType.INT); - value3.add(new IntValue(100)); - value3.add(new IntValue(200)); - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value1.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - - Assert.assertGt(0, value1.compareTo(NullValue.get())); - Assert.assertGt(0, value1.compareTo(new BooleanValue())); - Assert.assertGt(0, value1.compareTo(new IntValue(123))); - Assert.assertGt(0, value1.compareTo(new FloatValue(123))); - Assert.assertGt(0, value1.compareTo(new DoubleValue(123))); - Assert.assertGt(0, value1.compareTo(new StringValue("123"))); - Assert.assertGt(0, value1.compareTo(BytesId.of("123"))); - } - - @Test - public void testEquals() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertTrue(value1.equals(value1)); - Assert.assertTrue(value2.equals(value2)); - - Assert.assertTrue(value1.equals(value1.copy())); - Assert.assertTrue(value2.equals(value2.copy())); - - Assert.assertFalse(value1.equals(value2)); - Assert.assertFalse(value2.equals(value1)); - - Assert.assertFalse(value1.equals(new IntValue(1))); - Assert.assertFalse(value1.equals(null)); - } - - @Test - public void testHashCode() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals(1, value1.hashCode()); - Assert.assertEquals(1, value2.hashCode()); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertEquals(130117, value1.hashCode()); - Assert.assertEquals(1763771329, value2.hashCode()); - } - - @Test - public void testToString() { - ListValue value1 = new ListValue<>(ValueType.INT); - ListValue value2 = new ListValue<>(ValueType.FLOAT); - - Assert.assertEquals("[]", value1.toString()); - Assert.assertEquals("[]", value2.toString()); - - value1.add(new IntValue(101)); - value1.add(new IntValue(102)); - value1.add(new IntValue(103)); - - value2.add(new FloatValue(201f)); - value2.add(new FloatValue(202f)); - - Assert.assertEquals("[101, 102, 103]", value1.toString()); - Assert.assertEquals("[201.0, 202.0]", value2.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValueTest.java deleted file mode 100644 index aba80b3ab..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/LongValueTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class LongValueTest extends UnitTestBase { - - @Test - public void testType() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(Long.MIN_VALUE); - - Assert.assertEquals(ValueType.LONG, value1.valueType()); - Assert.assertEquals(ValueType.LONG, value2.valueType()); - } - - @Test - public void testValue() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals(0L, value1.value()); - Assert.assertEquals(123456L, value2.value()); - Assert.assertEquals(Long.MIN_VALUE, value3.value()); - Assert.assertEquals(Long.MAX_VALUE, value4.value()); - - value3.value(Long.MAX_VALUE); - Assert.assertEquals(Long.MAX_VALUE, value3.value()); - Assert.assertEquals(value3, value4); - - LongValue value5 = new LongValue(value2.value()); - Assert.assertEquals(value2, value5); - } - - @Test - public void testNumber() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals(0, value1.intValue()); - Assert.assertEquals(0L, value1.longValue()); - Assert.assertEquals(0.0f, value1.floatValue(), 0.0f); - Assert.assertEquals(0.0d, value1.doubleValue(), 0.0d); - - Assert.assertEquals(123456, value2.intValue()); - Assert.assertEquals(123456L, value2.longValue()); - Assert.assertEquals(123456f, value2.floatValue(), 0.0f); - Assert.assertEquals(123456d, value2.doubleValue(), 0.0d); - - Assert.assertEquals(0, value3.intValue()); - Assert.assertEquals(-9223372036854775808L, value3.longValue()); - Assert.assertEquals(-9223372036854775808f, value3.floatValue(), 0.0f); - Assert.assertEquals(-9223372036854775808d, value3.doubleValue(), 0.0d); - - Assert.assertEquals(-1, value4.intValue()); - Assert.assertEquals(9223372036854775807L, value4.longValue()); - Assert.assertEquals(9223372036854775807f, value4.floatValue(), 0.0f); - Assert.assertEquals(9223372036854775807d, value4.doubleValue(), 0.0d); - } - - @Test - public void testString() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals("0", value1.string()); - Assert.assertEquals("123456", value2.string()); - Assert.assertEquals("-9223372036854775808", value3.string()); - Assert.assertEquals("9223372036854775807", value4.string()); - } - - @Test - public void testAssign() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals(0L, value1.value()); - value1.assign(value2); - Assert.assertEquals(123456L, value1.value()); - Assert.assertEquals(123456L, value2.value()); - - value2.assign(value3); - Assert.assertEquals(123456L, value1.value()); - Assert.assertEquals(Long.MIN_VALUE, value2.value()); - - value2.assign(value4); - Assert.assertEquals(123456L, value1.value()); - Assert.assertEquals(Long.MAX_VALUE, value2.value()); - Assert.assertEquals(Long.MIN_VALUE, value3.value()); - Assert.assertEquals(Long.MAX_VALUE, value4.value()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new FloatValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0.0'(FloatValue) to LongValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new IntValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(IntValue) to LongValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to LongValue", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - - LongValue copy = value1.copy(); - Assert.assertEquals(0L, value1.value()); - Assert.assertEquals(0L, copy.value()); - - copy.assign(value2); - Assert.assertEquals(123456L, copy.value()); - Assert.assertEquals(0L, value1.value()); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(new LongValue()); - assertValueEqualAfterWriteAndRead(new LongValue(123456L)); - assertValueEqualAfterWriteAndRead(new LongValue(Long.MIN_VALUE)); - assertValueEqualAfterWriteAndRead(new LongValue(Long.MAX_VALUE)); - } - - @Test - public void testCompare() { - LongValue value1 = new LongValue(123L); - LongValue value2 = new LongValue(123L); - LongValue value3 = new LongValue(321L); - Assert.assertEquals(0, value1.compareTo(value2)); - Assert.assertLt(0, value1.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - - Assert.assertGt(0, value1.compareTo(NullValue.get())); - Assert.assertGt(0, value1.compareTo(new BooleanValue())); - Assert.assertGt(0, value1.compareTo(new IntValue(123))); - Assert.assertLt(0, value1.compareTo(new FloatValue(123))); - Assert.assertLt(0, value1.compareTo(new DoubleValue(123))); - Assert.assertLt(0, value1.compareTo(new StringValue("123"))); - } - - @Test - public void testEquals() { - LongValue value1 = new LongValue(); - Assert.assertTrue(value1.equals(value1)); - Assert.assertTrue(value1.equals(new LongValue(0L))); - Assert.assertFalse(value1.equals(new LongValue(1L))); - Assert.assertFalse(value1.equals(new FloatValue(1f))); - Assert.assertFalse(value1.equals(null)); - } - - @Test - public void testHashCode() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals(Long.hashCode(0L), - value1.hashCode()); - Assert.assertEquals(Long.hashCode(123456L), - value2.hashCode()); - Assert.assertEquals(Long.hashCode(Long.MIN_VALUE), - value3.hashCode()); - Assert.assertEquals(Long.hashCode(Long.MAX_VALUE), - value4.hashCode()); - } - - @Test - public void testToString() { - LongValue value1 = new LongValue(); - LongValue value2 = new LongValue(123456L); - LongValue value3 = new LongValue(Long.MIN_VALUE); - LongValue value4 = new LongValue(Long.MAX_VALUE); - - Assert.assertEquals("0", value1.toString()); - Assert.assertEquals("123456", value2.toString()); - Assert.assertEquals("-9223372036854775808", value3.toString()); - Assert.assertEquals("9223372036854775807", value4.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValueTest.java deleted file mode 100644 index 119a0d786..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/NullValueTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import java.io.IOException; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class NullValueTest extends UnitTestBase { - - @Test - public void testType() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - Assert.assertEquals(ValueType.NULL, value1.valueType()); - Assert.assertEquals(ValueType.NULL, value2.valueType()); - } - - @Test - public void testValue() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - Assert.assertEquals(value1, value2); - Assert.assertEquals(value1.value(), value2.value()); - Assert.assertNull(value1.value()); - Assert.assertNull(value2.value()); - } - - @Test - public void testString() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - Assert.assertEquals("", value1.string()); - Assert.assertEquals("", value2.string()); - } - - @Test - public void testAssign() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - value1.assign(value2); - Assert.assertEquals(value1, value2); - - value2.assign(value2); - Assert.assertEquals(value1, value2); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new IntValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(IntValue) to NullValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new LongValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0'(LongValue) to NullValue", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to NullValue", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - NullValue copy = value1.copy(); - Assert.assertEquals(value1, copy); - - copy.assign(value2); - Assert.assertEquals(value2, copy); - Assert.assertEquals(value1, copy); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(NullValue.get()); - } - - @Test - public void testCompare() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - Assert.assertEquals(0, value1.compareTo(value2)); - - Assert.assertLt(0, value1.compareTo(new BooleanValue())); - Assert.assertLt(0, value1.compareTo(new IntValue())); - Assert.assertLt(0, value1.compareTo(new StringValue(""))); - } - - @Test - public void testEquals() { - NullValue value1 = NullValue.get(); - - Assert.assertTrue(value1.equals(value1)); - Assert.assertTrue(value1.equals(NullValue.get())); - - Assert.assertFalse(value1.equals(new IntValue(1))); - Assert.assertFalse(value1.equals(null)); - } - - @Test - public void testHashCode() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - Assert.assertEquals(0, value1.hashCode()); - Assert.assertEquals(0, value2.hashCode()); - } - - @Test - public void testToString() { - NullValue value1 = NullValue.get(); - NullValue value2 = NullValue.get(); - - Assert.assertEquals("", value1.toString()); - Assert.assertEquals("", value2.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValueTest.java deleted file mode 100644 index 5d96160ff..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/StringValueTest.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.graph.value; - -import static org.apache.hugegraph.computer.suite.unit.UnitTestBase.assertValueEqualAfterWriteAndRead; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class StringValueTest { - - @Test - public void testType() { - StringValue value1 = new StringValue("t1"); - StringValue value2 = new StringValue("t2"); - - Assert.assertEquals(ValueType.STRING, value1.valueType()); - Assert.assertEquals(ValueType.STRING, value2.valueType()); - } - - @Test - public void testValue() { - StringValue value1 = new StringValue("t1"); - StringValue value2 = new StringValue("t1"); - - Assert.assertEquals("t1", value1.value()); - Assert.assertEquals(value1, value2); - } - - @Test - public void testString() { - StringValue value1 = new StringValue(); - StringValue value2 = new StringValue("t1"); - StringValue value3 = new StringValue("t1"); - StringValue value4 = new StringValue("test"); - - Assert.assertEquals("", value1.string()); - Assert.assertEquals("t1", value2.string()); - Assert.assertEquals("t1", value3.string()); - Assert.assertEquals("test", value4.string()); - } - - @Test - public void testAssign() { - StringValue value1 = new StringValue(); - StringValue value2 = new StringValue("test"); - value1.assign(value2); - - Assert.assertEquals("test", value1.value()); - Assert.assertEquals("test", value2.value()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - Value v = new FloatValue(); - value2.assign(v); - }, e -> { - Assert.assertContains("Can't assign '0.0'(FloatValue) to " + - "StringValue", e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - value2.assign(null); - }, e -> { - Assert.assertContains("Can't assign null to StringValue", - e.getMessage()); - }); - } - - @Test - public void testCopy() { - StringValue value1 = new StringValue("test"); - - StringValue copy = value1.copy(); - Assert.assertEquals("test", value1.value()); - Assert.assertEquals(value1, copy); - - StringValue value2 = new StringValue("assign test"); - copy.assign(value2); - Assert.assertEquals("assign test", copy.value()); - Assert.assertEquals(value2, copy); - Assert.assertNotEquals(value1, copy); - } - - @Test - public void testReadWrite() throws IOException { - assertValueEqualAfterWriteAndRead(new StringValue()); - assertValueEqualAfterWriteAndRead(new StringValue("test")); - } - - @Test - public void testCompare() { - StringValue value1 = new StringValue("123"); - StringValue value2 = new StringValue("abc"); - StringValue value3 = new StringValue("bcd"); - - Assert.assertLt(0, value1.compareTo(value2)); - Assert.assertLt(0, value2.compareTo(value3)); - Assert.assertGt(0, value3.compareTo(value1)); - - Assert.assertGt(0, value1.compareTo(NullValue.get())); - Assert.assertGt(0, value1.compareTo(new BooleanValue())); - Assert.assertGt(0, value1.compareTo(new IntValue(123))); - Assert.assertGt(0, value1.compareTo(new FloatValue(123))); - Assert.assertGt(0, value1.compareTo(new DoubleValue(123))); - Assert.assertLt(0, value1.compareTo(BytesId.of("123"))); - } - - @Test - public void testEquals() { - StringValue value1 = new StringValue("test"); - StringValue value2 = new StringValue("test"); - - Assert.assertEquals(value1, value2); - - DoubleValue value3 = new DoubleValue(1.1); - Assert.assertFalse(value1.equals(value3)); - } - - @Test - public void testHashCode() { - StringValue value1 = new StringValue(); - StringValue value2 = new StringValue("test"); - - Assert.assertEquals(Constants.EMPTY_STR.hashCode(), - value1.hashCode()); - Assert.assertEquals("test".hashCode(), - value2.hashCode()); - } - - @Test - public void testToString() { - StringValue value1 = new StringValue(); - StringValue value2 = new StringValue("test"); - - Assert.assertEquals(Constants.EMPTY_STR, - value1.toString()); - Assert.assertEquals("test", - value2.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/FileInputSplitTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/FileInputSplitTest.java deleted file mode 100644 index 2635e73d9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/FileInputSplitTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.input.loader.FileInputSplit; -import org.apache.hugegraph.loader.constant.ElemType; -import org.apache.hugegraph.loader.mapping.InputStruct; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; -import org.mockito.Mockito; - -public class FileInputSplitTest { - - @Test - public void testConstructor() { - InputStruct inputStruct = Mockito.mock(InputStruct.class); - FileInputSplit split = new FileInputSplit(ElemType.VERTEX, inputStruct, - "/tmp/test"); - Assert.assertEquals("/tmp/test", split.path()); - Assert.assertEquals(inputStruct, split.struct()); - Assert.assertSame(ElemType.VERTEX, split.type()); - } - - @Test - public void testEquals() { - InputStruct inputStruct = Mockito.mock(InputStruct.class); - FileInputSplit split1 = new FileInputSplit(ElemType.VERTEX, inputStruct, - "/tmp/test"); - FileInputSplit split2 = new FileInputSplit(ElemType.VERTEX, inputStruct, - "/tmp/test"); - Assert.assertEquals(split1, split1); - Assert.assertEquals(split1, split2); - - Assert.assertNotEquals(split1, null); - Assert.assertNotEquals(split1, new Object()); - - Assert.assertEquals(InputSplit.END_SPLIT, InputSplit.END_SPLIT); - Assert.assertNotEquals(InputSplit.END_SPLIT, split1); - } - - @Test - public void testHashCode() { - InputStruct inputStruct = Mockito.mock(InputStruct.class); - FileInputSplit split1 = new FileInputSplit(ElemType.VERTEX, inputStruct, - "/tmp/test"); - FileInputSplit split2 = new FileInputSplit(ElemType.VERTEX, inputStruct, - "/tmp/test"); - Assert.assertEquals(split1.hashCode(), split2.hashCode()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverterTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverterTest.java deleted file mode 100644 index cc58f2a3d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/HugeConverterTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.NullValue; -import org.apache.hugegraph.computer.core.graph.value.StringValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class HugeConverterTest extends UnitTestBase { - - @Test - public void testConvertId() { - Assert.assertThrows(IllegalArgumentException.class, - () -> HugeConverter.convertId(null)); - Assert.assertEquals(BytesId.of(1), HugeConverter.convertId((byte) 1)); - Assert.assertEquals(BytesId.of(1), HugeConverter.convertId((short) 1)); - Assert.assertEquals(BytesId.of(1), HugeConverter.convertId(1)); - Assert.assertEquals(BytesId.of(1L), HugeConverter.convertId(1L)); - Assert.assertEquals(BytesId.of("abc"), HugeConverter.convertId("abc")); - UUID uuid = UUID.randomUUID(); - Assert.assertEquals(BytesId.of(uuid), HugeConverter.convertId(uuid)); - - Assert.assertThrows(ComputerException.class, - () -> HugeConverter.convertId(true)); - Assert.assertThrows(ComputerException.class, - () -> HugeConverter.convertId(new byte[0])); - } - - @Test - public void testConvertValue() { - Assert.assertEquals(NullValue.get(), HugeConverter.convertValue(null)); - Assert.assertEquals(new BooleanValue(true), - HugeConverter.convertValue(true)); - Assert.assertEquals(new IntValue(1), HugeConverter.convertValue(1)); - Assert.assertEquals(new LongValue(-1L), - HugeConverter.convertValue(-1L)); - Assert.assertEquals(new FloatValue(0.999F), - HugeConverter.convertValue(0.999F)); - Assert.assertEquals(new DoubleValue(-0.001D), - HugeConverter.convertValue(-0.001D)); - Assert.assertEquals(new StringValue("test"), - HugeConverter.convertValue("test")); - ListValue listValue = new ListValue<>(ValueType.INT); - listValue.add(new IntValue(1)); - listValue.add(new IntValue(2)); - List list = ImmutableList.of(1, 2); - Assert.assertEquals(listValue, HugeConverter.convertValue(list)); - - ListValue> nestListValue = new ListValue<>( - ValueType.LIST_VALUE); - ListValue subListValue1 = new ListValue<>(ValueType.LONG); - subListValue1.add(new LongValue(1L)); - subListValue1.add(new LongValue(2L)); - ListValue subListValue2 = new ListValue<>(ValueType.LONG); - subListValue2.add(new LongValue(3L)); - subListValue2.add(new LongValue(4L)); - nestListValue.add(subListValue1); - nestListValue.add(subListValue2); - List> nestList = ImmutableList.of( - ImmutableList.of(1L, 2L), - ImmutableList.of(3L, 4L)); - Assert.assertEquals(nestListValue, - HugeConverter.convertValue(nestList)); - - Assert.assertThrows(ComputerException.class, - () -> HugeConverter.convertValue(new byte[0])); - } - - @Test - public void testConvertProperties() { - Map rawProperties = new HashMap<>(); - rawProperties.put("null-value", null); - rawProperties.put("boolean-value", true); - rawProperties.put("int-value", 1); - rawProperties.put("long-value", 2L); - rawProperties.put("float-value", 0.3F); - rawProperties.put("double-value", 0.4D); - rawProperties.put("list-value", ImmutableList.of(1, 2)); - - Properties properties = graphFactory().createProperties(); - properties.put("null-value", NullValue.get()); - properties.put("boolean-value", new BooleanValue(true)); - properties.put("int-value", new IntValue(1)); - properties.put("long-value", new LongValue(2L)); - properties.put("float-value", new FloatValue(0.3F)); - properties.put("double-value", new DoubleValue(0.4D)); - ListValue listValue = new ListValue<>(ValueType.INT); - listValue.add(new IntValue(1)); - listValue.add(new IntValue(2)); - properties.put("list-value", listValue); - - Assert.assertEquals(properties, - HugeConverter.convertProperties(rawProperties)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitDataTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitDataTest.java deleted file mode 100644 index d334a31fe..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitDataTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class InputSplitDataTest extends UnitTestBase { - - private static MockMasterInputManager masterInputManager; - private static MockWorkerInputManager workerInputManager; - - @BeforeClass - public static void setup() { - Config config = context().config(); - masterInputManager = new MockMasterInputManager(); - masterInputManager.init(config); - - MockRpcClient rpcClient = new MockRpcClient( - masterInputManager.handler()); - workerInputManager = new MockWorkerInputManager(rpcClient); - workerInputManager.init(config); - } - - @AfterClass - public static void teardown() { - masterInputManager.close(context().config()); - workerInputManager.close(context().config()); - } - - @Test - public void testMasterCreateAndPollInputSplits() { - MasterInputHandler masterInputHandler = masterInputManager.handler(); - long count = masterInputHandler.createVertexInputSplits(); - Assert.assertGt(0L, count); - InputSplit split; - while (!(split = masterInputHandler.nextVertexInputSplit()).equals( - InputSplit.END_SPLIT)) { - Assert.assertNotNull(split.start()); - Assert.assertNotNull(split.end()); - count--; - } - Assert.assertEquals(InputSplit.END_SPLIT, split); - Assert.assertEquals(0, count); - - count = masterInputHandler.createEdgeInputSplits(); - Assert.assertGt(0L, count); - while (!(split = masterInputHandler.nextEdgeInputSplit()).equals( - InputSplit.END_SPLIT)) { - Assert.assertNotNull(split.start()); - Assert.assertNotNull(split.end()); - count--; - } - Assert.assertEquals(InputSplit.END_SPLIT, split); - Assert.assertEquals(0, count); - } - - @Test - public void testWorkerFetchAndLoadEdgeInputSplits() { - MasterInputHandler masterInputHandler = masterInputManager.handler(); - - long count = masterInputHandler.createVertexInputSplits(); - Assert.assertGt(0L, count); - while (workerInputManager.fetchNextVertexInputSplit()) { - Assert.assertGte(0, workerInputManager.loadVertexInputSplitData()); - count--; - } - Assert.assertEquals(0, count); - - count = masterInputHandler.createEdgeInputSplits(); - Assert.assertGt(0L, count); - while (workerInputManager.fetchNextEdgeInputSplit()) { - Assert.assertGte(0, workerInputManager.loadEdgeInputSplitData()); - count--; - } - Assert.assertEquals(0, count); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitTest.java deleted file mode 100644 index 70c7f8663..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputSplitTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class InputSplitTest { - - @Test - public void testConstructor() { - InputSplit split = new InputSplit("0", "100"); - Assert.assertEquals("0", split.start()); - Assert.assertEquals("100", split.end()); - } - - @Test - public void testEquals() { - InputSplit split1 = new InputSplit("0", "100"); - InputSplit split2 = new InputSplit("0", "100"); - Assert.assertEquals(split1, split1); - Assert.assertEquals(split1, split2); - - Assert.assertNotEquals(split1, null); - Assert.assertNotEquals(split1, new Object()); - - Assert.assertEquals(InputSplit.END_SPLIT, InputSplit.END_SPLIT); - Assert.assertNotEquals(InputSplit.END_SPLIT, split1); - } - - @Test - public void testHashCode() { - InputSplit split = new InputSplit("0", "100"); - Assert.assertEquals(51074, split.hashCode()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputTestSuite.java deleted file mode 100644 index d83e9023d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputTestSuite.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - InputSplitTest.class, - FileInputSplitTest.class, - InputSplitDataTest.class, - HugeConverterTest.class -}) -public class InputTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockMasterInputManager.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockMasterInputManager.java deleted file mode 100644 index baf181ad5..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockMasterInputManager.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; - -public class MockMasterInputManager implements Manager { - - private InputSplitFetcher fetcher; - private MasterInputHandler handler; - - public MockMasterInputManager() { - this.fetcher = null; - this.handler = null; - } - - @Override - public String name() { - return "mock_master_input"; - } - - @Override - public void init(Config config) { - this.fetcher = InputSourceFactory.createInputSplitFetcher(config); - this.handler = new MasterInputHandler(this.fetcher); - } - - @Override - public void close(Config config) { - if (this.fetcher != null) { - this.fetcher.close(); - } - } - - public InputSplitFetcher fetcher() { - return this.fetcher; - } - - public MasterInputHandler handler() { - return this.handler; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockRpcClient.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockRpcClient.java deleted file mode 100644 index 4b6cf0514..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockRpcClient.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.rpc.InputSplitRpcService; - -public class MockRpcClient implements InputSplitRpcService { - - private final MasterInputHandler masterInputHandler; - - public MockRpcClient(MasterInputHandler masterInputHandler) { - this.masterInputHandler = masterInputHandler; - } - - @Override - public InputSplit nextVertexInputSplit() { - return this.masterInputHandler.nextVertexInputSplit(); - } - - @Override - public InputSplit nextEdgeInputSplit() { - return this.masterInputHandler.nextEdgeInputSplit(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockWorkerInputManager.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockWorkerInputManager.java deleted file mode 100644 index e9b6cda93..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/MockWorkerInputManager.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.input; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.manager.Manager; -import org.apache.hugegraph.structure.graph.Edge; -import org.apache.hugegraph.structure.graph.Vertex; -import org.apache.hugegraph.testutil.Assert; - -public class MockWorkerInputManager implements Manager { - - private final MockRpcClient rpcClient; - private GraphFetcher fetcher; - private InputSplit vertexInputSplit; - private InputSplit edgeInputSplit; - - public MockWorkerInputManager(MockRpcClient rpcClient) { - this.rpcClient = rpcClient; - this.fetcher = null; - this.vertexInputSplit = null; - this.edgeInputSplit = null; - } - - @Override - public String name() { - return "mock_worker_input"; - } - - @Override - public void init(Config config) { - this.fetcher = InputSourceFactory.createGraphFetcher(config, - this.rpcClient); - this.vertexInputSplit = null; - this.edgeInputSplit = null; - } - - @Override - public void close(Config config) { - this.fetcher.close(); - } - - public boolean fetchNextVertexInputSplit() { - // Send request to master - this.vertexInputSplit = this.fetcher.nextVertexInputSplit(); - return this.vertexInputSplit != null && - !this.vertexInputSplit.equals(InputSplit.END_SPLIT); - } - - public int loadVertexInputSplitData() { - if (this.vertexInputSplit == null) { - throw new ComputerException("Should fetch vertex input split " + - "meta before load"); - } - if (this.vertexInputSplit.equals(InputSplit.END_SPLIT)) { - throw new ComputerException("Can't load vertex input split data, " + - "because it has been exhausted"); - } - VertexFetcher vertexFetcher = this.fetcher.vertexFetcher(); - vertexFetcher.prepareLoadInputSplit(this.vertexInputSplit); - int count = 0; - while (vertexFetcher.hasNext()) { - Vertex vertex = vertexFetcher.next(); - // Write vertex to buffer - Assert.assertNotNull(vertex); - count++; - } - return count; - } - - public boolean fetchNextEdgeInputSplit() { - // Send request to master - this.edgeInputSplit = this.fetcher.nextEdgeInputSplit(); - return this.edgeInputSplit != null && - !this.edgeInputSplit.equals(InputSplit.END_SPLIT); - } - - public int loadEdgeInputSplitData() { - if (this.edgeInputSplit == null) { - throw new ComputerException("Should fetch edge input split meta " + - "before load"); - } - if (this.edgeInputSplit.equals(InputSplit.END_SPLIT)) { - throw new ComputerException("Can't load edge input split data, " + - "because it has been exhausted"); - } - EdgeFetcher edgeFetcher = this.fetcher.edgeFetcher(); - edgeFetcher.prepareLoadInputSplit(this.edgeInputSplit); - int count = 0; - while (edgeFetcher.hasNext()) { - Edge edge = edgeFetcher.next(); - // Write edge to buffer - Assert.assertNotNull(edge); - count++; - } - return count; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileTest.java deleted file mode 100644 index ab4805edd..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedFileTest.java +++ /dev/null @@ -1,751 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.EOFException; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.util.Random; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.junit.Test; -import org.slf4j.Logger; - -public class BufferedFileTest { - - private static final Logger LOG = Log.logger( - BufferedFileTest.class); - private static final int BUFFER_SIZE = 128; - - @Test - public void testConstructor() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = new BufferedFileOutput(file)) { - Assert.assertEquals(0, output.position()); - } - try (BufferedFileInput input = new BufferedFileInput(file)) { - Assert.assertEquals(0, input.position()); - } - Assert.assertThrows(IllegalArgumentException.class, () -> { - new BufferedFileOutput(new RandomAccessFile(file, - Constants.FILE_MODE_WRITE), - 1); - }, e -> { - Assert.assertContains("The parameter bufferSize must be >= 8", - e.getMessage()); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - new BufferedFileInput(new RandomAccessFile(file, - Constants.FILE_MODE_READ), - 1); - }, e -> { - Assert.assertContains("The parameter bufferSize must be >= 8", - e.getMessage()); - }); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testInt() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - } - try (BufferedFileInput input = createInput(file)) { - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteIntWithPosition() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - output.writeFixedInt(0, 1); - output.writeFixedInt(12, 2); - // Next buffer - output.writeFixedInt(200, 3); - // Previous buffer - output.writeFixedInt(100, 4); - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - // Current buffer - output.writeInt(5); - output.writeFixedInt(output.position() - Integer.BYTES, 6); - } - - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i < 256; i++) { - int expectValue = i - 128; - int position = i * 4; - int readValue = input.readInt(); - if (position != 0 && position != 12 && - position != 200 && position != 100 && - position != 1000) { - Assert.assertEquals(expectValue, readValue); - } - } - input.seek(0); - Assert.assertEquals(1, input.readInt()); - input.seek(12); - Assert.assertEquals(2, input.readInt()); - input.seek(200); - Assert.assertEquals(3, input.readInt()); - input.seek(100); - Assert.assertEquals(4, input.readInt()); - input.seek(256 * 4); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - Assert.assertEquals(6, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testByteArray() throws IOException { - int loopTimes = 129; - byte[] array = UnitTestBase.randomBytes(10); - File file = createTempFile(); - try (BufferedFileOutput output = createOutput(file)) { - for (int i = 0; i < loopTimes; i++) { - output.write(array); - } - } - - byte[] arrayRead = new byte[10]; - try (DataInputStream dis = new DataInputStream( - new FileInputStream(file))) { - for (int i = 0; i < loopTimes; i++) { - dis.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - } - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i < loopTimes; i++) { - input.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - } - FileUtils.deleteQuietly(file); - } - - @Test - public void testLargeByteArray() throws IOException { - int loopTimes = 10; - int arraySize = 1280; // large than buffer size - byte[] array = UnitTestBase.randomBytes(arraySize); - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = 0; i < loopTimes; i++) { - output.write(array); - } - } - - byte[] arrayRead = new byte[arraySize]; - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i < loopTimes; i++) { - input.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testInputSeekAtRandom() throws IOException { - int size = 128; - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.writeInt(i); - } - for (int i = size; i >= 0; i--) { - output.seek(i * 4); - output.writeInt(size - i); - } - } - Random random = new Random(1001); - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i <= 10; i++) { - long position = 4 * random.nextInt(size); - input.seek(position); - Assert.assertEquals(size - position / 4, input.readInt()); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testInputSeekOutRange() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - output.writeInt(1); - output.writeInt(2); - output.writeInt(3); - } - - try (BufferedFileInput input = createInput(file)) { - Assert.assertEquals(1, input.readInt()); - input.skip(4); - Assert.assertThrows(EOFException.class, () -> { - input.seek(13); // Out of range - }, e -> { - Assert.assertContains("reach the end of file", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testOutputSeekOutRange() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - output.seek(100L); - output.writeInt(1); - output.seek(511L); - output.writeInt(2); - } - - try (BufferedFileInput input = createInput(file)) { - input.seek(100L); - Assert.assertEquals(1, input.readInt()); - input.seek(511L); - Assert.assertEquals(2, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testSeekAtEnd() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - // Overwrite last 2 elements - output.seek(256 * 4 - 8); - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - } - - try (BufferedFileInput input = createInput(file)) { - for (int i = -128; i <= 125; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - input.seek(input.position() - 8); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testSkip() throws IOException { - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeByte(i); - } - output.skip(4L); - output.writeByte(127); - output.skip(4L); - output.skip(1280L); - output.writeByte(1); - Assert.assertThrows(IllegalArgumentException.class, () -> { - output.skip(-1); - }, e -> { - e.getMessage().contains("The parameter bytesToSkip must " + - "be >= 0"); - }); - } - - try (BufferedFileInput input = createInput(file)) { - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readByte()); - } - input.skip(4); - Assert.assertEquals(127, input.readByte()); - input.skip(4); - input.skip(1280); - Assert.assertEquals((byte) 1, input.readByte()); - Assert.assertThrows(IllegalArgumentException.class, () -> { - input.skip(-1); - }, e -> { - e.getMessage().contains("The parameter bytesToSkip must " + - "be >= 0"); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testPosition() throws IOException { - int size = 1024; - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - Assert.assertEquals(i * 4, output.position()); - output.writeInt(i); - } - } - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i < size; i++) { - Assert.assertEquals(i * 4, input.position()); - Assert.assertEquals(i, input.readInt()); - } - - Random random = new Random(); - for (int i = 0; i < 10; i++) { - long position = 4 * random.nextInt(size); - input.seek(position); - Assert.assertEquals(position / 4, input.readInt()); - Assert.assertEquals(position + 4, input.position()); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testAvailable() throws IOException { - int size = 1024; - File file = createTempFile(); - try { - try (BufferedFileOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.writeInt(i); - } - } - try (BufferedFileInput input = createInput(file)) { - for (int i = 0; i < size; i++) { - Assert.assertEquals(4096 - i * 4, input.available()); - Assert.assertEquals(i, input.readInt()); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testLongPerformanceUnsafe() throws IOException { - long size = 1024; - long startTime; - long endTime; - long time; - File file = new File("long-unsafe.bin"); - try { - startTime = System.currentTimeMillis(); - try (BufferedFileOutput output = new BufferedFileOutput(file)) { - for (long i = 0; i < size / 8; i++) { - output.writeLong(i); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Write {} bytes use BufferedFileOutput.writeLong " + - "takes {} ms", size, time); - - startTime = System.currentTimeMillis(); - try (BufferedFileInput input = new BufferedFileInput(file)) { - for (long i = 0; i < size / 8; i++) { - input.readLong(); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use BufferedFileInput.readLong " + - "takes {} ms", size, time); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testLongPerformanceNormal() throws IOException { - long size = 1024; - long startTime; - long endTime; - long time; - - File file = new File("long-data.bin"); - try { - startTime = System.currentTimeMillis(); - try (DataOutputStream output = new DataOutputStream( - new BufferedOutputStream( - new FileOutputStream(file)))) { - for (long i = 0; i < size / 8; i++) { - output.writeLong(i); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Write {} bytes use DataOutputStream.writeLong" + - " takes {} ms", size, time); - - startTime = System.currentTimeMillis(); - try (DataInputStream input = new DataInputStream( - new BufferedInputStream( - new FileInputStream(file)))) { - for (long i = 0; i < size / 8; i++) { - input.readLong(); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use DataInputStream.readLong " + - "takes {} ms", size, time); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testIntPerformanceIntUnsafe() throws IOException { - int size = 1024; - long startTime; - long endTime; - File file = new File("int-unsafe.bin"); - try { - startTime = System.currentTimeMillis(); - try (BufferedFileOutput output = new BufferedFileOutput(file)) { - for (int i = 0; i < size / 4; i++) { - output.writeInt(i); - } - } - endTime = System.currentTimeMillis(); - long time = endTime - startTime; - LOG.info("Write {} bytes use BufferedFileOutput.writeInt " + - "takes {} ms", size, time); - - startTime = System.currentTimeMillis(); - try (BufferedFileInput input = new BufferedFileInput(file)) { - for (int i = 0; i < size / 4; i++) { - input.readInt(); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use BufferedFileInput.readInt " + - "takes {} ms", size, time); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testIntPerformanceNormal() throws IOException { - int size = 1024; - long startTime; - long endTime; - long time; - File dataFile = new File("int-data-out.bin"); - try { - startTime = System.currentTimeMillis(); - try (DataOutputStream output = new DataOutputStream( - new BufferedOutputStream( - new FileOutputStream(dataFile)))) { - for (int i = 0; i < size / 4; i++) { - output.writeInt(i); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Write {} bytes use DataOutputStream.writeInt " + - "takes {} ms", size, time); - - startTime = System.currentTimeMillis(); - try (DataInputStream input = new DataInputStream( - new BufferedInputStream( - new FileInputStream(dataFile)))) { - for (int i = 0; i < size / 4; i++) { - input.readInt(); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use DataInputStream.readInt " + - "takes {} ms", size, time); - } finally { - FileUtils.deleteQuietly(dataFile); - } - } - - @Test - public void testByteArrayPerformanceUnsafe() throws IOException { - int size = 1024; - long startTime; - long endTime; - long time; - byte[] writeArray = UnitTestBase.randomBytes(16); - byte[] readArray = new byte[16]; - - File file = new File("int-unsafe-out.bin"); - try { - startTime = System.currentTimeMillis(); - try (BufferedFileOutput output = new BufferedFileOutput(file)) { - for (int i = 0; i < size / writeArray.length; i++) { - output.write(writeArray); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Write {} bytes use BufferedFileOutput" + - ".write takes {} ms", size, time); - - startTime = System.currentTimeMillis(); - try (BufferedFileInput input = new BufferedFileInput(file)) { - for (int i = 0; i < size / readArray.length; i++) { - input.readFully(readArray); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use BufferedFileInput.readFully " + - "takes {} ms", size, time); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testByteArrayPerformanceNormal() throws IOException { - int size = 1024; - long startTime; - long endTime; - long time; - byte[] writeArray = UnitTestBase.randomBytes(16); - byte[] readArray = new byte[16]; - File dataFile = new File("int-data-out.bin"); - try { - startTime = System.currentTimeMillis(); - try (DataOutputStream output = new DataOutputStream( - new BufferedOutputStream( - new FileOutputStream(dataFile)))) { - for (int i = 0; i < size / writeArray.length; i++) { - output.write(writeArray); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Write {} bytes use DataOutputStream.write takes {} ms", - size, time); - - startTime = System.currentTimeMillis(); - try (DataInputStream input = new DataInputStream( - new BufferedInputStream( - new FileInputStream(dataFile)))) { - for (int i = 0; i < size / writeArray.length; i++) { - input.readFully(readArray); - } - } - endTime = System.currentTimeMillis(); - time = endTime - startTime; - LOG.info("Read {} bytes use DataInputStream.readFully takes {} ms", - size, time); - } finally { - FileUtils.deleteQuietly(dataFile); - } - } - - @Test - public void testCompare() throws IOException { - // BufferedFileInput compare to BufferedFileInput - File file1 = createTempFile(); - File file2 = createTempFile(); - try (BufferedFileInput input1 = inputByString(file1, "apple"); - BufferedFileInput input2 = inputByString(file2, "banana")) { - int result = input1.compare(0, input1.available(), input2, 0, - input2.available()); - Assert.assertLt(0, result); - } finally { - FileUtils.deleteQuietly(file1); - FileUtils.deleteQuietly(file2); - } - - // UnsafeBytesInput compare to BufferedFileInput - File file3 = createTempFile(); - try (BufferedFileInput fileInput = inputByString(file3, "apple")) { - @SuppressWarnings("resource") - UnsafeBytesOutput output = new UnsafeBytesOutput( - Constants.SMALL_BUF_SIZE); - output.writeBytes("banana"); - @SuppressWarnings("resource") - RandomAccessInput input = new UnsafeBytesInput(output.buffer()); - int result = input.compare(0, input.available(), fileInput, 0, - fileInput.available()); - Assert.assertGt(0, result); - } finally { - FileUtils.deleteQuietly(file3); - } - } - - @Test - public void testCompareDiffRange() throws IOException { - File file1, file2; - - // BufferedFileInput compare to other RandomAccessInput - file1 = createTempFile(); - try (BufferedFileInput input1 = inputByString(file1, "hugegraph")) { - UnsafeBytesOutput output = new UnsafeBytesOutput( - Constants.SMALL_BUF_SIZE); - output.writeBytes("banana"); - RandomAccessInput input = EntriesUtil.inputFromOutput(output); - - int result = input1.compare(0, input1.available(), input, 0, - input.available()); - Assert.assertGt(0, result); - } finally { - FileUtils.deleteQuietly(file1); - } - - // Compare two BufferedFileInput - file1 = createTempFile(); - file2 = createTempFile(); - String content = "let's make baidu great again"; - - try (BufferedFileInput input1 = inputByString(file1, content, 10); - BufferedFileInput input2 = inputByString(file1, content, 10)) { - int result; - /* - * Compare range in buffer - * "le" compare to "et" - */ - result = input1.compare(0, 2, input2, 1, 2); - Assert.assertGt(0, result); - - /* - * Compare range in input1 buffer but not in input2 buffer - * "le" compare to "aid" - */ - result = input1.compare(0, 2, input2, 12, 2); - Assert.assertGt(0, result); - - /* - * Compare range not in buffer - * "aid" compare to "aid" - */ - result = input1.compare(12, 3, input2, 12, 3); - Assert.assertEquals(0, result); - - /* - * Compare range not in input1 buffer but in input2 buffer - * "aid" compare to "let" - */ - result = input1.compare(12, 3, input2, 0, 3); - Assert.assertLt(0, result); - } finally { - FileUtils.deleteQuietly(file1); - FileUtils.deleteQuietly(file2); - } - } - - private static File createTempFile() throws IOException { - return File.createTempFile(UUID.randomUUID().toString(), null); - } - - private static BufferedFileOutput createOutput(File file) - throws FileNotFoundException { - return new BufferedFileOutput(new RandomAccessFile(file, - Constants.FILE_MODE_WRITE), - BUFFER_SIZE); - } - - private static BufferedFileInput createInput(File file) - throws IOException { - return new BufferedFileInput(new RandomAccessFile(file, - Constants.FILE_MODE_READ), - BUFFER_SIZE); - } - - private static BufferedFileInput inputByString(File file, String s) - throws IOException { - BufferedFileOutput output = new BufferedFileOutput(file); - output.writeBytes(s); - output.close(); - return new BufferedFileInput(file); - } - - private static BufferedFileInput inputByString(File file, String s, - int bufferCapacity) - throws IOException { - BufferedFileOutput output = new BufferedFileOutput(file); - output.writeBytes(s); - output.close(); - RandomAccessFile randomAccessFile = new RandomAccessFile( - file, Constants.FILE_MODE_READ); - return new BufferedFileInput(randomAccessFile, bufferCapacity); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamTest.java deleted file mode 100644 index 059ffe96e..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/BufferedStreamTest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class BufferedStreamTest { - - private static final int BUFFER_SIZE = 128; - - @Test - public void testConstructor() throws IOException { - File file = createTempFile(); - try { - OutputStream os = new FileOutputStream(file); - try (BufferedStreamOutput output = new BufferedStreamOutput(os)) { - Assert.assertEquals(0, output.position()); - } - InputStream in = new FileInputStream(file); - try (BufferedStreamInput input = new BufferedStreamInput(in)) { - Assert.assertEquals(0, input.position()); - } - Assert.assertThrows(IllegalArgumentException.class, () -> { - new BufferedStreamOutput(os, 1); - }, e -> { - Assert.assertContains("The parameter bufferSize must be >= 8", - e.getMessage()); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - new BufferedStreamInput(in, 1); - }, e -> { - Assert.assertContains("The parameter bufferSize must be >= 8", - e.getMessage()); - }); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteInt() throws IOException { - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteIntWithPosition() throws IOException { - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - // 256 bytes - for (int i = 0; i < 64; i++) { - output.writeInt(i); - } - // Write at start point of current buffer - output.writeFixedInt(128, 1); - // Write at middle point of current buffer - output.writeFixedInt(200, 2); - // Write at end point of current buffer - output.writeFixedInt(252, 3); - // Write at previous buffer - Assert.assertThrows(IOException.class, () -> { - output.writeFixedInt(100, 4); - }, e -> { - Assert.assertContains("underflows the start position", - e.getMessage()); - }); - // Write at next buffer - Assert.assertThrows(IOException.class, () -> { - output.writeFixedInt(256, 5); - }, e -> { - Assert.assertContains("overflows the write position", - e.getMessage()); - }); - - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i < 64; i++) { - int position = i * 4; - switch (position) { - case 128: - Assert.assertEquals(1, input.readInt()); - break; - case 200: - Assert.assertEquals(2, input.readInt()); - break; - case 252: - Assert.assertEquals(3, input.readInt()); - break; - default: - Assert.assertEquals(i, input.readInt()); - } - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteByteArray() throws IOException { - int loopTimes = 129; - byte[] array = UnitTestBase.randomBytes(10); - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i < loopTimes; i++) { - output.write(array); - } - } - - byte[] arrayRead = new byte[10]; - try (DataInputStream dis = new DataInputStream( - new FileInputStream(file))) { - for (int i = 0; i < loopTimes; i++) { - dis.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i < loopTimes - 1; i++) { - input.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - Assert.assertThrows(IOException.class, () -> { - input.readFully(new byte[20]); - }, e -> { - Assert.assertContains("overflows buffer", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteLargeByteArray() throws IOException { - int size = 10; - int arraySize = 1280; // large than buffer size - byte[] array = UnitTestBase.randomBytes(arraySize); - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.write(array); - } - } - - byte[] arrayRead = new byte[arraySize]; - try (DataInputStream dis = new DataInputStream( - new FileInputStream(file))) { - for (int i = 0; i < size; i++) { - dis.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - } - - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i < size - 1; i++) { - input.readFully(arrayRead); - Assert.assertArrayEquals(array, arrayRead); - } - Assert.assertThrows(IOException.class, () -> { - input.readFully(new byte[arraySize * 2]); - }, e -> { - Assert.assertContains("There is no enough data in " + - "input stream", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testSeek() throws IOException { - int size = 1024; - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.seek(i * 4); - output.writeInt(i); - } - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i < size; i++) { - input.seek(i * 4); - Assert.assertEquals(i, input.readInt()); - } - Assert.assertThrows(IOException.class, () -> { - input.seek(size * 4 + 1); - }, e -> { - Assert.assertContains("reach the end of input stream", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testSeekOutRange() throws IOException { - int size = 1024; - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.seek(i * 4); - output.writeInt(i); - } - // Overwrite last two elements - output.seek((size - 2) * 4); - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - // The position is underflow the buffer - Assert.assertThrows(IOException.class, () -> { - output.seek(output.position() - BUFFER_SIZE - 2); - }, e -> { - Assert.assertContains("out of range", e.getMessage()); - }); - - // The position after the current position - Assert.assertThrows(IOException.class, () -> { - output.seek(output.position() + 2); - }, e -> { - Assert.assertContains("out of range", e.getMessage()); - }); - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i < size - 2; i++) { - input.seek(i * 4); - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - Assert.assertThrows(IOException.class, () -> { - input.seek(input.position() - BUFFER_SIZE - 2); - }, e -> { - Assert.assertContains("underflows the start position", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testSkip() throws IOException { - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = -128; i <= 127; i++) { - output.writeByte(i); - } - output.skip(4L); - output.writeByte(127); - output.skip(1280L); - for (int i = 1; i <= 1280; i++) { - output.writeByte(i); - } - } - - try (DataInputStream dis = new DataInputStream( - new FileInputStream(file))) { - Assert.assertEquals(-128, dis.readByte()); - dis.skip(1); - for (int i = -126; i <= 127; i++) { - Assert.assertEquals(i, dis.readByte()); - } - long count1 = dis.skip(4); - Assert.assertEquals(4, count1); - Assert.assertEquals(127, dis.readByte()); - long count2 = dis.skip(1280); - Assert.assertEquals(1280, count2); - for (int i = 1; i <= 1280; i++) { - Assert.assertEquals((byte) i, dis.readByte()); - } - } - - try (BufferedStreamInput input = createInput(file)) { - Assert.assertEquals(-128, input.readByte()); - input.skip(1); - for (int i = -126; i <= 127; i++) { - Assert.assertEquals(i, input.readByte()); - } - input.skip(4); - Assert.assertEquals(127, input.readByte()); - input.skip(1280); - for (int i = 1; i <= 1280; i++) { - Assert.assertEquals((byte) i, input.readByte()); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testPosition() throws IOException { - int size = 1024; - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i <= size; i++) { - Assert.assertEquals(i * 4, output.position()); - output.writeInt(i); - } - } - try (BufferedStreamInput input = createInput(file)) { - for (int i = 0; i <= size; i++) { - Assert.assertEquals(i * 4, input.position()); - Assert.assertEquals(i, input.readInt()); - } - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testAvailable() throws IOException { - int size = 1; - File file = createTempFile(); - try { - try (BufferedStreamOutput output = createOutput(file)) { - for (int i = 0; i < size; i++) { - output.writeInt(i); - } - } - try (BufferedStreamInput input = createInput(file)) { - Assert.assertEquals(Long.MAX_VALUE, input.available()); - } - } finally { - FileUtils.deleteQuietly(file); - } - } - - private static File createTempFile() throws IOException { - return File.createTempFile(UUID.randomUUID().toString(), null); - } - - private static BufferedStreamOutput createOutput(File file) - throws FileNotFoundException { - return new BufferedStreamOutput(new FileOutputStream(file), - BUFFER_SIZE); - } - - private static BufferedStreamInput createInput(File file) - throws IOException { - return new BufferedStreamInput(new FileInputStream(file), - BUFFER_SIZE); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutputTest.java deleted file mode 100644 index 32732cd5f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/CsvStructGraphOutputTest.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class CsvStructGraphOutputTest extends UnitTestBase { - - @Test - public void testWriteReadVertexOnlyIdAndValue() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "false", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "false", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - Value value = BytesId.of(999L); - Vertex vertex = factory.createVertex(longId, value); - - String fileName = "output.csv"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.CSV, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String text = FileUtils.readFileToString(file); - Assert.assertEquals("100,999" + System.lineSeparator(), text); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteReadVertexWithEdges() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "true", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "false", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - IdList idList = new IdList(); - idList.add(BytesId.of(998L)); - idList.add(BytesId.of(999L)); - Vertex vertex = factory.createVertex(longId, idList); - vertex.addEdge(factory.createEdge("knows", BytesId.of(200))); - vertex.addEdge(factory.createEdge("watch", "1111", BytesId.of(300))); - - String fileName = "output2.csv"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.CSV, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String text = FileUtils.readFileToString(file); - Assert.assertEquals("100,[998,999],[{200,\"knows\",\"\"}," + - "{300,\"watch\",\"1111\"}]" + - System.lineSeparator(), text); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteReadVertexWithProperties() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "false", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "true", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - IdListList idListList = new IdListList(); - IdList idList1 = new IdList(); - idList1.add(BytesId.of(66L)); - IdList idList2 = new IdList(); - idList2.add(BytesId.of(998L)); - idList2.add(BytesId.of(999L)); - idListList.add(idList1); - idListList.add(idList2); - - Vertex vertex = factory.createVertex(longId, idListList); - vertex.properties().put("boolean", new BooleanValue(true)); - vertex.properties().put("byte", new IntValue(127)); - vertex.properties().put("short", new IntValue(16383)); - vertex.properties().put("int", new IntValue(1000000)); - vertex.properties().put("long", new LongValue(10000000000L)); - vertex.properties().put("float", new FloatValue(0.1F)); - vertex.properties().put("double", new DoubleValue(-0.01D)); - vertex.properties().put("idvalue", longId); - - String fileName = "output3.csv"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.CSV, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String text = FileUtils.readFileToString(file); - Assert.assertEquals("100,[[66],[998,999]],{true,127,-0.01,16383," + - "100,0.1,1000000,10000000000}" + - System.lineSeparator(), text); - } finally { - FileUtils.deleteQuietly(file); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/IOTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/IOTestSuite.java deleted file mode 100644 index 43fb32602..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/IOTestSuite.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - StreamGraphOutputInputTest.class, - JsonStructGraphOutputTest.class, - CsvStructGraphOutputTest.class, - StructRandomAccessOutputTest.class, - UnsafeBytesTest.class, - OptimizedUnsafeBytesTest.class, - BufferedFileTest.class, - BufferedStreamTest.class -}) -public class IOTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutputTest.java deleted file mode 100644 index 99f89ae7b..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/JsonStructGraphOutputTest.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.value.BooleanValue; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IdList; -import org.apache.hugegraph.computer.core.graph.value.IdListList; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class JsonStructGraphOutputTest extends UnitTestBase { - - @Test - public void testWriteReadVertexOnlyIdAndValue() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "false", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "false", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false", - ComputerOptions.OUTPUT_RESULT_NAME, "rank" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - Value value = BytesId.of(999L); - Vertex vertex = factory.createVertex(longId, value); - - String fileName = "output.json"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.JSON, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String json = FileUtils.readFileToString(file); - Assert.assertEquals("{\"id\":100,\"rank\":999}" + - System.lineSeparator(), json); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteReadVertexWithEdges() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "true", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "false", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false", - ComputerOptions.OUTPUT_RESULT_NAME, "rank" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - IdList idList = new IdList(); - idList.add(BytesId.of(998L)); - idList.add(BytesId.of(999L)); - Vertex vertex = factory.createVertex(longId, idList); - vertex.addEdge(factory.createEdge("knows", BytesId.of(200))); - vertex.addEdge(factory.createEdge("watch", "1111", BytesId.of(300))); - - String fileName = "output.json"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.JSON, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String json = FileUtils.readFileToString(file); - Assert.assertEquals("{\"id\":100,\"rank\":[998,999]," + - "\"adjacent_edges\":[{\"target_id\":200," + - "\"label\":\"knows\",\"name\":\"\"}," + - "{\"target_id\":300,\"label\":\"watch\"," + - "\"name\":\"1111\"}]}" + - System.lineSeparator(), json); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testWriteReadVertexWithProperties() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.OUTPUT_WITH_ADJACENT_EDGES, "false", - ComputerOptions.OUTPUT_WITH_VERTEX_PROPERTIES, "true", - ComputerOptions.OUTPUT_WITH_EDGE_PROPERTIES, "false", - ComputerOptions.OUTPUT_RESULT_NAME, "rank" - ); - ComputerContext context = context(); - GraphFactory factory = context.graphFactory(); - - Id longId = BytesId.of(100L); - IdListList idListList = new IdListList(); - IdList idList1 = new IdList(); - idList1.add(BytesId.of(66L)); - IdList idList2 = new IdList(); - idList2.add(BytesId.of(998L)); - idList2.add(BytesId.of(999L)); - idListList.add(idList1); - idListList.add(idList2); - - Vertex vertex = factory.createVertex(longId, idListList); - vertex.properties().put("boolean", new BooleanValue(true)); - vertex.properties().put("byte", new IntValue(127)); - vertex.properties().put("short", new IntValue(16383)); - vertex.properties().put("int", new IntValue(1000000)); - vertex.properties().put("long", new LongValue(10000000000L)); - vertex.properties().put("float", new FloatValue(0.1F)); - vertex.properties().put("double", new DoubleValue(-0.01D)); - vertex.properties().put("idvalue", longId); - - String fileName = "output.json"; - File file = new File(fileName); - try { - BufferedFileOutput dos = new BufferedFileOutput(file); - StructGraphOutput output = (StructGraphOutput) - IOFactory.createGraphOutput( - context, OutputFormat.JSON, dos); - output.writeVertex(vertex); - dos.close(); - - @SuppressWarnings("deprecation") - String json = FileUtils.readFileToString(file); - Assert.assertEquals("{\"id\":100,\"rank\":[[66],[998,999]]," + - "\"properties\":{\"boolean\":true," + - "\"byte\":127,\"double\":-0.01," + - "\"short\":16383,\"idvalue\":100," + - "\"float\":0.1,\"int\":1000000," + - "\"long\":10000000000}}" + - System.lineSeparator(), json); - } finally { - FileUtils.deleteQuietly(file); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/MockRankComputation.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/MockRankComputation.java deleted file mode 100644 index 693207205..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/MockRankComputation.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.worker.Computation; -import org.apache.hugegraph.computer.core.worker.ComputationContext; - -public class MockRankComputation implements Computation { - - @Override - public String name() { - return "rank"; - } - - @Override - public String category() { - return "rank"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - throw new ComputerException("Not implemented yet."); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - throw new ComputerException("Not implemented yet."); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedUnsafeBytesTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedUnsafeBytesTest.java deleted file mode 100644 index 1fa33a437..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedUnsafeBytesTest.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -@SuppressWarnings("resource") -public class OptimizedUnsafeBytesTest { - - private static final int SIZE = Constants.SMALL_BUF_SIZE; - - @Test - public void testConstructor() { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - Assert.assertEquals(0, output.position()); - - OptimizedBytesOutput output2 = new OptimizedBytesOutput(16); - Assert.assertEquals(0, output2.position()); - - OptimizedBytesInput input = new OptimizedBytesInput(output.buffer()); - Assert.assertEquals(0, input.position()); - - OptimizedBytesInput input2 = new OptimizedBytesInput(output.buffer(), - 4); - Assert.assertEquals(0, input2.position()); - } - - @Test - public void testUnsignedByte() throws IOException { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - for (int i = 0; i <= 255; i++) { - output.write(i); - } - OptimizedBytesInput input = new OptimizedBytesInput( - output.toByteArray()); - for (int i = 0; i <= 255; i++) { - int value = input.readUnsignedByte(); - Assert.assertEquals(i, value); - } - } - - @Test - public void testUnsignedShort() throws IOException { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - for (short i = 0; i <= 255; i++) { - output.writeShort(i); - } - output.writeShort(Short.MAX_VALUE); - output.writeShort(Short.MIN_VALUE); - OptimizedBytesInput input = new OptimizedBytesInput( - output.toByteArray()); - for (int i = 0; i <= 255; i++) { - Assert.assertEquals(i, input.readUnsignedShort()); - } - Assert.assertEquals(Short.MAX_VALUE, input.readUnsignedShort()); - Assert.assertEquals(Short.MIN_VALUE & 0xFFFF, - input.readUnsignedShort()); - } - - @Test - public void testChar() throws IOException { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - for (char i = 'a'; i <= 'z'; i++) { - output.writeChar(i); - } - OptimizedBytesInput input = new OptimizedBytesInput( - output.toByteArray()); - for (char i = 'a'; i <= 'z'; i++) { - char value = input.readChar(); - Assert.assertEquals(i, value); - } - } - - @Test - public void testWriteChars() throws IOException { - String chars = "testByteArray"; - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - output.writeChars(chars); - OptimizedBytesInput input = new OptimizedBytesInput( - output.toByteArray()); - for (int i = 0; i < chars.length(); i++) { - char c = input.readChar(); - Assert.assertEquals(chars.charAt(i), c); - } - } - - @Test - public void testWriteByInput() throws IOException { - // Input class is OptimizedBytesInput - String uuid = UUID.randomUUID().toString(); - OptimizedBytesInput input = inputByString(uuid); - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - output.write(input, 0, input.available()); - Assert.assertEquals(uuid, new String(output.toByteArray())); - - // Input class isn't OptimizedBytesInput - File tempFile = File.createTempFile(UUID.randomUUID().toString(), ""); - BufferedFileOutput fileOutput = null; - BufferedFileInput fileInput = null; - try { - fileOutput = new BufferedFileOutput(tempFile); - fileOutput.writeBytes(uuid); - fileOutput.close(); - fileInput = new BufferedFileInput(tempFile); - output = new OptimizedBytesOutput(SIZE); - output.write(fileInput, 0, fileInput.available()); - Assert.assertEquals(uuid, new String(output.toByteArray())); - } finally { - if (fileInput != null) { - fileInput.close(); - } - if (fileOutput != null) { - fileOutput.close(); - } - FileUtils.deleteQuietly(tempFile); - } - } - - @Test - public void testReadLine() { - OptimizedBytesInput input = new OptimizedBytesInput( - Constants.EMPTY_BYTES); - Assert.assertThrows(ComputerException.class, () -> { - input.readLine(); - }); - } - - @Test - public void testDuplicate() throws IOException { - OptimizedBytesInput raw = inputByString("apple"); - OptimizedBytesInput dup = raw.duplicate(); - raw.readByte(); - Assert.assertEquals(1, raw.position()); - Assert.assertEquals(0, dup.position()); - } - - @Test - public void testCompare() throws IOException { - OptimizedBytesInput apple = inputByString("apple"); - OptimizedBytesInput egg = inputByString("egg"); - Assert.assertTrue(apple.compare(0, 2, egg, 0, 2) < 0); - Assert.assertTrue(apple.compare(1, 3, egg, 0, 2) > 0); - Assert.assertEquals(0, apple.compare(4, 1, egg, 0, 1)); - } - - @Test - public void testSkipBytes() throws IOException { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - long position = output.skip(4); - Assert.assertEquals(0, position); - output.writeFixedInt(Integer.MAX_VALUE); - OptimizedBytesInput input = new OptimizedBytesInput( - output.toByteArray()); - int bytesSkipped = input.skipBytes(4); - Assert.assertEquals(4, bytesSkipped); - Assert.assertEquals(Integer.MAX_VALUE, input.readFixedInt()); - Assert.assertEquals(0, input.skipBytes(1)); - } - - private static OptimizedBytesInput inputByString(String s) - throws IOException { - OptimizedBytesOutput output = new OptimizedBytesOutput(SIZE); - output.writeBytes(s); - return new OptimizedBytesInput(output.toByteArray()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutputInputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutputInputTest.java deleted file mode 100644 index 0c3af0358..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StreamGraphOutputInputTest.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.IOException; -import java.util.Arrays; - -import org.apache.commons.lang3.tuple.Pair; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.EdgeFrequency; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class StreamGraphOutputInputTest extends UnitTestBase { - - @Test - public void testWriteReadVertex() throws Exception { - Id longId = BytesId.of(100L); - LongValue longValue = new LongValue(999L); - Vertex vertex = graphFactory().createVertex(longId, longValue); - Properties properties = graphFactory().createProperties(); - properties.put("age", new LongValue(20L)); - vertex.properties(properties); - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - StreamGraphOutput output = newStreamGraphOutput(bao); - output.writeVertex(vertex); - bytes = bao.toByteArray(); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - StreamGraphInput input = newStreamGraphInput(bai); - assertVertexEqualWithoutValue(vertex, input.readVertex()); - } - } - - @Test - public void testWriteReadEdgesWithSingleFrequency() throws Exception { - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "SINGLE" - ); - ComputerContext context = ComputerContext.instance(); - GraphFactory graphFactory = context.graphFactory(); - - Id longId = BytesId.of(100L); - LongValue longValue = new LongValue(999L); - Vertex vertex = graphFactory().createVertex(longId, longValue); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - vertex.addEdge(graphFactory.createEdge("watch", "2222", - BytesId.of(4L))); - - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - StreamGraphOutput output = newStreamGraphOutput(bao); - output.writeEdges(vertex); - bytes = bao.toByteArray(); - bytes = reweaveBytes(bytes); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - StreamGraphInput input = newStreamGraphInput(bai); - assertEdgesEqual(vertex, input.readEdges(), EdgeFrequency.SINGLE); - } - } - - @Test - public void testWriteReadEdgesWithSinglePerLabelFrequency() - throws Exception { - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "SINGLE_PER_LABEL" - ); - ComputerContext context = ComputerContext.instance(); - GraphFactory graphFactory = context.graphFactory(); - - Id longId = BytesId.of(100L); - LongValue longValue = new LongValue(999L); - Vertex vertex = graphFactory().createVertex(longId, longValue); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - vertex.addEdge(graphFactory.createEdge("watch", "2222", - BytesId.of(4L))); - - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - StreamGraphOutput output = newStreamGraphOutput(bao); - output.writeEdges(vertex); - bytes = bao.toByteArray(); - bytes = reweaveBytes(bytes); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - StreamGraphInput input = newStreamGraphInput(bai); - assertEdgesEqual(vertex, input.readEdges(), - EdgeFrequency.SINGLE_PER_LABEL); - } - } - - @Test - public void testWriteReadEdgesWithMultipleFrequency() throws Exception { - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "MULTIPLE" - ); - ComputerContext context = ComputerContext.instance(); - GraphFactory graphFactory = context.graphFactory(); - - Id longId = BytesId.of(100L); - LongValue longValue = new LongValue(999L); - Vertex vertex = graphFactory().createVertex(longId, longValue); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - vertex.addEdge(graphFactory.createEdge("watch", "2222", - BytesId.of(4L))); - - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - StreamGraphOutput output = newStreamGraphOutput(bao); - output.writeEdges(vertex); - bytes = bao.toByteArray(); - bytes = reweaveBytes(bytes); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - StreamGraphInput input = newStreamGraphInput(bai); - assertEdgesEqual(vertex, input.readEdges(), EdgeFrequency.MULTIPLE); - } - } - - @Test - public void testWriteReadMessage() throws IOException { - UnitTestBase.updateOptions( - ComputerOptions.ALGORITHM_MESSAGE_CLASS, DoubleValue.class.getName() - ); - - Id id = BytesId.of(999L); - Value value = new DoubleValue(0.85D); - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - StreamGraphOutput output = newStreamGraphOutput(bao); - output.writeMessage(id, value); - bytes = bao.toByteArray(); - System.out.println(Arrays.toString(bytes)); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - StreamGraphInput input = newStreamGraphInput(bai); - Assert.assertEquals(Pair.of(id, value), input.readMessage()); - } - } - - private static byte[] reweaveBytes(byte[] oldBytes) throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput(oldBytes.length); - BytesInput bytesInput = IOFactory.createBytesInput(oldBytes); - - // key length - int keyLength = bytesInput.readFixedInt(); - bytesOutput.writeFixedInt(keyLength); - // key - for (int i = 0; i < keyLength; i++) { - bytesOutput.writeByte(bytesInput.readByte()); - } - // total sub-entry length - bytesOutput.writeFixedInt(bytesInput.readFixedInt()); - // sub-entry count - int subEntryCount = bytesInput.readFixedInt(); - bytesOutput.writeFixedInt(subEntryCount); - // Only write sub-entry key and value, doesn't write length - for (int i = 0; i < subEntryCount; i++) { - // sub-entry key length - int subEntryKeyLength = bytesInput.readFixedInt(); - while (subEntryKeyLength > 0) { - bytesOutput.writeByte(bytesInput.readByte()); - subEntryKeyLength--; - } - // sub-entry value length - int subEntryValueLength = bytesInput.readFixedInt(); - while (subEntryValueLength > 0) { - bytesOutput.writeByte(bytesInput.readByte()); - subEntryValueLength--; - } - } - return bytesOutput.toByteArray(); - } - - /* - * NOTE: this method will modify internal structure, please make sure that - * will not rely on the original object structure after this call. - */ - private static void assertVertexEqualWithoutValue(Vertex expect, - Vertex actual) { - expect.value(null); - actual.value(null); - Assert.assertEquals(expect, actual); - } - - /* - * NOTE: this method will modify internal structure, please make sure that - * will not rely on the original object structure after this call. - */ - private static void assertEdgesEqual(Vertex expect, Vertex actual, - EdgeFrequency frequency) { - expect.value(null); - actual.value(null); - if (frequency == EdgeFrequency.SINGLE) { - // Only compare targetId - expect.edges().forEach(edge -> { - edge.label(null); - edge.name(null); - }); - actual.edges().forEach(edge -> { - edge.label(null); - edge.name(null); - }); - } else if (frequency == EdgeFrequency.SINGLE_PER_LABEL) { - // Compare label and targetId - expect.edges().forEach(edge -> { - edge.name(null); - }); - actual.edges().forEach(edge -> { - edge.name(null); - }); - } else { - assert frequency == EdgeFrequency.MULTIPLE; - // Compare label, name and targetId - } - Assert.assertEquals(expect, actual); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesTest.java deleted file mode 100644 index 27637778f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/UnsafeBytesTest.java +++ /dev/null @@ -1,610 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.io; - -import java.io.File; -import java.io.IOException; -import java.io.UTFDataFormatException; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -@SuppressWarnings("resource") -public class UnsafeBytesTest { - - private static final int SIZE = Constants.SMALL_BUF_SIZE; - - @Test - public void testConstructor() { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - Assert.assertEquals(0, output.position()); - - UnsafeBytesOutput output2 = new UnsafeBytesOutput(SIZE); - Assert.assertEquals(0, output2.position()); - - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer()); - Assert.assertEquals(0, input.position()); - } - - @Test - public void testBoolean() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeBoolean(true); - output.writeBoolean(false); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - Assert.assertTrue(input.readBoolean()); - Assert.assertFalse(input.readBoolean()); - } - - @Test - public void testByte() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.write(i); - } - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 127; i++) { - int value = input.readByte(); - Assert.assertEquals(i, value); - } - } - - @Test - public void testUnsignedByte() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = 0; i <= 255; i++) { - output.write(i); - } - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = 0; i <= 255; i++) { - int value = input.readUnsignedByte(); - Assert.assertEquals(i, value); - } - } - - @Test - public void testShort() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (short i = -128; i <= 127; i++) { - output.writeShort(i); - } - output.writeShort(Short.MAX_VALUE); - output.writeShort(Short.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readShort()); - } - Assert.assertEquals(Short.MAX_VALUE, input.readShort()); - Assert.assertEquals(Short.MIN_VALUE, input.readShort()); - } - - @Test - public void testUnsignedShort() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (short i = 0; i <= 255; i++) { - output.writeShort(i); - } - output.writeShort(Short.MAX_VALUE); - output.writeShort(Short.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = 0; i <= 255; i++) { - Assert.assertEquals(i, input.readUnsignedShort()); - } - Assert.assertEquals(Short.MAX_VALUE, input.readUnsignedShort()); - Assert.assertEquals(Short.MIN_VALUE & 0xFFFF, - input.readUnsignedShort()); - } - - @Test - public void testChar() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (char i = 'a'; i <= 'z'; i++) { - output.writeChar(i); - } - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (char i = 'a'; i <= 'z'; i++) { - char value = input.readChar(); - Assert.assertEquals(i, value); - } - } - - @Test - public void testInt() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - - @Test - public void testWriteIntWithPosition() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - long position = output.skip(Constants.INT_LEN); - output.writeInt(2); - output.writeFixedInt(position, 1); - - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - Assert.assertEquals(1, input.readInt()); - Assert.assertEquals(2, input.readInt()); - } - - @Test - public void testOverWriteWithPosition() { - Assert.assertThrows(ComputerException.class, () -> { - UnsafeBytesOutput output = new UnsafeBytesOutput(4); - output.writeFixedInt(1, 100); - }); - - Assert.assertThrows(ComputerException.class, () -> { - UnsafeBytesOutput output = new UnsafeBytesOutput(4); - output.writeFixedInt(2, 100); - }); - - Assert.assertThrows(ComputerException.class, () -> { - UnsafeBytesOutput output = new UnsafeBytesOutput(4); - output.writeFixedInt(3, 100); - }); - - Assert.assertThrows(ComputerException.class, () -> { - UnsafeBytesOutput output = new UnsafeBytesOutput(4); - output.writeFixedInt(4, 100); - }); - } - - @Test - public void testLong() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (long i = -128; i <= 127; i++) { - output.writeLong(i); - } - output.writeLong(Long.MAX_VALUE); - output.writeLong(Long.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (long i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readLong()); - } - Assert.assertEquals(Long.MAX_VALUE, input.readLong()); - Assert.assertEquals(Long.MIN_VALUE, input.readLong()); - } - - @Test - public void testFloat() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.writeFloat(i); - } - output.writeFloat(Float.MAX_VALUE); - output.writeFloat(Float.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readFloat(), 0.0D); - } - Assert.assertEquals(Float.MAX_VALUE, input.readFloat(), 0.0D); - Assert.assertEquals(Float.MIN_VALUE, input.readFloat(), 0.0D); - } - - @Test - public void testDouble() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.writeDouble(i); - } - output.writeDouble(Double.MAX_VALUE); - output.writeDouble(Double.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 127; i++) { - Assert.assertEquals(i, input.readDouble(), 0.0D); - } - Assert.assertEquals(Double.MAX_VALUE, input.readDouble(), 0.0D); - Assert.assertEquals(Double.MIN_VALUE, input.readDouble(), 0.0D); - } - - @Test - public void testByteArray() throws IOException { - byte[] bytes = "testByteArray".getBytes(); - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.write(bytes); - byte[] bytesRead = new byte[bytes.length]; - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - input.readFully(bytesRead); - Assert.assertArrayEquals(bytes, bytesRead); - } - - @Test - public void testWritePartByteArray() throws IOException { - byte[] bytes = "testByteArray".getBytes(); - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.write(bytes, 1, bytes.length - 1); - byte[] bytesRead = new byte[bytes.length]; - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - input.readFully(bytesRead, 1, bytes.length - 1); - bytesRead[0] = bytes[0]; - Assert.assertArrayEquals(bytes, bytesRead); - } - - @Test - public void testWriteChars() throws IOException { - String chars = "testByteArray"; - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeChars(chars); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = 0; i < chars.length(); i++) { - char c = input.readChar(); - Assert.assertEquals(chars.charAt(i), c); - } - } - - @Test - public void testReadLine() { - UnsafeBytesInput input = new UnsafeBytesInput(Constants.EMPTY_BYTES); - Assert.assertThrows(ComputerException.class, () -> { - input.readLine(); - }); - } - - @Test - public void testUTFWithChineseCharacters() throws IOException { - String s = "带汉字的字符串"; - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeUTF(s); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - String value = input.readUTF(); - Assert.assertEquals(s, value); - } - - @Test - public void testUTF() throws IOException { - String prefix = "random string"; - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.writeUTF(prefix + i); - } - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer()); - for (int i = -128; i <= 127; i++) { - String value = input.readUTF(); - Assert.assertEquals(prefix + i, value); - } - } - - @Test - public void testUTFBoundary() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - String s1 = UnitTestBase.randomString(65535); - output.writeUTF(s1); - String s2 = UnitTestBase.randomString(65536); - Assert.assertThrows(UTFDataFormatException.class, () -> { - output.writeUTF(s2); - }); - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer()); - String value = input.readUTF(); - Assert.assertEquals(s1, value); - } - - @Test - public void testSkipBytes() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - long position = output.skip(4); - Assert.assertEquals(0, position); - output.writeInt(Integer.MAX_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - int bytesSkipped = input.skipBytes(4); - Assert.assertEquals(4, bytesSkipped); - Assert.assertEquals(4, input.remaining()); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(0, input.remaining()); - Assert.assertEquals(0, input.skipBytes(1)); - } - - @Test - public void testSkip() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.skip(4); - output.writeInt(Integer.MAX_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - input.skipBytes(4); - Assert.assertEquals(4, input.remaining()); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(0, input.remaining()); - Assert.assertEquals(0, input.skipBytes(1)); - } - - @Test - public void testBuffer() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeInt(Integer.MAX_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer(), - (int) output.position()); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - } - - @Test - public void testOverRead() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeInt(Integer.MAX_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer(), - (int) output.position()); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertThrows(ComputerException.class, () -> { - input.readInt(); - }); - } - - @Test - public void testSeek() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.writeInt(i); - } - // Overwrite last 2 elements - output.seek(256 * 4 - 8); - output.writeInt(Integer.MAX_VALUE); - output.writeInt(Integer.MIN_VALUE); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = -128; i <= 125; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - input.seek(256 * 4 - 8); - Assert.assertEquals(Integer.MAX_VALUE, input.readInt()); - Assert.assertEquals(Integer.MIN_VALUE, input.readInt()); - } - - @Test - public void testAvailable() throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - for (int i = -128; i <= 127; i++) { - output.write(i); - } - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - for (int i = 0; i < 256; i++) { - Assert.assertEquals(256 - i, input.available()); - input.readByte(); - } - } - - @Test - public void testPosition() throws IOException { - byte[] bytes; - try (UnsafeBytesOutput bao = new UnsafeBytesOutput(SIZE)) { - Assert.assertEquals(0L, bao.position()); - bao.writeLong(Long.MAX_VALUE); - Assert.assertEquals(8L, bao.position()); - bytes = bao.toByteArray(); - } - - try (UnsafeBytesInput bai = new UnsafeBytesInput(bytes)) { - Assert.assertEquals(0L, bai.position()); - Assert.assertEquals(Long.MAX_VALUE, bai.readLong()); - Assert.assertEquals(8L, bai.position()); - } - } - - @Test - public void testWriteByInput() throws IOException { - // Input class is UnsafeBytesInput - String uuid = UUID.randomUUID().toString(); - UnsafeBytesInput input = inputByString(uuid); - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.write(input, 0, input.available()); - Assert.assertEquals(uuid, new String(output.toByteArray())); - - // Input class isn't UnsafeBytesInput - File tempFile = File.createTempFile(UUID.randomUUID().toString(), ""); - BufferedFileOutput fileOutput = null; - BufferedFileInput fileInput = null; - try { - fileOutput = new BufferedFileOutput(tempFile); - fileOutput.writeBytes(uuid); - fileOutput.close(); - fileInput = new BufferedFileInput(tempFile); - output = new UnsafeBytesOutput(SIZE); - output.write(fileInput, 0, fileInput.available()); - Assert.assertEquals(uuid, new String(output.toByteArray())); - } finally { - if (fileInput != null) { - fileInput.close(); - } - if (fileOutput != null) { - fileOutput.close(); - } - FileUtils.deleteQuietly(tempFile); - } - } - - @Test - public void testReadBytes() throws IOException { - String uuid = UUID.randomUUID().toString(); - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeBytes(uuid); - UnsafeBytesInput input = new UnsafeBytesInput(output.toByteArray()); - byte[] bytes = input.readBytes(uuid.length()); - Assert.assertEquals(uuid, new String(bytes)); - } - - @Test - public void testCompare() throws IOException { - UnsafeBytesInput apple = inputByString("apple"); - UnsafeBytesInput egg = inputByString("egg"); - Assert.assertTrue(apple.compare(0, 2, egg, 0, 2) < 0); - Assert.assertTrue(apple.compare(1, 3, egg, 0, 2) > 0); - Assert.assertEquals(0, apple.compare(4, 1, egg, 0, 1)); - } - - @Test - public void testDuplicate() throws IOException { - UnsafeBytesInput raw = inputByString("apple"); - UnsafeBytesInput dup = raw.duplicate(); - raw.readByte(); - Assert.assertEquals(1, raw.position()); - Assert.assertEquals(0, dup.position()); - - String uuid = UUID.randomUUID().toString(); - File tempFile = File.createTempFile(UUID.randomUUID().toString(), ""); - BufferedFileOutput fileOutput = null; - BufferedFileInput fileInput = null; - try { - fileOutput = new BufferedFileOutput(tempFile); - fileOutput.writeBytes(uuid); - fileOutput.close(); - fileInput = new BufferedFileInput(tempFile); - dup = fileInput.duplicate(); - - fileInput.readChar(); - Assert.assertEquals(2, fileInput.position()); - Assert.assertEquals(0, dup.position()); - } finally { - if (fileInput != null) { - fileInput.close(); - } - if (fileOutput != null) { - fileOutput.close(); - } - FileUtils.deleteQuietly(tempFile); - } - } - - @Test - public void testWriteReadVInt() throws IOException { - assertEqualAfterWriteAndReadVInt(0, new byte[]{0}); - assertEqualAfterWriteAndReadVInt(1, new byte[]{1}); - assertEqualAfterWriteAndReadVInt(127, new byte[]{(byte) 0x7f}); - assertEqualAfterWriteAndReadVInt(128, new byte[]{(byte) 0x81, 0}); - assertEqualAfterWriteAndReadVInt(16383, - new byte[]{(byte) 0xff, (byte) 0x7f}); - assertEqualAfterWriteAndReadVInt(16384, - new byte[]{(byte) 0x81, (byte) 0x80, - 0} - ); - assertEqualAfterWriteAndReadVInt(16385, - new byte[]{(byte) 0x81, (byte) 0x80, - 1}); - assertEqualAfterWriteAndReadVInt(-1, new byte[]{-113, -1, -1, -1, 127}); - assertEqualAfterWriteAndReadVInt(Integer.MAX_VALUE, - new byte[]{-121, -1, -1, -1, 127} - ); - assertEqualAfterWriteAndReadVInt(Integer.MIN_VALUE, - new byte[]{-120, -128, -128, -128, 0} - ); - } - - @Test - public void testWriteReadVLong() throws IOException { - assertEqualAfterWriteAndReadVLong(0L, new byte[]{0}); - assertEqualAfterWriteAndReadVLong(1L, new byte[]{1}); - assertEqualAfterWriteAndReadVLong(127L, new byte[]{(byte) 0x7f}); - assertEqualAfterWriteAndReadVLong(128L, new byte[]{(byte) 0x81, 0}); - assertEqualAfterWriteAndReadVLong(16383L, - new byte[]{(byte) 0xff, (byte) 0x7f}); - assertEqualAfterWriteAndReadVLong(16384L, - new byte[]{(byte) 0x81, (byte) 0x80, - 0} - ); - assertEqualAfterWriteAndReadVLong(16385L, - new byte[]{(byte) 0x81, (byte) 0x80, - 1} - ); - assertEqualAfterWriteAndReadVLong(-1L, new byte[]{-127, -1, -1, -1, -1, - -1, -1, -1, -1, 127}); - assertEqualAfterWriteAndReadVLong(Integer.MAX_VALUE, - new byte[]{-121, -1, -1, -1, 127} - ); - assertEqualAfterWriteAndReadVLong(Integer.MIN_VALUE, - new byte[]{-127, -1, -1, -1, -1, - -8, -128, -128, -128, 0} - ); - assertEqualAfterWriteAndReadVLong(Long.MAX_VALUE, - new byte[]{-1, -1, -1, -1, -1, - -1, -1, -1, 127} - ); - assertEqualAfterWriteAndReadVLong(Long.MIN_VALUE, - new byte[]{-127, -128, -128, -128, - -128, -128, -128, -128, - -128, 0} - ); - } - - @Test - public void testWriteReadString() throws IOException { - assertEqualAfterWriteAndReadString("", new byte[]{0}); - assertEqualAfterWriteAndReadString("1", new byte[]{1, 49}); - assertEqualAfterWriteAndReadString("789", new byte[]{3, 55, 56, 57}); - assertEqualAfterWriteAndReadString("ABCDE", - new byte[]{5, 65, 66, 67, 68, 69}); - } - - public static void assertEqualAfterWriteAndReadVInt(int value, byte[] bytes) - throws IOException { - try (OptimizedBytesOutput bao = new OptimizedBytesOutput(5)) { - bao.writeInt(value); - Assert.assertArrayEquals(bytes, bao.toByteArray()); - } - - try (OptimizedBytesInput bai = new OptimizedBytesInput(bytes)) { - int readValue = bai.readInt(); - Assert.assertEquals(value, readValue); - } - } - - public static void assertEqualAfterWriteAndReadVLong(long value, - byte[] bytes) - throws IOException { - try (OptimizedBytesOutput bao = new OptimizedBytesOutput(9)) { - bao.writeLong(value); - Assert.assertArrayEquals(bytes, bao.toByteArray()); - } - - try (OptimizedBytesInput bai = new OptimizedBytesInput(bytes)) { - long readValue = bai.readLong(); - Assert.assertEquals(value, readValue); - } - } - - public static void assertEqualAfterWriteAndReadString(String value, - byte[] bytes) - throws IOException { - try (OptimizedBytesOutput bao = new OptimizedBytesOutput(SIZE)) { - bao.writeUTF(value); - Assert.assertArrayEquals(bytes, bao.toByteArray()); - } - - try (OptimizedBytesInput bai = new OptimizedBytesInput(bytes)) { - String readValue = bai.readUTF(); - Assert.assertEquals(value, readValue); - } - } - - private static UnsafeBytesInput inputByString(String s) throws IOException { - UnsafeBytesOutput output = new UnsafeBytesOutput(SIZE); - output.writeBytes(s); - return new UnsafeBytesInput(output.toByteArray()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionIdTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionIdTest.java deleted file mode 100644 index 382decee1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/ConnectionIdTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.UnknownHostException; - -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class ConnectionIdTest { - - @Test - public void testParseConnectionID() { - ConnectionId connectionId1 = ConnectionId.parseConnectionId( - "127.0.0.1", 8080); - ConnectionId connectionId2 = ConnectionId.parseConnectionId( - "127.0.0.1", 8080); - Assert.assertSame(connectionId1, connectionId2); - } - - @Test - public void testConnectionIDEquals() { - ConnectionId connectionId1 = ConnectionId.parseConnectionId( - "localhost", 8080); - InetSocketAddress address = TransportUtil.resolvedSocketAddress( - "127.0.0.1", 8080); - ConnectionId connectionId2 = new ConnectionId(address); - Assert.assertEquals(connectionId1, connectionId2); - - ConnectionId connectionId3 = ConnectionId.parseConnectionId( - "127.0.0.1", 8080, 2); - Assert.assertNotEquals(connectionId1, connectionId3); - } - - @Test - public void testConnectionIDUseUnResolved() { - InetSocketAddress localSocketAddress = - InetSocketAddress.createUnresolved("127.0.0.1", 8080); - Assert.assertThrows(IllegalArgumentException.class, () -> { - new ConnectionId(localSocketAddress); - }, e -> { - Assert.assertTrue(e.getMessage().contains("The address must be " + - "resolved")); - }); - } - - @Test - public void testConnectionIDWithLocalAddress() throws UnknownHostException { - InetAddress localHost = InetAddress.getLocalHost(); - String hostName = localHost.getHostName(); - InetSocketAddress address = TransportUtil.resolvedSocketAddress( - hostName, 8080); - ConnectionId connectionId = new ConnectionId(address); - ConnectionId connectionId2 = ConnectionId.parseConnectionId( - hostName, 8080); - Assert.assertEquals(connectionId, connectionId2); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockClientHandler.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockClientHandler.java deleted file mode 100644 index 194089748..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockClientHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class MockClientHandler implements ClientHandler { - - private static final Logger LOG = Log.logger(MockClientHandler.class); - - @Override - public void onChannelActive(ConnectionId connectionId) { - LOG.info("Client connection active, connectionId: {}", connectionId); - } - - @Override - public void onChannelInactive(ConnectionId connectionId) { - LOG.info("Client connection inActive, connectionId: {}", connectionId); - } - - @Override - public void exceptionCaught(TransportException cause, - ConnectionId connectionId) { - // Close the client associated with the given connectionId - LOG.info("Client connection exception, connectionId: {}, cause:", - connectionId, cause); - } - - @Override - public void sendAvailable(ConnectionId connectionId) { - LOG.info("Client is able to send data, connectionId: {}", connectionId); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockMessageHandler.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockMessageHandler.java deleted file mode 100644 index 0d86c3360..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockMessageHandler.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.io.File; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.util.Log; -import org.slf4j.Logger; - -public class MockMessageHandler implements MessageHandler { - - private static final Logger LOG = Log.logger(MockMessageHandler.class); - - @Override - public void handle(MessageType messageType, int partition, - NetworkBuffer buffer) { - LOG.info("Receive data from remote, messageType: {}, partition: {}, " + - "buffer readable length: {}", messageType.name(), partition, - buffer != null ? buffer.length() : null); - - if (buffer != null) { - if (buffer instanceof FileRegionBuffer) { - String path = ((FileRegionBuffer) buffer).path(); - LOG.info("path: {}", path); - FileUtils.deleteQuietly(new File(path)); - } else { - buffer.copyToByteArray(); - } - } - } - - @Override - public String genOutputPath(MessageType messageType, int partition) { - return "./" + UUID.randomUUID().toString(); - } - - @Override - public void onStarted(ConnectionId connectionId) { - LOG.info("Start session completed, connectionId: {}", - connectionId); - } - - @Override - public void onFinished(ConnectionId connectionId) { - LOG.info("Finish session completed, connectionId: {}", - connectionId); - } - - @Override - public void onChannelActive(ConnectionId connectionId) { - LOG.info("Server channel active, connectionId: {}", connectionId); - } - - @Override - public void onChannelInactive(ConnectionId connectionId) { - LOG.info("Server channel inActive, connectionId: {}", connectionId); - } - - @Override - public void exceptionCaught(TransportException cause, - ConnectionId connectionId) { - LOG.info("Server channel exception, connectionId: {}, cause:", - connectionId, cause); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockUnDecodeMessage.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockUnDecodeMessage.java deleted file mode 100644 index c1a38e136..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/MockUnDecodeMessage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.message.RequestMessage; -import org.apache.hugegraph.computer.core.network.message.ResponseMessage; - -public class MockUnDecodeMessage extends AbstractMessage - implements RequestMessage, ResponseMessage { - - @Override - public MessageType type() { - return MessageType.MSG; - } - - @Override - public int requestId() { - return 0; - } - - @Override - public int ackId() { - return 0; - } - - @Override - public int sequenceNumber() { - return 0; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/NetworkTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/NetworkTestSuite.java deleted file mode 100644 index e0a52c1e8..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/NetworkTestSuite.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import org.apache.hugegraph.computer.core.network.buffer.NetworkBufferTest; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManagerTest; -import org.apache.hugegraph.computer.core.network.netty.HeartbeatHandlerTest; -import org.apache.hugegraph.computer.core.network.netty.NettyClientFactoryTest; -import org.apache.hugegraph.computer.core.network.netty.NettyEncodeDecodeHandlerTest; -import org.apache.hugegraph.computer.core.network.netty.NettyTransportClientTest; -import org.apache.hugegraph.computer.core.network.netty.NettyTransportServerTest; -import org.apache.hugegraph.computer.core.network.session.TransportSessionTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - NettyTransportServerTest.class, - ConnectionIdTest.class, - NettyClientFactoryTest.class, - ConnectionManagerTest.class, - TransportUtilTest.class, - TransportSessionTest.class, - NettyTransportClientTest.class, - NettyEncodeDecodeHandlerTest.class, - HeartbeatHandlerTest.class, - NetworkBufferTest.class, - DataServerManagerTest.class -}) -public class NetworkTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtilTest.java deleted file mode 100644 index f4d50b7ac..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/TransportUtilTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network; - -import java.net.InetSocketAddress; - -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; -import io.netty.channel.Channel; -import io.netty.channel.embedded.EmbeddedChannel; - -public class TransportUtilTest { - - @Test - public void testRemoteAddressWithNull() { - Channel channel = null; - String address = TransportUtil.remoteAddress(channel); - Assert.assertNull(address); - - Channel channel2 = new EmbeddedChannel(); - channel2.close(); - String address2 = TransportUtil.remoteAddress(channel2); - Assert.assertNull(address2); - } - - @Test - public void testRemoteConnectionIDWithNull() { - Channel channel = null; - ConnectionId connectionId = TransportUtil.remoteConnectionId(channel); - Assert.assertNull(connectionId); - - Channel channel2 = new EmbeddedChannel(); - channel2.close(); - ConnectionId connectionId2 = TransportUtil.remoteConnectionId(channel2); - Assert.assertNull(connectionId2); - } - - @Test - public void testResolvedSocketAddress() { - InetSocketAddress address = TransportUtil.resolvedSocketAddress( - "www.baidu.com", 80); - Assert.assertFalse(address.isUnresolved()); - - InetSocketAddress address2 = TransportUtil.resolvedSocketAddress( - "www.baidu.com", 9797); - Assert.assertFalse(address2.isUnresolved()); - - InetSocketAddress address3 = TransportUtil.resolvedSocketAddress( - "xxxxx", 80); - Assert.assertTrue(address3.isUnresolved()); - - InetSocketAddress address4 = TransportUtil.resolvedSocketAddress( - "127.0.0.1", 80); - Assert.assertFalse(address4.isUnresolved()); - } - - @Test - public void testFormatAddress() { - InetSocketAddress address = TransportUtil.resolvedSocketAddress( - "xxxxx", 80); - String formatAddress = TransportUtil.formatAddress(address); - Assert.assertEquals("xxxxx:80", formatAddress); - - InetSocketAddress address2 = TransportUtil.resolvedSocketAddress( - "127.0.0.1", 8089); - String formatAddress2 = TransportUtil.formatAddress(address2); - Assert.assertContains("127.0.0.1:8089", formatAddress2); - } - - @Test - public void testReadString() { - byte[] testData = StringEncodeUtil.encode("test data"); - ByteBuf buffer = Unpooled.directBuffer(testData.length); - try { - buffer.writeInt(testData.length); - buffer.writeBytes(testData); - String readString = TransportUtil.readString(buffer); - Assert.assertEquals("test data", readString); - } finally { - buffer.release(); - } - } - - @Test - public void testWriteString() { - ByteBuf buffer = Unpooled.buffer(); - try { - TransportUtil.writeString(buffer, "test data"); - String readString = TransportUtil.readString(buffer); - Assert.assertEquals("test data", readString); - } finally { - buffer.release(); - } - } - - @Test - public void testWriteStringWithEmptyString() { - ByteBuf buffer = Unpooled.buffer(); - try { - TransportUtil.writeString(buffer, ""); - String readString = TransportUtil.readString(buffer); - Assert.assertEquals("", readString); - } finally { - buffer.release(); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBufferTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBufferTest.java deleted file mode 100644 index 9c4927196..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/buffer/NetworkBufferTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.buffer; - -import java.nio.ByteBuffer; - -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; - -public class NetworkBufferTest { - - @Test - public void testRetain() { - ByteBuffer byteBuffer = ByteBuffer.allocate(10); - NetworkBuffer nioNetworkBuffer = new NioBuffer(byteBuffer); - nioNetworkBuffer.retain(); - nioNetworkBuffer.release(); - Assert.assertSame(nioNetworkBuffer.nioByteBuffer().array(), - byteBuffer.array()); - nioNetworkBuffer.release(); - - ByteBuf byteBuf = Unpooled.buffer(10); - int cnt = byteBuf.refCnt(); - NetworkBuffer nettyNetworkBuffer = new NettyBuffer(byteBuf); - nettyNetworkBuffer.retain(); - Assert.assertSame(cnt + 1, byteBuf.refCnt()); - Assert.assertSame(cnt + 1, nettyNetworkBuffer.referenceCount()); - ByteBuf buf = nettyNetworkBuffer.nettyByteBuf(); - nettyNetworkBuffer.retain(); - Assert.assertSame(cnt + 2, buf.refCnt()); - Assert.assertSame(cnt + 2, nettyNetworkBuffer.referenceCount()); - nettyNetworkBuffer.release(); - nettyNetworkBuffer.release(); - nettyNetworkBuffer.release(); - } - - @Test - public void testRelease() { - ByteBuffer byteBuffer = ByteBuffer.allocate(10); - NetworkBuffer nioNetworkBuffer = new NioBuffer(byteBuffer); - Assert.assertSame(nioNetworkBuffer.nioByteBuffer().array(), - byteBuffer.array()); - nioNetworkBuffer.release(); - - ByteBuf byteBuf = Unpooled.buffer(10); - int cnt = byteBuf.refCnt(); - NetworkBuffer nettyNetworkBuffer = new NettyBuffer(byteBuf); - nettyNetworkBuffer.release(); - Assert.assertSame(cnt - 1, nettyNetworkBuffer.referenceCount()); - } - - @Test - public void testNioByteBuffer() { - ByteBuffer byteBuffer = ByteBuffer.allocate(10); - NetworkBuffer nioNetworkBuffer = new NioBuffer(byteBuffer); - Assert.assertSame(nioNetworkBuffer.nioByteBuffer().array(), - byteBuffer.array()); - nioNetworkBuffer.release(); - - ByteBuf byteBuf = Unpooled.buffer(10); - NetworkBuffer nettyNetworkBuffer = new NettyBuffer(byteBuf); - ByteBuffer buffer = nettyNetworkBuffer.nioByteBuffer(); - Assert.assertSame(buffer.array(), byteBuf.array()); - } - - @Test - public void testNettyByteBuffer() { - ByteBuffer byteBuffer = ByteBuffer.allocate(10); - NetworkBuffer nioNetworkBuffer = new NioBuffer(byteBuffer); - Assert.assertSame(nioNetworkBuffer.nettyByteBuf().array(), - byteBuffer.array()); - nioNetworkBuffer.release(); - Assert.assertEquals(0, nioNetworkBuffer.referenceCount()); - - ByteBuf byteBuf = Unpooled.buffer(10); - NetworkBuffer nettyNetworkBuffer = new NettyBuffer(byteBuf); - ByteBuf buf = nettyNetworkBuffer.nettyByteBuf(); - Assert.assertSame(buf.array(), byteBuf.array()); - } - - @Test - public void testCopyToByteArray() { - String testData = "test data"; - byte[] bytesSource = StringEncodeUtil.encode(testData); - - ByteBuffer byteBuffer = ByteBuffer.allocateDirect(bytesSource.length); - byteBuffer = byteBuffer.put(bytesSource); - byteBuffer.flip(); - NioBuffer nioManagedBuffer = new NioBuffer(byteBuffer); - byte[] bytes = nioManagedBuffer.copyToByteArray(); - Assert.assertArrayEquals(bytesSource, bytes); - Assert.assertNotSame(bytesSource, bytes); - - ByteBuffer byteBuffer2 = ByteBuffer.allocate(bytesSource.length); - byteBuffer2 = byteBuffer2.put(bytesSource); - byteBuffer2.flip(); - - int position = byteBuffer2.position(); - int remaining = byteBuffer2.remaining(); - NioBuffer nioManagedBuffer2 = new NioBuffer(byteBuffer2); - byte[] bytes2 = nioManagedBuffer2.copyToByteArray(); - Assert.assertArrayEquals(bytesSource, bytes2); - Assert.assertNotSame(bytesSource, bytes2); - Assert.assertEquals(position, byteBuffer2.position()); - Assert.assertEquals(remaining, byteBuffer2.remaining()); - - ByteBuf buf3 = Unpooled.directBuffer(bytesSource.length); - try { - buf3 = buf3.writeBytes(bytesSource); - int readerIndex = buf3.readerIndex(); - int readableBytes = buf3.readableBytes(); - NettyBuffer nettyManagedBuffer3 = - new NettyBuffer(buf3); - byte[] bytes3 = nettyManagedBuffer3.copyToByteArray(); - Assert.assertArrayEquals(bytesSource, bytes3); - Assert.assertNotSame(bytesSource, bytes3); - Assert.assertEquals(readerIndex, buf3.readerIndex()); - Assert.assertEquals(readableBytes, buf3.readableBytes()); - } finally { - buf3.release(); - } - - ByteBuf buf4 = Unpooled.buffer(bytesSource.length); - try { - buf4 = buf4.writeBytes(bytesSource); - NettyBuffer nettyManagedBuffer4 = - new NettyBuffer(buf4); - byte[] bytes4 = nettyManagedBuffer4.copyToByteArray(); - Assert.assertArrayEquals(bytesSource, bytes4); - Assert.assertNotSame(bytesSource, bytes4); - } finally { - buf4.release(); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManagerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManagerTest.java deleted file mode 100644 index 503e3aed2..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/connection/ConnectionManagerTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.connection; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.MockClientHandler; -import org.apache.hugegraph.computer.core.network.MockMessageHandler; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportServer; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class ConnectionManagerTest extends UnitTestBase { - - private static ConnectionManager connectionManager; - private static int port; - - @Before - public void setup() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_IO_MODE, "NIO" - ); - MessageHandler serverHandler = new MockMessageHandler(); - ClientHandler clientHandler = new MockClientHandler(); - connectionManager = new TransportConnectionManager(); - port = connectionManager.startServer(config, serverHandler); - connectionManager.initClientManager(config, clientHandler); - } - - @After - public void teardown() { - if (connectionManager != null) { - connectionManager.shutdown(); - } - } - - @Test - public void testGetServer() { - TransportServer server = connectionManager.getServer(); - Assert.assertTrue(server.bound()); - Assert.assertEquals(port, server.port()); - Assert.assertNotEquals(0, server.port()); - } - - @Test - public void testGetServerWithNoStart() { - ConnectionManager connectionManager1 = new TransportConnectionManager(); - Assert.assertThrows(IllegalArgumentException.class, - connectionManager1::getServer, e -> { - Assert.assertContains("has not been initialized yet", - e.getMessage()); - }); - } - - @Test - public void testGetOrCreateClient() throws IOException { - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", port); - TransportClient client = connectionManager.getOrCreateClient( - connectionId); - Assert.assertTrue(client.active()); - } - - - @Test - public void testCloseClientWithHostAndPort() throws IOException { - TransportClient client = connectionManager.getOrCreateClient( - "127.0.0.1", port); - Assert.assertTrue(client.active()); - } - - @Test - public void testCloseClient() throws IOException { - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", port); - TransportClient client = connectionManager.getOrCreateClient( - connectionId); - Assert.assertTrue(client.active()); - connectionManager.closeClient(client.connectionId()); - Assert.assertFalse(client.active()); - } - - @Test - public void testGetClientWithNoInit() { - ConnectionManager connectionManager1 = new TransportConnectionManager(); - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", port); - Assert.assertThrows(IllegalArgumentException.class, () -> { - connectionManager1.getOrCreateClient(connectionId); - }, e -> { - Assert.assertContains("has not been initialized yet", - e.getMessage()); - }); - } - - @Test - public void testShutDown() throws IOException { - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", port); - TransportClient client = connectionManager.getOrCreateClient( - connectionId); - Assert.assertTrue(client.active()); - connectionManager.shutdownClients(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - connectionManager.getOrCreateClient(connectionId); - }, e -> { - Assert.assertContains("has not been initialized yet", - e.getMessage()); - }); - connectionManager.shutdownServer(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - connectionManager.getServer(); - }, e -> { - Assert.assertContains("has not been initialized yet", - e.getMessage()); - }); - connectionManager.shutdown(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNetworkTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNetworkTest.java deleted file mode 100644 index c1e45f6f8..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/AbstractNetworkTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ClientHandler; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MessageHandler; -import org.apache.hugegraph.computer.core.network.MockClientHandler; -import org.apache.hugegraph.computer.core.network.MockMessageHandler; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportServer; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.computer.core.network.connection.TransportConnectionManager; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.ConfigOption; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.core.config.Configurator; -import org.junit.After; -import org.junit.Before; -import org.mockito.Mockito; - -import io.netty.bootstrap.ServerBootstrap; - -public abstract class AbstractNetworkTest extends UnitTestBase { - - private static final Map, String> OPTIONS = new HashMap<>(); - protected static Config config; - protected static TransportConf conf; - protected static MessageHandler serverHandler; - protected static ClientHandler clientHandler; - protected static ConnectionManager connectionManager; - protected static NettyProtocol clientProtocol; - protected static NettyProtocol serverProtocol; - protected static String host; - protected static int port; - - static { - List localIPAddress = TransportUtil.getLocalIPAddress(); - if (!localIPAddress.isEmpty()) { - host = localIPAddress.get(0); - } else { - host = "127.0.0.1"; - } - } - - protected abstract void initOption(); - - protected void updateOption(ConfigOption key, Object value) { - OPTIONS.put(key, String.valueOf(value)); - } - - protected TransportClient oneClient() throws IOException { - ConnectionId connectionId = ConnectionId.parseConnectionId(host, port); - TransportClient client = connectionManager.getOrCreateClient( - connectionId); - Assert.assertTrue(client.active()); - return client; - } - - @Before - public void setup() { - Configurator.setAllLevels("org.apache.hugegraph", Level.DEBUG); - OPTIONS.put(ComputerOptions.TRANSPORT_SERVER_HOST, host); - OPTIONS.put(ComputerOptions.TRANSPORT_IO_MODE, "AUTO"); - OPTIONS.put(ComputerOptions.TRANSPORT_SERVER_PORT, "0"); - this.initOption(); - Object[] objects = new Object[OPTIONS.size() * 2]; - Set, String>> kvs = OPTIONS.entrySet(); - int i = 0; - for (Map.Entry, String> kv : kvs) { - objects[i++] = kv.getKey(); - objects[i++] = kv.getValue(); - } - - config = UnitTestBase.updateWithRequiredOptions(objects); - conf = TransportConf.wrapConfig(config); - serverHandler = Mockito.spy(new MockMessageHandler()); - clientHandler = Mockito.spy(new MockClientHandler()); - connectionManager = new TransportConnectionManager(); - port = connectionManager.startServer(config, serverHandler); - connectionManager.initClientManager(config, clientHandler); - - this.mockSpyProtocol(); - } - - @After - public void teardown() { - if (connectionManager != null) { - connectionManager.shutdown(); - connectionManager = null; - } - Configurator.setAllLevels("org.apache.hugegraph", Level.INFO); - } - - private void mockSpyProtocol() { - Object clientFactory = Whitebox.getInternalState(connectionManager, - "clientFactory"); - NettyProtocol protocol2 = Whitebox.getInternalState(clientFactory, - "protocol"); - clientProtocol = Mockito.spy(protocol2); - Whitebox.setInternalState(clientFactory, "protocol", - clientProtocol); - - TransportServer sever = connectionManager.getServer(); - ServerBootstrap bootstrap = Whitebox.getInternalState(sever, - "bootstrap"); - Object channelInitializer = Whitebox.invoke(ServerBootstrap.class, - "childHandler", bootstrap); - NettyProtocol protocol = Whitebox.getInternalState(channelInitializer, - "protocol"); - serverProtocol = Mockito.spy(protocol); - Whitebox.setInternalState(channelInitializer, "protocol", - serverProtocol); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactoryTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactoryTest.java deleted file mode 100644 index a558080c6..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyClientFactoryTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.MockClientHandler; -import org.apache.hugegraph.computer.core.network.MockMessageHandler; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class NettyClientFactoryTest extends UnitTestBase { - - private static Config config; - private static MockClientHandler clientHandler; - private NettyTransportServer server; - private TransportClient client; - - @Before - public void setup() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_SERVER_PORT, "8086", - ComputerOptions.TRANSPORT_SERVER_THREADS, "3", - ComputerOptions.TRANSPORT_IO_MODE, "NIO", - ComputerOptions.TRANSPORT_RECEIVE_BUFFER_SIZE, "128", - ComputerOptions.TRANSPORT_SEND_BUFFER_SIZE, "128" - ); - MockMessageHandler serverHandler = new MockMessageHandler(); - clientHandler = new MockClientHandler(); - this.server = new NettyTransportServer(); - this.server.listen(config, serverHandler); - } - - @After - public void teardown() { - if (this.client != null) { - this.client.close(); - } - if (this.server != null) { - this.server.shutdown(); - } - } - - @Test - public void testInit() { - TransportConf conf = TransportConf.wrapConfig(config); - NettyClientFactory clientFactory = new NettyClientFactory(conf); - clientFactory.init(); - Object bootstrap = Whitebox.getInternalState(clientFactory, - "bootstrap"); - Assert.assertNotNull(bootstrap); - } - - @Test - public void testCreateClient() throws IOException { - TransportConf conf = TransportConf.wrapConfig(config); - NettyClientFactory clientFactory = new NettyClientFactory(conf); - clientFactory.init(); - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", 8086); - this.client = clientFactory.createClient(connectionId, clientHandler); - Assert.assertTrue(this.client.active()); - } - - @Test - public void testClose() throws IOException { - TransportConf conf = TransportConf.wrapConfig(config); - NettyClientFactory clientFactory = new NettyClientFactory(conf); - clientFactory.init(); - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", 8086); - this.client = clientFactory.createClient(connectionId, clientHandler); - Assert.assertTrue(this.client.active()); - this.client.close(); - Assert.assertFalse(this.client.active()); - } - - @Test - public void testCreateClientWithErrorSocket() { - TransportConf conf = TransportConf.wrapConfig(config); - NettyClientFactory clientFactory = new NettyClientFactory(conf); - clientFactory.init(); - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", 7777); - Assert.assertThrows(IOException.class, () -> { - this.client = clientFactory.createClient(connectionId, - clientHandler); - }, e -> { - Assert.assertContains("Failed to create connection", - e.getMessage()); - }); - } - - @Test - public void testCreateClientWithNoInit() { - TransportConf conf = TransportConf.wrapConfig(config); - NettyClientFactory clientFactory = new NettyClientFactory(conf); - ConnectionId connectionId = ConnectionId.parseConnectionId( - "127.0.0.1", 7777); - Assert.assertThrows(IllegalArgumentException.class, () -> { - this.client = clientFactory.createClient(connectionId, - clientHandler); - }, e -> { - Assert.assertContains("has not been initialized yet", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClientTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClientTest.java deleted file mode 100644 index fac4046b6..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportClientTest.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.File; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.function.Function; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.buffer.FileRegionBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.Bytes; -import org.junit.Test; -import org.mockito.Mockito; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; - -public class NettyTransportClientTest extends AbstractNetworkTest { - - @Override - protected void initOption() { - super.updateOption(ComputerOptions.TRANSPORT_MAX_PENDING_REQUESTS, 8); - super.updateOption(ComputerOptions.TRANSPORT_MIN_PENDING_REQUESTS, 6); - super.updateOption(ComputerOptions.TRANSPORT_WRITE_BUFFER_HIGH_MARK, 64 * (int) Bytes.MB); - super.updateOption(ComputerOptions.TRANSPORT_WRITE_BUFFER_LOW_MARK, 32 * (int) Bytes.MB); - super.updateOption(ComputerOptions.TRANSPORT_MIN_ACK_INTERVAL, 200L); - super.updateOption(ComputerOptions.TRANSPORT_FINISH_SESSION_TIMEOUT, 30_000L); - } - - @Test - public void testChannel() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - Channel channel = client.channel(); - Assert.assertTrue(channel.isActive()); - } - - @Test - public void testConnectID() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - ConnectionId connectionId = ConnectionId.parseConnectionId(host, port); - ConnectionId clientConnectionId = client.connectionId(); - Assert.assertEquals(connectionId, clientConnectionId); - } - - @Test - public void testRemoteAddress() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - ConnectionId connectionId = ConnectionId.parseConnectionId(host, port); - InetSocketAddress address = client.remoteAddress(); - Assert.assertEquals(connectionId.socketAddress(), address); - } - - @Test - public void testStartSession() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - client.startSession(); - } - - @Test - public void testStartAsync() throws Exception { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - Future future = client.startSessionAsync(); - future.get(conf.timeoutSyncRequest(), TimeUnit.MILLISECONDS); - } - - @Test - public void testFinishSession() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - client.startSession(); - client.finishSession(); - } - - @Test - public void testFinishAsync() throws Exception { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - Future startFuture = client.startSessionAsync(); - startFuture.get(conf.timeoutSyncRequest(), TimeUnit.MILLISECONDS); - Future finishFuture = client.finishSessionAsync(); - finishFuture.get(conf.timeoutFinishSession(), TimeUnit.MILLISECONDS); - } - - @Test - public void testSend() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - for (int i = 0; i < 3; i++) { - client.startSession(); - client.send(MessageType.MSG, 1, ByteBuffer.wrap(StringEncodeUtil.encode("test1"))); - client.send(MessageType.VERTEX, 2, ByteBuffer.wrap(StringEncodeUtil.encode("test2"))); - client.send(MessageType.EDGE, 3, ByteBuffer.wrap(StringEncodeUtil.encode("test3"))); - client.finishSession(); - } - } - - @Test - public void testDataUniformity() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - byte[] sourceBytes1 = StringEncodeUtil.encode("test data message"); - byte[] sourceBytes2 = StringEncodeUtil.encode("test data edge"); - byte[] sourceBytes3 = StringEncodeUtil.encode("test data vertex"); - - Mockito.doAnswer(invocationOnMock -> { - MessageType type = invocationOnMock.getArgument(0); - NetworkBuffer buffer = invocationOnMock.getArgument(2); - byte[] sourceBytes = null; - switch (type) { - case MSG: - sourceBytes = sourceBytes1; - break; - case EDGE: - sourceBytes = sourceBytes2; - break; - case VERTEX: - sourceBytes = sourceBytes3; - break; - default: - } - - byte[] bytes; - if (buffer instanceof FileRegionBuffer) { - String path = ((FileRegionBuffer) buffer).path(); - File file = new File(path); - bytes = FileUtils.readFileToByteArray(file); - FileUtils.deleteQuietly(file); - } else { - bytes = buffer.copyToByteArray(); - } - - Assert.assertArrayEquals(sourceBytes, bytes); - Assert.assertNotSame(sourceBytes, bytes); - - return null; - }).when(serverHandler).handle(Mockito.any(), Mockito.eq(1), Mockito.any()); - - client.startSession(); - client.send(MessageType.MSG, 1, ByteBuffer.wrap(sourceBytes1)); - client.send(MessageType.EDGE, 1, ByteBuffer.wrap(sourceBytes2)); - client.send(MessageType.VERTEX, 1, ByteBuffer.wrap(sourceBytes3)); - client.finishSession(); - } - - @Test - public void testStartSessionWithTimeout() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - - Function sendFunc = message -> null; - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFunc); - - Assert.assertThrows(TransportException.class, client::startSession, e -> { - Assert.assertContains("to wait start-response", e.getMessage()); - }); - } - - @Test - public void testFinishSessionWithTimeout() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - client.startSession(); - - Function sendFunc = message -> null; - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFunc); - - Whitebox.setInternalState(client, "timeoutFinishSession", 1000L); - - Assert.assertThrows(TransportException.class, client::finishSession, e -> { - Assert.assertContains("to wait finish-response", e.getMessage()); - }); - } - - @Test - public void testStartSessionWithSendException() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - - @SuppressWarnings("unchecked") - Function sendFunc = Mockito.mock(Function.class); - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFunc); - - Mockito.doThrow(new RuntimeException("test exception")) - .when(sendFunc) - .apply(Mockito.any()); - - Assert.assertThrows(RuntimeException.class, client::startSession, e -> { - Assert.assertContains("test exception", e.getMessage()); - }); - } - - @Test - public void testFinishSessionWithSendException() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - client.startSession(); - - @SuppressWarnings("unchecked") - Function> sendFunc = Mockito.mock(Function.class); - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFunc); - - Mockito.doThrow(new RuntimeException("test exception")) - .when(sendFunc) - .apply(Mockito.any()); - - Assert.assertThrows(RuntimeException.class, client::finishSession, e -> { - Assert.assertContains("test exception", e.getMessage()); - }); - } - - @Test - public void testFlowControl() throws IOException { - ByteBuffer buffer = ByteBuffer.wrap(StringEncodeUtil.encode("test data")); - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - - client.startSession(); - - Object sendFuncBak = Whitebox.getInternalState(client.clientSession(), "sendFunction"); - Function sendFunc = message -> null; - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFunc); - - for (int i = 1; i <= conf.maxPendingRequests() * 2; i++) { - boolean send = client.send(MessageType.MSG, 1, buffer); - if (i <= conf.maxPendingRequests()) { - Assert.assertTrue(send); - } else { - Assert.assertFalse(send); - } - } - - int maxRequestId = Whitebox.getInternalState(client.clientSession(), "maxRequestId"); - int maxAckId = Whitebox.getInternalState(client.clientSession(), "maxAckId"); - Assert.assertEquals(conf.maxPendingRequests(), maxRequestId); - Assert.assertEquals(0, maxAckId); - - int pendings = conf.maxPendingRequests() - conf.minPendingRequests(); - for (int i = 1; i <= pendings + 1; i++) { - Assert.assertFalse(client.checkSendAvailable()); - client.clientSession().onRecvAck(i); - } - Assert.assertTrue(client.checkSendAvailable()); - - maxAckId = Whitebox.getInternalState(client.clientSession(), "maxAckId"); - Assert.assertEquals(pendings + 1, maxAckId); - - Whitebox.setInternalState(client.clientSession(), "sendFunction", sendFuncBak); - } - - @Test - public void testHandlerException() throws IOException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - client.startSession(); - - Mockito.doThrow(new RuntimeException("test exception")).when(serverHandler) - .handle(Mockito.any(), Mockito.anyInt(), Mockito.any()); - - ByteBuffer buffer = ByteBuffer.wrap(StringEncodeUtil.encode("test data")); - boolean send = client.send(MessageType.MSG, 1, buffer); - Assert.assertTrue(send); - - Whitebox.setInternalState(client, "timeoutFinishSession", 1000L); - - Assert.assertThrows(TransportException.class, client::finishSession, e -> { - Assert.assertContains("finish-response", e.getMessage()); - }); - - Mockito.verify(serverHandler, Mockito.timeout(10_000L).times(1)) - .exceptionCaught(Mockito.any(), Mockito.any()); - } - - @Test - public void testCheckMinPendingRequests() { - UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_MAX_PENDING_REQUESTS, "100", - ComputerOptions.TRANSPORT_MIN_PENDING_REQUESTS, "101" - ); - config = ComputerContext.instance().config(); - - TransportConf conf = TransportConf.wrapConfig(config); - - Assert.assertThrows(IllegalArgumentException.class, conf::minPendingRequests); - } - - @Test - public void testSessionActive() throws IOException, InterruptedException, ExecutionException, - TimeoutException { - NettyTransportClient client = (NettyTransportClient) this.oneClient(); - - Assert.assertFalse(client.sessionActive()); - - CompletableFuture future = client.startSessionAsync(); - Assert.assertFalse(client.sessionActive()); - - future.get(5, TimeUnit.SECONDS); - Assert.assertTrue(client.sessionActive()); - - CompletableFuture finishFuture = client.finishSessionAsync(); - Assert.assertTrue(client.sessionActive()); - - finishFuture.get(5, TimeUnit.SECONDS); - Assert.assertFalse(client.sessionActive()); - - client.close(); - Assert.assertFalse(client.sessionActive()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServerTest.java deleted file mode 100644 index 58ce87b75..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyTransportServerTest.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.netty; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.List; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.network.IOMode; -import org.apache.hugegraph.computer.core.network.MockMessageHandler; -import org.apache.hugegraph.computer.core.network.TransportConf; -import org.apache.hugegraph.computer.core.network.TransportUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import io.netty.channel.epoll.Epoll; - -public class NettyTransportServerTest extends UnitTestBase { - - private static Config config; - private static MockMessageHandler messageHandler; - private NettyTransportServer server; - - @Before - public void setup() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_SERVER_PORT, "0", - ComputerOptions.TRANSPORT_SERVER_THREADS, "3", - ComputerOptions.TRANSPORT_IO_MODE, "NIO", - ComputerOptions.TRANSPORT_MAX_SYN_BACKLOG, "1024" - ); - messageHandler = new MockMessageHandler(); - this.server = new NettyTransportServer(); - } - - @After - public void teardown() { - if (this.server != null) { - this.server.shutdown(); - } - } - - @Test - public void testConstructor() throws IOException { - try (NettyTransportServer nettyServer = new NettyTransportServer()) { - Assert.assertNotEquals(null, nettyServer); - } - } - - @Test - public void testListenWithDefaultPort() { - int port = this.server.listen(config, messageHandler); - - TransportConf conf = this.server.conf(); - Assert.assertLte(3, conf.serverThreads()); - Assert.assertEquals(IOMode.NIO, conf.ioMode()); - Assert.assertEquals("127.0.0.1", - conf.serverAddress().getHostAddress()); - - Assert.assertNotEquals(0, this.server.port()); - Assert.assertNotEquals(0, port); - Assert.assertEquals("127.0.0.1", this.server.ip()); - String hostName = this.server.bindAddress().getHostName(); - Assert.assertEquals("localhost", hostName); - Assert.assertEquals(port, this.server.port()); - } - - @Test - public void testListenWithLocalHost() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "localhost" - ); - int port = this.server.listen(config, messageHandler); - - TransportConf conf = this.server.conf(); - Assert.assertEquals("localhost", conf.serverAddress().getHostName()); - - Assert.assertNotEquals(0, this.server.port()); - Assert.assertNotEquals(0, port); - Assert.assertEquals("127.0.0.1", this.server.ip()); - Assert.assertEquals(port, this.server.port()); - } - - @Test - public void testListenWithLocalAddress() throws UnknownHostException { - InetAddress localHost = InetAddress.getLocalHost(); - String hostName = localHost.getHostName(); - String ip = InetAddress.getLocalHost().getHostAddress(); - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, hostName - ); - int port = this.server.listen(config, messageHandler); - - TransportConf conf = this.server.conf(); - Assert.assertEquals(hostName, conf.serverAddress().getHostName()); - - Assert.assertNotEquals(0, this.server.port()); - Assert.assertNotEquals(0, port); - Assert.assertEquals(ip, this.server.ip()); - Assert.assertEquals(port, this.server.port()); - } - - @Test - public void testListenWithLocalIp() { - List ips = TransportUtil.getLocalIPAddress(); - if (!ips.isEmpty()) { - String ip = ips.get(0); - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, ip - ); - int port = this.server.listen(config, messageHandler); - Assert.assertNotEquals(0, this.server.port()); - Assert.assertNotEquals(0, port); - Assert.assertEquals(ip, this.server.ip()); - Assert.assertEquals(port, this.server.port()); - } - } - - @Test - public void testListenWithZeroIp() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "0.0.0.0" - ); - int port = this.server.listen(config, messageHandler); - - TransportConf conf = this.server.conf(); - Assert.assertEquals("0.0.0.0", conf.serverAddress().getHostAddress()); - - Assert.assertNotEquals(0, port); - Assert.assertNotEquals(0, this.server.port()); - Assert.assertTrue(this.server.bindAddress().getAddress() - .isAnyLocalAddress()); - Assert.assertEquals(port, this.server.port()); - } - - @Test - public void testListenWithAssignPort() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_SERVER_PORT, "9091" - ); - - int port = this.server.listen(config, messageHandler); - - TransportConf conf = this.server.conf(); - Assert.assertEquals("127.0.0.1", - conf.serverAddress().getHostAddress()); - - Assert.assertEquals(9091, this.server.port()); - Assert.assertEquals(9091, port); - String ip = this.server.bindAddress().getAddress().getHostAddress(); - Assert.assertEquals("127.0.0.1", ip); - Assert.assertEquals(port, this.server.port()); - } - - @Test - public void testListenWithInvalidHost() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "abcdefd", - ComputerOptions.TRANSPORT_SERVER_PORT, "0", - ComputerOptions.TRANSPORT_SERVER_THREADS, "3", - ComputerOptions.TRANSPORT_IO_MODE, "NIO" - ); - - Assert.assertThrows(ComputerException.class, () -> { - this.server.listen(config, messageHandler); - }, e -> { - Assert.assertContains("Failed to parse", e.getMessage()); - }); - } - - @Test - public void testListenWithInvalidPort() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_SERVER_PORT, "67899", - ComputerOptions.TRANSPORT_SERVER_THREADS, "3", - ComputerOptions.TRANSPORT_IO_MODE, "NIO" - ); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - this.server.listen(config, messageHandler); - }, e -> { - Assert.assertContains("port out of range", e.getMessage()); - }); - } - - @Test - public void testListenTwice() { - int port = this.server.listen(config, messageHandler); - Assert.assertNotEquals(0, this.server.port()); - Assert.assertNotEquals(0, port); - Assert.assertEquals("127.0.0.1", this.server.ip()); - Assert.assertEquals(port, this.server.port()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - this.server.listen(config, messageHandler); - }, e -> { - Assert.assertContains("already been listened", e.getMessage()); - }); - } - - @Test - public void testEpollMode() { - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", - ComputerOptions.TRANSPORT_IO_MODE, "EPOLL" - ); - - if (Epoll.isAvailable()) { - this.server.listen(config, messageHandler); - Assert.assertEquals(IOMode.EPOLL, this.server.conf().ioMode()); - } else { - Assert.assertThrows(UnsatisfiedLinkError.class, () -> { - this.server.listen(config, messageHandler); - }); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSessionTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSessionTest.java deleted file mode 100644 index 0e74e70bb..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSessionTest.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.network.session; - -import java.nio.ByteBuffer; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.network.TransportState; -import org.apache.hugegraph.computer.core.network.message.AbstractMessage; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.network.netty.AbstractNetworkTest; -import org.apache.hugegraph.computer.core.util.StringEncodeUtil; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.ExecutorUtil; -import org.apache.hugegraph.util.Log; -import org.junit.Test; -import org.slf4j.Logger; - -public class TransportSessionTest extends AbstractNetworkTest { - - private static final Logger LOG = Log.logger(TransportSessionTest.class); - - public static final String TASK_SCHEDULER = "task-scheduler-%d"; - - @Override - protected void initOption() { - super.updateOption(ComputerOptions.TRANSPORT_SYNC_REQUEST_TIMEOUT, - 5_000L); - } - - @Test - public void testConstruct() { - ServerSession serverSession = new ServerSession(conf); - Assert.assertEquals(TransportState.READY, - serverSession.state()); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - serverSession.maxRequestId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - serverSession.maxAckId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - serverSession.finishId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - Whitebox.getInternalState(serverSession, - "maxHandledId")); - - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, - clientSession.state()); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.maxRequestId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.maxAckId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.finishId); - Assert.assertFalse(clientSession.flowBlocking()); - } - - @Test - public void testStart() throws TransportException, InterruptedException { - ScheduledExecutorService executorService = - ExecutorUtil.newScheduledThreadPool(1, TASK_SCHEDULER); - - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, clientSession.state()); - - this.syncStartWithAutoComplete(executorService, clientSession); - - executorService.shutdown(); - } - - @Test - public void testFinish() throws TransportException, InterruptedException { - ScheduledExecutorService executorService = - ExecutorUtil.newScheduledThreadPool(1, TASK_SCHEDULER); - - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, clientSession.state()); - - this.syncStartWithAutoComplete(executorService, clientSession); - - int finishId = AbstractMessage.START_SEQ + 1; - this.syncFinishWithAutoComplete(executorService, clientSession, - finishId); - - executorService.shutdown(); - } - - @Test - public void testStartWithException() throws InterruptedException, - TransportException { - ScheduledExecutorService executorService = - ExecutorUtil.newScheduledThreadPool(1, TASK_SCHEDULER); - - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, clientSession.state()); - - this.syncStartWithAutoComplete(executorService, clientSession); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - clientSession.start(conf.timeoutSyncRequest()); - }, e -> { - Assert.assertContains("The state must be READY " + - "instead of ESTABLISHED at startAsync()", - e.getMessage()); - }); - } - - @Test - public void testSendAsyncWithException() { - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, clientSession.state()); - - ByteBuffer buffer = ByteBuffer.wrap(StringEncodeUtil.encode("test data")); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - clientSession.sendAsync(MessageType.MSG, 1, buffer); - }, e -> { - Assert.assertContains("The state must be ESTABLISHED " + - "instead of READY at sendAsync()", - e.getMessage()); - }); - } - - @Test - public void testFinishWithException() throws InterruptedException, - TransportException { - ScheduledExecutorService executorService = - ExecutorUtil.newScheduledThreadPool(1, TASK_SCHEDULER); - - ClientSession clientSession = new ClientSession(conf, message -> null); - Assert.assertEquals(TransportState.READY, clientSession.state()); - - this.syncStartWithAutoComplete(executorService, clientSession); - - this.syncFinishWithAutoComplete(executorService, clientSession, 1); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - clientSession.finish(conf.timeoutFinishSession()); - }, e -> { - Assert.assertContains("The state must be ESTABLISHED " + - "instead of READY at finishAsync()", - e.getMessage()); - }); - } - - @Test - public void testServerSession() { - ServerSession serverSession = new ServerSession(conf); - Assert.assertEquals(TransportState.READY, serverSession.state()); - - serverSession.onRecvStateStart(); - Assert.assertEquals(TransportState.START_RECV, serverSession.state()); - - serverSession.completeStateStart(); - Assert.assertEquals(TransportState.ESTABLISHED, serverSession.state()); - Assert.assertEquals(AbstractMessage.START_SEQ, serverSession.maxAckId); - Assert.assertEquals(AbstractMessage.START_SEQ, - Whitebox.getInternalState(serverSession, - "maxHandledId")); - - for (int i = 1; i < 100 ; i++) { - serverSession.onRecvData(i); - Assert.assertEquals(i, serverSession.maxRequestId); - serverSession.onHandledData(i); - Assert.assertEquals(i, Whitebox.getInternalState(serverSession, - "maxHandledId")); - serverSession.onDataAckSent(i); - Assert.assertEquals(i, serverSession.maxAckId); - } - - serverSession.onRecvStateFinish(100); - Assert.assertEquals(TransportState.FINISH_RECV, - serverSession.state()); - - serverSession.completeStateFinish(); - Assert.assertEquals(TransportState.READY, serverSession.state()); - } - - @Test - public void testServerSessionWithException() { - ServerSession serverSession = new ServerSession(conf); - Assert.assertEquals(TransportState.READY, serverSession.state()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - serverSession.onRecvData(1); - }, e -> { - Assert.assertContains("The state must be ESTABLISHED " + - "instead of READY", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - serverSession.onRecvStateFinish(1); - }, e -> { - Assert.assertContains("The state must be ESTABLISHED " + - "instead of READY", - e.getMessage()); - }); - - serverSession.onRecvStateStart(); - serverSession.completeStateStart(); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - serverSession.onRecvData(2); - }, e -> { - Assert.assertContains("The requestId must be increasing", - e.getMessage()); - }); - - serverSession.onRecvData(1); - serverSession.onHandledData(1); - serverSession.onDataAckSent(1); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - serverSession.onDataAckSent(1); - }, e -> { - Assert.assertContains("The ackId must be increasing", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - serverSession.onRecvStateFinish(1); - }, e -> { - Assert.assertContains("The finishId must be maxRequestId + 1", - e.getMessage()); - }); - } - - @Test - public void testCheckFinishReady() { - ServerSession serverSession = new ServerSession(conf); - Assert.assertEquals(TransportState.READY, serverSession.state()); - - serverSession.onRecvStateStart(); - serverSession.completeStateStart(); - - Boolean finishRead2 = Whitebox.invoke(serverSession.getClass(), - "needAckFinish", - serverSession); - Assert.assertFalse(finishRead2); - - serverSession.onRecvStateFinish(1); - serverSession.completeStateFinish(); - } - - private void syncStartWithAutoComplete(ScheduledExecutorService pool, - ClientSession clientSession) - throws TransportException, - InterruptedException { - List exceptions = new CopyOnWriteArrayList<>(); - - pool.schedule(() -> { - Assert.assertEquals(TransportState.START_SENT, - clientSession.state()); - try { - clientSession.onRecvAck(AbstractMessage.START_SEQ); - } catch (Throwable e) { - LOG.error("Failed to call receiveAck", e); - exceptions.add(e); - } - }, 2, TimeUnit.SECONDS); - - clientSession.start(conf.timeoutSyncRequest()); - - Assert.assertEquals(TransportState.ESTABLISHED, - clientSession.state()); - Assert.assertEquals(AbstractMessage.START_SEQ, - clientSession.maxRequestId); - Assert.assertEquals(AbstractMessage.START_SEQ, - clientSession.maxAckId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.finishId); - - Assert.assertFalse(this.existError(exceptions)); - } - - private void syncFinishWithAutoComplete(ScheduledExecutorService pool, - ClientSession clientSession, - int finishId) - throws InterruptedException, - TransportException { - List exceptions = new CopyOnWriteArrayList<>(); - - pool.schedule(() -> { - Assert.assertEquals(TransportState.FINISH_SENT, - clientSession.state()); - try { - clientSession.onRecvAck(finishId); - } catch (Throwable e) { - LOG.error("Failed to call receiveAck", e); - exceptions.add(e); - } - }, 2, TimeUnit.SECONDS); - - clientSession.finish(conf.timeoutFinishSession()); - - Assert.assertEquals(TransportState.READY, - clientSession.state()); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.finishId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.maxAckId); - Assert.assertEquals(AbstractMessage.UNKNOWN_SEQ, - clientSession.maxRequestId); - Assert.assertFalse(clientSession.flowBlocking()); - - Assert.assertFalse(this.existError(exceptions)); - } - - private boolean existError(List exceptions) { - boolean error = false; - for (Throwable e : exceptions) { - if (e != null) { - error = true; - break; - } - } - return error; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffersTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffersTest.java deleted file mode 100644 index 7a78cfeb9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvBuffersTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class MessageRecvBuffersTest { - - private static final long WAIT_TIMEOUT = 100L; //ms - - @Test - public void testBufferToBuffers() { - long threshold = 1024L; - int size = 100; - MessageRecvBuffers buffers = new MessageRecvBuffers(threshold, - WAIT_TIMEOUT); - // It's ok to wait for empty buffers - buffers.waitSorted(); - - for (int i = 0; i < 10; i++) { - addMockBufferToBuffers(buffers, size); - } - - Assert.assertFalse(buffers.full()); - Assert.assertEquals(1000L, buffers.totalBytes()); - - Assert.assertThrows(ComputerException.class, () -> { - buffers.waitSorted(); - }, e -> { - Assert.assertContains("Buffers have not been sorted in 100 ms", - e.getMessage()); - }); - - addMockBufferToBuffers(buffers, size); - Assert.assertTrue(buffers.full()); - - List list = buffers.buffers(); - Assert.assertEquals(11, list.size()); - - buffers.signalSorted(); - List list2 = buffers.buffers(); - Assert.assertEquals(11, list2.size()); - Assert.assertEquals(1100L, buffers.totalBytes()); - - // It's ok to call waitSorted multi-times - buffers.waitSorted(); - buffers.waitSorted(); - - // Next time again - buffers.prepareSort(); - List list3 = buffers.buffers(); - Assert.assertEquals(0, list3.size()); - Assert.assertEquals(0L, buffers.totalBytes()); - - buffers.waitSorted(); - - for (int i = 0; i < 10; i++) { - addMockBufferToBuffers(buffers, size); - } - - Assert.assertEquals(1000L, buffers.totalBytes()); - Assert.assertFalse(buffers.full()); - - Assert.assertThrows(ComputerException.class, () -> { - buffers.waitSorted(); - }, e -> { - Assert.assertContains("Buffers have not been sorted in 100 ms", - e.getMessage()); - }); - - addMockBufferToBuffers(buffers, size); - - Assert.assertTrue(buffers.full()); - - List list4 = buffers.buffers(); - Assert.assertEquals(11, list4.size()); - } - - @Test - public void testSortBuffer() throws InterruptedException { - long threshold = 1024L; - int size = 100; - MessageRecvBuffers buffers = new MessageRecvBuffers(threshold, - WAIT_TIMEOUT); - for (int i = 0; i < 10; i++) { - addMockBufferToBuffers(buffers, size); - } - CountDownLatch countDownLatch = new CountDownLatch(2); - ExecutorService executorService = Executors.newFixedThreadPool(2); - - executorService.submit(() -> { - buffers.waitSorted(); - countDownLatch.countDown(); - }); - - executorService.submit(() -> { - buffers.signalSorted(); - countDownLatch.countDown(); - }); - - executorService.shutdown(); - countDownLatch.await(); - } - - @Test - public void testWaitSortTimeout() { - long threshold = 1024L; - int size = 100; - MessageRecvBuffers buffers = new MessageRecvBuffers(threshold, - WAIT_TIMEOUT); - for (int i = 0; i < 10; i++) { - addMockBufferToBuffers(buffers, size); - } - - Assert.assertThrows(ComputerException.class, () -> { - buffers.waitSorted(); - }, e -> { - Assert.assertContains("Buffers have not been sorted in 100 ms", - e.getMessage()); - }); - } - - @Test - public void testSortInterrupt() throws InterruptedException { - long threshold = 1024L; - int size = 100; - MessageRecvBuffers buffers = new MessageRecvBuffers(threshold, - WAIT_TIMEOUT); - for (int i = 0; i < 10; i++) { - addMockBufferToBuffers(buffers, size); - } - AtomicBoolean success = new AtomicBoolean(false); - CountDownLatch countDownLatch = new CountDownLatch(1); - Thread sortThread = new Thread(() -> { - buffers.waitSorted(); - }); - sortThread.setUncaughtExceptionHandler((t, e) -> { - String expected = "Interrupted while waiting buffers to be sorted"; - try { - Assert.assertContains(expected, e.getMessage()); - success.set(true); - } finally { - countDownLatch.countDown(); - } - }); - sortThread.start(); - sortThread.interrupt(); - countDownLatch.await(); - Assert.assertTrue(success.get()); - } - - public static void addMockBufferToBuffers(MessageRecvBuffers buffers, - int mockBufferLength) { - ReceiverUtil.consumeBuffer(new byte[mockBufferLength], - (NetworkBuffer buffer) -> { - buffers.addBuffer(buffer); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManagerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManagerTest.java deleted file mode 100644 index bba8b9e54..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/MessageRecvManagerTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.Map; - -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.computer.core.receiver.edge.EdgeMessageRecvPartitionTest; -import org.apache.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitionTest; -import org.apache.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitionTest; -import org.apache.hugegraph.computer.core.snapshot.SnapshotManager; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class MessageRecvManagerTest extends UnitTestBase { - - private Config config; - private FileManager fileManager; - private SortManager sortManager; - private MessageRecvManager receiveManager; - private SnapshotManager snapshotManager; - private ConnectionId connectionId; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.BSP_MAX_SUPER_STEP, "1", - ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName(), - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "100", - ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT, "100", - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName(), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - this.sortManager = new RecvSortManager(context()); - this.sortManager.init(this.config); - this.receiveManager = new MessageRecvManager(context(), this.fileManager, this.sortManager); - this.snapshotManager = new SnapshotManager(context(), null, receiveManager, null); - this.receiveManager.init(this.config); - this.connectionId = new ConnectionId(new InetSocketAddress("localhost", 8081), 0); - } - - @After - public void teardown() { - this.receiveManager.close(this.config); - this.fileManager.close(this.config); - this.sortManager.close(this.config); - } - - @Test - public void testVertexAndEdgeMessage() throws IOException { - // Send vertex messages - this.receiveManager.onStarted(this.connectionId); - this.receiveManager.onFinished(this.connectionId); - VertexMessageRecvPartitionTest.addTenVertexBuffer((NetworkBuffer buffer) -> { - this.receiveManager.handle(MessageType.VERTEX, 0, buffer); - }); - - EdgeMessageRecvPartitionTest.addTenEdgeBuffer((NetworkBuffer buffer) -> { - this.receiveManager.handle(MessageType.EDGE, 0, buffer); - }); - // Send edge messages - this.receiveManager.onStarted(this.connectionId); - this.receiveManager.onFinished(this.connectionId); - - this.receiveManager.waitReceivedAllMessages(); - Map> vertexPartitions = - this.receiveManager.vertexPartitions(); - Map> edgePartitions = - this.receiveManager.edgePartitions(); - Assert.assertEquals(1, vertexPartitions.size()); - Assert.assertEquals(1, edgePartitions.size()); - VertexMessageRecvPartitionTest.checkPartitionIterator(vertexPartitions.get(0)); - EdgeMessageRecvPartitionTest.checkTenEdges(edgePartitions.get(0)); - } - - @Test - public void testComputeMessage() throws IOException { - // Superstep 0 - this.receiveManager.beforeSuperstep(this.config, 0); - ComputeMessageRecvPartitionTest.addTwentyCombineMessageBuffer((NetworkBuffer buffer) -> { - this.receiveManager.handle(MessageType.MSG, 0, buffer); - }); - this.receiveManager.onFinished(this.connectionId); - - this.receiveManager.waitReceivedAllMessages(); - this.receiveManager.afterSuperstep(this.config, 0); - - Map> messagePartitions = - this.receiveManager.messagePartitions(); - Assert.assertEquals(1, messagePartitions.size()); - ComputeMessageRecvPartitionTest.checkTenCombineMessages(messagePartitions.get(0)); - } - - @Test - public void testOtherMessageType() { - Assert.assertThrows(ComputerException.class, () -> { - ReceiverUtil.consumeBuffer(new byte[100], (NetworkBuffer buffer) -> { - this.receiveManager.handle(MessageType.ACK, 0, buffer); - }); - }, e -> { - Assert.assertEquals("Unable handle NetworkBuffer with type 'ACK'", - e.getMessage()); - }); - } - - @Test - public void testNotEnoughFinishMessages() { - this.receiveManager.beforeSuperstep(this.config, 0); - Assert.assertThrows(ComputerException.class, () -> { - this.receiveManager.waitReceivedAllMessages(); - }, e -> { - Assert.assertContains("finish-messages", e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverTestSuite.java deleted file mode 100644 index 19a89fbeb..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverTestSuite.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import org.apache.hugegraph.computer.core.receiver.edge.EdgeMessageRecvPartitionTest; -import org.apache.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitionTest; -import org.apache.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitionTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - MessageRecvManagerTest.class, - MessageRecvBuffersTest.class, - VertexMessageRecvPartitionTest.class, - EdgeMessageRecvPartitionTest.class, - ComputeMessageRecvPartitionTest.class -}) -public class ReceiverTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverUtil.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverUtil.java deleted file mode 100644 index d17d24435..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/ReceiverUtil.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver; - -import java.io.IOException; -import java.util.function.Consumer; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.StreamGraphInput; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.network.buffer.NettyBuffer; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.core.store.entry.Pointer; - -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; - -public class ReceiverUtil { - - public static void consumeBuffer(byte[] bytes, - Consumer consumer) { - ByteBuf buf = Unpooled.directBuffer(bytes.length); - try { - buf = buf.writeBytes(bytes); - NettyBuffer buff = new NettyBuffer(buf); - consumer.accept(buff); - } finally { - buf.release(); - } - } - - public static Id readId(Pointer pointer) throws IOException { - RandomAccessInput input = pointer.input(); - input.seek(pointer.offset()); - return StreamGraphInput.readId(input); - } - - public static void readValue(Pointer pointer, Readable value) - throws IOException { - RandomAccessInput input = pointer.input(); - long position = input.position(); - input.seek(pointer.offset()); - value.read(input); - input.seek(position); - } - - public static byte[] writeMessage(Id id, Writable message) - throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - - entryOutput.writeEntry(out -> { - id.write(out); - }, message); - return bytesOutput.toByteArray(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitionTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitionTest.java deleted file mode 100644 index 28e6b520d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/edge/EdgeMessageRecvPartitionTest.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.edge; - -import java.io.File; -import java.io.IOException; -import java.util.Iterator; -import java.util.function.Consumer; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.combiner.MergeNewPropertiesCombiner; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.edge.Edge; -import org.apache.hugegraph.computer.core.graph.edge.Edges; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.receiver.ReceiverUtil; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.KvEntryWriter; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class EdgeMessageRecvPartitionTest extends UnitTestBase { - - private Config config; - private EdgeMessageRecvPartition partition; - private FileManager fileManager; - private SortManager sortManager; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "100", - ComputerOptions.HGKV_MERGE_FILES_NUM, "2", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - FileUtils.deleteQuietly(new File("data_dir1")); - FileUtils.deleteQuietly(new File("data_dir2")); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - this.sortManager = new RecvSortManager(context()); - this.sortManager.init(this.config); - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.partition = new EdgeMessageRecvPartition(context(), fileGenerator, - this.sortManager); - } - - @After - public void teardown() { - this.fileManager.close(this.config); - this.sortManager.close(this.config); - } - - @Test - public void testEdgeMessageRecvPartition() throws IOException { - Assert.assertEquals("edge", this.partition.type()); - - addTenEdgeBuffer((NetworkBuffer buffer) -> { - this.partition.addBuffer(buffer); - }); - - checkTenEdges(this.partition.iterator()); - - this.fileManager.close(this.config); - } - - @Test - public void testOverwriteCombiner() throws IOException { - Assert.assertEquals("edge", this.partition.type()); - - addTenEdgeBuffer(this.partition::addBuffer); - addTenEdgeBuffer(this.partition::addBuffer); - - checkTenEdges(this.partition.iterator()); - - this.fileManager.close(this.config); - } - - @Test - public void testNotOverwritePropertiesCombiner() throws IOException { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "10000", - ComputerOptions.HGKV_MERGE_FILES_NUM, "5", - ComputerOptions.WORKER_EDGE_PROPERTIES_COMBINER_CLASS, - MergeNewPropertiesCombiner.class.getName(), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - FileUtils.deleteQuietly(new File("data_dir1")); - FileUtils.deleteQuietly(new File("data_dir2")); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.partition = new EdgeMessageRecvPartition(context(), fileGenerator, - this.sortManager); - Assert.assertEquals("edge", this.partition.type()); - - addTenDuplicateEdgeBuffer(this.partition::addBuffer); - - checkTenEdgesWithCombinedProperties(this.partition.iterator()); - } - - public static void addTenEdgeBuffer(Consumer consumer) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - Edges edges = graphFactory().createEdges(2); - for (long j = i + 1; j < i + 3; j++) { - Edge edge = graphFactory().createEdge(); - edge.targetId(BytesId.of(j)); - Properties properties = graphFactory().createProperties(); - properties.put("p1", new LongValue(i)); - edge.properties(properties); - edges.add(edge); - } - vertex.edges(edges); - ReceiverUtil.consumeBuffer(writeEdges(vertex), consumer); - } - } - - private static void addTenDuplicateEdgeBuffer( - Consumer consumer) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - Edges edges = graphFactory().createEdges(2); - for (long j = i + 1; j < i + 3; j++) { - Edge edge = graphFactory().createEdge(); - edge.targetId(BytesId.of(j)); - Properties properties = graphFactory().createProperties(); - properties.put("p1", new LongValue(i)); - edge.properties(properties); - edges.add(edge); - } - vertex.edges(edges); - ReceiverUtil.consumeBuffer(writeEdges(vertex), consumer); - } - - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - Edges edges = graphFactory().createEdges(2); - for (long j = i + 1; j < i + 3; j++) { - Edge edge = graphFactory().createEdge(); - edge.targetId(BytesId.of(j)); - Properties properties = graphFactory().createProperties(); - properties.put("p2", new LongValue(2L * i)); - edge.properties(properties); - edges.add(edge); - } - vertex.edges(edges); - ReceiverUtil.consumeBuffer(writeEdges(vertex), consumer); - } - } - - - public static void checkTenEdges(PeekableIterator it) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Assert.assertTrue(it.hasNext()); - KvEntry entry = it.next(); - Id id = ReceiverUtil.readId(entry.key()); - Assert.assertEquals(BytesId.of(i), id); - - EntryIterator subKvIt = EntriesUtil.subKvIterFromEntry(entry); - for (long j = i + 1; j < i + 3; j++) { - Assert.assertTrue(subKvIt.hasNext()); - KvEntry subKv = subKvIt.next(); - Id targetId = ReceiverUtil.readId(subKv.key()); - Assert.assertEquals(BytesId.of(j), targetId); - - Properties properties = graphFactory().createProperties(); - ReceiverUtil.readValue(subKv.value(), properties); - Assert.assertEquals(1, properties.size()); - LongValue v1 = properties.get("p1"); - Assert.assertEquals(new LongValue(i), v1); - } - } - Assert.assertFalse(it.hasNext()); - } - - private static void checkTenEdgesWithCombinedProperties( - Iterator it) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Assert.assertTrue(it.hasNext()); - KvEntry entry = it.next(); - Id id = ReceiverUtil.readId(entry.key()); - Assert.assertEquals(BytesId.of(i), id); - EntryIterator subKvIt = EntriesUtil.subKvIterFromEntry(entry); - for (long j = i + 1; j < i + 3; j++) { - Assert.assertTrue(subKvIt.hasNext()); - KvEntry subKv = subKvIt.next(); - Id targetId = ReceiverUtil.readId(subKv.key()); - Assert.assertEquals(BytesId.of(j), targetId); - Properties properties = graphFactory().createProperties(); - - ReceiverUtil.readValue(subKv.value(), properties); - Assert.assertEquals(2, properties.size()); - LongValue v1 = properties.get("p1"); - Assert.assertEquals(new LongValue(i), v1); - LongValue v2 = properties.get("p2"); - Assert.assertEquals(new LongValue(2L * i), v2); - } - } - Assert.assertFalse(it.hasNext()); - } - - private static byte[] writeEdges(Vertex vertex) throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - - Id id = vertex.id(); - KvEntryWriter subKvWriter = entryOutput.writeEntry(out -> { - id.write(out); - }); - for (Edge edge : vertex.edges()) { - Id targetId = edge.targetId(); - subKvWriter.writeSubKv(out -> { - targetId.write(out); - }, out -> { - edge.properties().write(out); - }); - } - subKvWriter.writeFinish(); - return bytesOutput.toByteArray(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitionTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitionTest.java deleted file mode 100644 index 185d4335d..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/vertex/VertexMessageRecvPartitionTest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.receiver.vertex; - -import java.io.File; -import java.io.IOException; -import java.util.function.Consumer; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.combiner.MergeNewPropertiesCombiner; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.StreamGraphInput; -import org.apache.hugegraph.computer.core.network.buffer.NetworkBuffer; -import org.apache.hugegraph.computer.core.receiver.ReceiverUtil; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager; -import org.apache.hugegraph.computer.core.sort.sorting.SortManager; -import org.apache.hugegraph.computer.core.store.FileManager; -import org.apache.hugegraph.computer.core.store.SuperstepFileGenerator; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class VertexMessageRecvPartitionTest extends UnitTestBase { - - private Config config; - private VertexMessageRecvPartition partition; - private FileManager fileManager; - private SortManager sortManager; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "20", - ComputerOptions.HGKV_MERGE_FILES_NUM, "5", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - FileUtils.deleteQuietly(new File("data_dir1")); - FileUtils.deleteQuietly(new File("data_dir2")); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - this.sortManager = new RecvSortManager(context()); - this.sortManager.init(this.config); - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.partition = new VertexMessageRecvPartition(context(), - fileGenerator, - this.sortManager); - } - - @After - public void teardown() { - this.fileManager.close(this.config); - this.sortManager.close(this.config); - } - - @Test - public void testVertexMessageRecvPartition() throws IOException { - Assert.assertEquals("vertex", this.partition.type()); - Assert.assertEquals(0L, this.partition.totalBytes()); - addTenVertexBuffer(this.partition::addBuffer); - - PeekableIterator it = this.partition.iterator(); - checkPartitionIterator(it); - Assert.assertFalse(it.hasNext()); - } - - @Test - public void testOverwriteCombiner() throws IOException { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "1000", - ComputerOptions.HGKV_MERGE_FILES_NUM, "5", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - FileUtils.deleteQuietly(new File("data_dir1")); - FileUtils.deleteQuietly(new File("data_dir2")); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.partition = new VertexMessageRecvPartition(context(), - fileGenerator, - this.sortManager); - addTenVertexBuffer(this.partition::addBuffer); - addTenVertexBuffer(this.partition::addBuffer); - - checkPartitionIterator(this.partition.iterator()); - - this.fileManager.close(this.config); - } - - @Test - public void testMergePropertiesCombiner() throws IOException { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.JOB_PARTITIONS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]", - ComputerOptions.WORKER_RECEIVED_BUFFERS_BYTES_LIMIT, "10000", - ComputerOptions.HGKV_MERGE_FILES_NUM, "5", - ComputerOptions.WORKER_VERTEX_PROPERTIES_COMBINER_CLASS, - MergeNewPropertiesCombiner.class.getName(), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - FileUtils.deleteQuietly(new File("data_dir1")); - FileUtils.deleteQuietly(new File("data_dir2")); - this.fileManager = new FileManager(); - this.fileManager.init(this.config); - SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator( - this.fileManager, - Constants.INPUT_SUPERSTEP); - this.partition = new VertexMessageRecvPartition(context(), - fileGenerator, - this.sortManager); - - addTwentyDuplicateVertexBuffer(this.partition::addBuffer); - - checkTenVertexWithMergedProperties(this.partition.iterator()); - - this.fileManager.close(this.config); - } - - @Test - public void testMergeBuffersFailed() { - addTwoEmptyBuffer(this.partition::addBuffer); - - Assert.assertThrows(ComputerException.class, () -> { - this.partition.iterator(); - }, e -> { - Assert.assertContains("Failed to merge 2 buffers to file", - e.getMessage()); - }); - } - - @Test - public void testEmptyIterator() { - PeekableIterator it = this.partition.iterator(); - Assert.assertFalse(it.hasNext()); - } - - public static void addTenVertexBuffer(Consumer consumer) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - vertex.properties(graphFactory().createProperties()); - ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer); - } - } - - private static void addTwentyDuplicateVertexBuffer( - Consumer consumer) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - Properties properties = graphFactory().createProperties(); - properties.put("p1", new LongValue(i)); - vertex.properties(properties); - - ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer); - } - - for (long i = 0L; i < 10L; i++) { - Vertex vertex = graphFactory().createVertex(); - vertex.id(BytesId.of(i)); - Properties properties = graphFactory().createProperties(); - properties.put("p2", new LongValue(2L * i)); - vertex.properties(properties); - - ReceiverUtil.consumeBuffer(writeVertex(vertex), consumer); - } - } - - private static void addTwoEmptyBuffer(Consumer consumer) { - for (int i = 0; i < 2; i++) { - ReceiverUtil.consumeBuffer(new byte[2], consumer); - } - } - - private static byte[] writeVertex(Vertex vertex) throws IOException { - BytesOutput bytesOutput = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(bytesOutput); - - entryOutput.writeEntry(out -> { - vertex.id().write(out); - }, out -> { - out.writeUTF(vertex.label()); - vertex.properties().write(out); - }); - - return bytesOutput.toByteArray(); - } - - private static void checkTenVertexWithMergedProperties( - PeekableIterator it) - throws IOException { - for (long i = 0L; i < 10L; i++) { - // Assert key - Assert.assertTrue(it.hasNext()); - KvEntry entry = it.next(); - Id id = ReceiverUtil.readId(entry.key()); - Assert.assertEquals(BytesId.of(i), id); - - // Assert value - Pointer value = entry.value(); - RandomAccessInput input = value.input(); - long position = input.position(); - input.seek(value.offset()); - String label = StreamGraphInput.readLabel(input); - Assert.assertEquals("", label); - Properties properties = graphFactory().createProperties(); - properties.read(input); - input.seek(position); - - Assert.assertEquals(2, properties.size()); - LongValue v1 = properties.get("p1"); - Assert.assertEquals(new LongValue(i), v1); - LongValue v2 = properties.get("p2"); - Assert.assertEquals(new LongValue(2L * i), v2); - } - } - - public static void checkPartitionIterator(PeekableIterator it) - throws IOException { - for (long i = 0L; i < 10L; i++) { - Assert.assertTrue(it.hasNext()); - KvEntry entry = it.next(); - Id id = ReceiverUtil.readId(entry.key()); - Assert.assertEquals(BytesId.of(i), id); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueueTest.java deleted file mode 100644 index 37db2a010..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageQueueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.nio.ByteBuffer; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.Test; - -public class MessageQueueTest { - - @Test - public void testPutAndTake() throws InterruptedException { - AtomicInteger notifyCounter = new AtomicInteger(); - MessageQueue queue = new MessageQueue(notifyCounter::incrementAndGet); - - QueuedMessage message1 = new QueuedMessage(1, MessageType.VERTEX, - ByteBuffer.allocate(4)); - // Trigger notifier called - queue.put(message1); - Assert.assertEquals(1, notifyCounter.get()); - - QueuedMessage message2 = new QueuedMessage(2, MessageType.EDGE, - ByteBuffer.allocate(4)); - queue.put(message2); - Assert.assertEquals(2, notifyCounter.get()); - - BlockingQueue blockQueue = Whitebox.getInternalState(queue, "queue"); - Assert.assertEquals(2, blockQueue.size()); - - Assert.assertEquals(message1.partitionId(), queue.peek().partitionId()); - Assert.assertEquals(2, blockQueue.size()); - - Assert.assertEquals(message1.partitionId(), queue.take().partitionId()); - Assert.assertEquals(1, blockQueue.size()); - - Assert.assertEquals(message2.partitionId(), queue.take().partitionId()); - Assert.assertEquals(0, blockQueue.size()); - - // Trigger notifier called - queue.put(message1); - Assert.assertEquals(3, notifyCounter.get()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffersTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffersTest.java deleted file mode 100644 index 6f644d011..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendBuffersTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.Map; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class MessageSendBuffersTest extends UnitTestBase { - - @Test - public void testConstructor() { - UnitTestBase.updateOptions( - ComputerOptions.JOB_PARTITIONS_COUNT, "3", - ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD, "100", - ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD, "120" - ); - - MessageSendBuffers buffers = new MessageSendBuffers( - ComputerContext.instance()); - Map innerBuffers = buffers.all(); - Assert.assertEquals(3, innerBuffers.size()); - } - - @Test - public void testGetter() { - UnitTestBase.updateOptions( - ComputerOptions.JOB_PARTITIONS_COUNT, "3", - ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD, "100", - ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD, "120" - ); - MessageSendBuffers buffers = new MessageSendBuffers( - ComputerContext.instance()); - Assert.assertNotNull(buffers.get(0)); - Assert.assertNotNull(buffers.get(1)); - Assert.assertNotNull(buffers.get(2)); - Assert.assertThrows(ComputerException.class, () -> { - buffers.get(3); - }, e -> { - Assert.assertTrue(e.getMessage().contains("Invalid partition id")); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManagerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManagerTest.java deleted file mode 100644 index 6fdeca3fb..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MessageSendManagerTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import org.junit.Test; - -public class MessageSendManagerTest { - - @Test - public void test() { - // TODO: Supplement - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MockTransportClient.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MockTransportClient.java deleted file mode 100644 index e8ca46530..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MockTransportClient.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.util.concurrent.CompletableFuture; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.network.ConnectionId; -import org.apache.hugegraph.computer.core.network.TransportClient; -import org.apache.hugegraph.computer.core.network.message.MessageType; - -public class MockTransportClient implements TransportClient { - - private ConnectionId connectionId; - - public MockTransportClient() { - InetSocketAddress address = new InetSocketAddress("localhost", 8080); - this.connectionId = new ConnectionId(address); - } - - @Override - public void startSession() throws TransportException { - throw new ComputerException("Not implemented"); - } - - @Override - public CompletableFuture startSessionAsync() - throws TransportException { - throw new ComputerException("Not implemented"); - } - - @Override - public boolean send(MessageType messageType, - int partition, - ByteBuffer buffer) throws TransportException { - throw new ComputerException("Not implemented"); - } - - @Override - public void finishSession() throws TransportException { - throw new ComputerException("Not implemented"); - } - - @Override - public CompletableFuture finishSessionAsync() - throws TransportException { - throw new ComputerException("Not implemented"); - } - - @Override - public ConnectionId connectionId() { - return this.connectionId; - } - - @Override - public InetSocketAddress remoteAddress() { - throw new ComputerException("Not implemented"); - } - - @Override - public boolean active() { - throw new ComputerException("Not implemented"); - } - - @Override - public boolean sessionActive() { - throw new ComputerException("Not implemented"); - } - - @Override - public void close() { - throw new ComputerException("Not implemented"); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueueTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueueTest.java deleted file mode 100644 index 08d930c70..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueueTest.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.util.concurrent.CountDownLatch; - -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableSet; - -public class MultiQueueTest { - - @Test - public void testPutAndTake() throws InterruptedException { - MultiQueue queue = new MultiQueue(2); - Throwable[] exceptions = new Throwable[3]; - - CountDownLatch[] latches = new CountDownLatch[3]; - for (int i = 0; i < latches.length; i++) { - latches[i] = new CountDownLatch(1); - } - - Thread thread1 = new Thread(() -> { - try { - latches[0].await(); - queue.put(0, new QueuedMessage(1, MessageType.VERTEX, null)); - latches[1].await(); - queue.put(0, new QueuedMessage(3, MessageType.VERTEX, null)); - latches[2].await(); - queue.put(0, new QueuedMessage(5, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[0] = e; - } - }); - - Thread thread2 = new Thread(() -> { - try { - latches[0].await(); - queue.put(1, new QueuedMessage(2, MessageType.VERTEX, null)); - latches[1].await(); - queue.put(1, new QueuedMessage(4, MessageType.VERTEX, null)); - latches[2].await(); - queue.put(1, new QueuedMessage(6, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[1] = e; - } - }); - - Thread thread3 = new Thread(() -> { - try { - latches[0].countDown(); - Assert.assertTrue(ImmutableSet.of(1, 2).contains( - queue.take().partitionId())); - Assert.assertTrue(ImmutableSet.of(1, 2).contains( - queue.take().partitionId())); - - latches[1].countDown(); - Assert.assertTrue(ImmutableSet.of(3, 4).contains( - queue.take().partitionId())); - Assert.assertTrue(ImmutableSet.of(3, 4).contains( - queue.take().partitionId())); - - latches[2].countDown(); - Assert.assertTrue(ImmutableSet.of(5, 6).contains( - queue.take().partitionId())); - Assert.assertTrue(ImmutableSet.of(5, 6).contains( - queue.take().partitionId())); - } catch (Throwable e) { - exceptions[2] = e; - } - }); - - thread1.start(); - thread2.start(); - thread3.start(); - - thread1.join(); - thread2.join(); - thread3.join(); - - for (Throwable e : exceptions) { - Assert.assertNull(e); - } - } - - @Test - public void testPutAndTakeWithPutAtFront() throws InterruptedException { - MultiQueue queue = new MultiQueue(2); - Throwable[] exceptions = new Throwable[3]; - - CountDownLatch[] latches = new CountDownLatch[3]; - for (int i = 0; i < latches.length; i++) { - latches[i] = new CountDownLatch(1); - } - - Thread thread1 = new Thread(() -> { - try { - latches[0].await(); - queue.put(0, new QueuedMessage(1, MessageType.VERTEX, null)); - - latches[1].await(); - queue.put(0, new QueuedMessage(3, MessageType.VERTEX, null)); - latches[2].await(); - queue.put(0, new QueuedMessage(5, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[0] = e; - } - }); - - Thread thread2 = new Thread(() -> { - try { - latches[0].await(); - queue.put(1, new QueuedMessage(2, MessageType.VERTEX, null)); - - latches[1].await(); - queue.put(1, new QueuedMessage(4, MessageType.VERTEX, null)); - latches[2].await(); - queue.put(1, new QueuedMessage(6, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[1] = e; - } - }); - - Thread thread3 = new Thread(() -> { - try { - latches[0].countDown(); - QueuedMessage message1 = queue.take(); - QueuedMessage message2 = queue.take(); - Assert.assertTrue(ImmutableSet.of(1, 2).contains( - message1.partitionId())); - Assert.assertTrue(ImmutableSet.of(1, 2).contains( - message2.partitionId())); - - latches[1].countDown(); - QueuedMessage message = queue.take(); - Assert.assertTrue(ImmutableSet.of(3, 4).contains( - message.partitionId())); - - // Put the message at the front of the original queue - if ((message.partitionId() & 0x01) == 1) { - queue.putAtFront(0, message); - } else { - queue.putAtFront(1, message); - } - - Assert.assertTrue(ImmutableSet.of(3, 4).contains( - queue.take().partitionId())); - Assert.assertTrue(ImmutableSet.of(3, 4).contains( - queue.take().partitionId())); - - latches[2].countDown(); - Assert.assertTrue(ImmutableSet.of(5, 6).contains( - queue.take().partitionId())); - Assert.assertTrue(ImmutableSet.of(5, 6).contains( - queue.take().partitionId())); - } catch (Throwable e) { - exceptions[2] = e; - } - }); - - thread1.start(); - thread2.start(); - thread3.start(); - - thread1.join(); - thread2.join(); - thread3.join(); - - for (Throwable e : exceptions) { - Assert.assertNull(e); - } - } - - @Test - public void testTakeWithWait() throws InterruptedException { - MultiQueue queue = new MultiQueue(2); - Throwable[] exceptions = new Throwable[3]; - - Thread thread1 = new Thread(() -> { - try { - Thread.sleep(100); - queue.put(0, new QueuedMessage(1, MessageType.VERTEX, null)); - Thread.sleep(200); - queue.put(0, new QueuedMessage(3, MessageType.VERTEX, null)); - Thread.sleep(300); - queue.put(0, new QueuedMessage(5, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[0] = e; - } - }); - - Thread thread2 = new Thread(() -> { - try { - Thread.sleep(100); - queue.put(1, new QueuedMessage(2, MessageType.VERTEX, null)); - Thread.sleep(200); - queue.put(1, new QueuedMessage(4, MessageType.VERTEX, null)); - Thread.sleep(300); - queue.put(1, new QueuedMessage(6, MessageType.VERTEX, null)); - } catch (Throwable e) { - exceptions[1] = e; - } - }); - - Thread thread3 = new Thread(() -> { - try { - queue.take(); - queue.take(); - queue.take(); - queue.take(); - queue.take(); - queue.take(); - } catch (Throwable e) { - exceptions[2] = e; - } - }); - - thread1.start(); - thread2.start(); - thread3.start(); - - thread1.join(); - thread2.join(); - thread3.join(); - - for (Throwable e : exceptions) { - Assert.assertNull(e); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSenderTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSenderTest.java deleted file mode 100644 index 07fd15929..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSenderTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.worker.MockComputation2; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.Before; -import org.junit.Test; - -import com.google.common.collect.ImmutableSet; - -public class QueuedMessageSenderTest extends UnitTestBase { - - private Config config; - - @Before - public void setup() { - this.config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_002", - ComputerOptions.JOB_WORKERS_COUNT, "2", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.TRANSPORT_SERVER_PORT, "8086", - ComputerOptions.BSP_REGISTER_TIMEOUT, "30000", - ComputerOptions.BSP_LOG_INTERVAL, "10000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation2.class.getName() - ); - } - - @Test - public void testInitAndClose() { - QueuedMessageSender sender = new QueuedMessageSender(this.config); - sender.addWorkerClient(1, new MockTransportClient()); - sender.addWorkerClient(2, new MockTransportClient()); - sender.init(); - - Thread sendExecutor = Whitebox.getInternalState(sender, "sendExecutor"); - Assert.assertTrue(ImmutableSet.of(Thread.State.NEW, - Thread.State.RUNNABLE, - Thread.State.WAITING) - .contains(sendExecutor.getState())); - - sender.close(); - Assert.assertTrue(ImmutableSet.of(Thread.State.TERMINATED) - .contains(sendExecutor.getState())); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageTest.java deleted file mode 100644 index 50f8a0aac..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.nio.ByteBuffer; - -import org.apache.hugegraph.computer.core.network.message.MessageType; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class QueuedMessageTest { - - @Test - public void testGetter() { - QueuedMessage message = new QueuedMessage(1, MessageType.VERTEX, - ByteBuffer.allocate(4)); - Assert.assertEquals(1, message.partitionId()); - Assert.assertEquals(MessageType.VERTEX, message.type()); - Assert.assertEquals(ByteBuffer.allocate(4), message.buffer()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/SenderTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/SenderTestSuite.java deleted file mode 100644 index 36e57a3ed..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/SenderTestSuite.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - MessageSendBuffersTest.class, - MessageSendManagerTest.class, - MessageQueueTest.class, - MultiQueueTest.class, - QueuedMessageTest.class, - QueuedMessageSenderTest.class, - WriteBufferTest.class, - WriteBuffersTest.class -}) -public class SenderTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBufferTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBufferTest.java deleted file mode 100644 index 2d00f43f8..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBufferTest.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class WriteBufferTest extends UnitTestBase { - - private final ComputerContext context = ComputerContext.instance(); - - @Test - public void testConstructor() { - Assert.assertThrows(AssertionError.class, () -> { - new WriteBuffer(context, 0, 20); - }); - Assert.assertThrows(AssertionError.class, () -> { - new WriteBuffer(context, 10, -1); - }); - Assert.assertThrows(AssertionError.class, () -> { - new WriteBuffer(context, 20, 10); - }); - @SuppressWarnings("unused") - WriteBuffer buffer = new WriteBuffer(context, 10, 20); - } - - @Test - public void testReachThreshold() throws IOException { - WriteBuffer buffer = new WriteBuffer(context, 20, 50); - Assert.assertFalse(buffer.reachThreshold()); - - Vertex vertex = context.graphFactory().createVertex( - BytesId.of(1L), new DoubleValue(0.5d)); - // After write, the position is 11 - buffer.writeVertex(vertex); - Assert.assertFalse(buffer.reachThreshold()); - - // After write, the position is 22 - buffer.writeVertex(vertex); - Assert.assertTrue(buffer.reachThreshold()); - - // After write, the position is 33 - buffer.writeVertex(vertex); - Assert.assertTrue(buffer.reachThreshold()); - } - - @Test - public void testIsEmpty() throws IOException { - WriteBuffer buffer = new WriteBuffer(context, 10, 20); - Assert.assertTrue(buffer.isEmpty()); - - Vertex vertex = context.graphFactory().createVertex( - BytesId.of(1L), new DoubleValue(0.5d)); - buffer.writeVertex(vertex); - Assert.assertFalse(buffer.isEmpty()); - } - - @Test - public void testClear() throws IOException { - WriteBuffer buffer = new WriteBuffer(context, 10, 20); - Assert.assertTrue(buffer.isEmpty()); - - Vertex vertex = context.graphFactory().createVertex( - BytesId.of(1L), new DoubleValue(0.5d)); - buffer.writeVertex(vertex); - Assert.assertFalse(buffer.isEmpty()); - - buffer.clear(); - Assert.assertTrue(buffer.isEmpty()); - } - - @Test - public void testWriteVertex() throws IOException { - GraphFactory graphFactory = context.graphFactory(); - - // NOTE: need ensure the buffer size can hold follow writed bytes - WriteBuffer buffer = new WriteBuffer(context, 100, 110); - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - buffer.writeVertex(vertex); - long position1 = buffer.output().position(); - Assert.assertGt(0L, position1); - - vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - Properties properties = graphFactory.createProperties(); - properties.put("name", BytesId.of("marko")); - properties.put("age", new IntValue(18)); - properties.put("city", new ListValue<>(ValueType.ID, - ImmutableList.of(BytesId.of("wuhan"), - BytesId.of("xian")))); - vertex.properties(properties); - buffer.writeVertex(vertex); - long position2 = buffer.output().position(); - Assert.assertGt(position1, position2); - - vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - buffer.writeEdges(vertex); - long position3 = buffer.output().position(); - Assert.assertGt(position2, position3); - } - - @Test - public void testWriteVertexWithEdgeFreq() throws IOException { - GraphFactory graphFactory = context.graphFactory(); - - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - vertex.addEdge(graphFactory.createEdge("watch", "2222", - BytesId.of(4L))); - - WriteBuffer buffer; - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "SINGLE" - ); - buffer = new WriteBuffer(ComputerContext.instance(), 100, 110); - buffer.writeEdges(vertex); - long position1 = buffer.output().position(); - Assert.assertGt(0L, position1); - - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "SINGLE_PER_LABEL" - ); - // Pass a new context object, because config has updated - buffer = new WriteBuffer(ComputerContext.instance(), 100, 110); - buffer.writeEdges(vertex); - long position2 = buffer.output().position(); - Assert.assertGte(position1, position2); - - UnitTestBase.updateOptions( - ComputerOptions.INPUT_EDGE_FREQ, "MULTIPLE" - ); - // Pass a new context object, because config has updated - buffer = new WriteBuffer(ComputerContext.instance(), 100, 110); - buffer.writeEdges(vertex); - long position3 = buffer.output().position(); - Assert.assertGte(position2, position3); - } - - @Test - public void testWriteMessage() throws IOException { - WriteBuffer buffer = new WriteBuffer(context, 50, 100); - - buffer.writeMessage(BytesId.of(1L), new DoubleValue(0.85D)); - long position1 = buffer.output().position(); - Assert.assertGt(0L, position1); - - buffer.writeMessage(BytesId.of(2L), new DoubleValue(0.15D)); - long position2 = buffer.output().position(); - Assert.assertGt(position1, position2); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffersTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffersTest.java deleted file mode 100644 index c37ba854b..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/WriteBuffersTest.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sender; - -import java.io.IOException; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.properties.Properties; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.ListValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.StreamGraphInput; -import org.apache.hugegraph.computer.core.store.entry.EntryInput; -import org.apache.hugegraph.computer.core.store.entry.EntryInputImpl; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class WriteBuffersTest extends UnitTestBase { - - @Test - public void testConstructor() { - Assert.assertThrows(IllegalArgumentException.class, () -> { - new WriteBuffers(context(), 0, 20); - }, e -> { - Assert.assertTrue(e.getMessage().contains( - "The threshold of buffer must be > 0")); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - new WriteBuffers(context(), 10, -1); - }, e -> { - Assert.assertTrue(e.getMessage().contains( - "The capacity of buffer must be > 0")); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - new WriteBuffers(context(), 20, 10); - }, e -> { - Assert.assertTrue(e.getMessage().contains( - "The threshold must be <= capacity")); - }); - @SuppressWarnings("unused") - WriteBuffers buffers = new WriteBuffers(context(), 10, 20); - } - - @Test - public void testReachThreshold() throws IOException { - WriteBuffers buffers = new WriteBuffers(context(), 20, 50); - Assert.assertFalse(buffers.reachThreshold()); - - Vertex vertex = context().graphFactory().createVertex( - BytesId.of(1L), new DoubleValue(0.5d)); - // After write, the position is 11 - buffers.writeVertex(vertex); - Assert.assertFalse(buffers.reachThreshold()); - - // After write, the position is 22 - buffers.writeVertex(vertex); - Assert.assertTrue(buffers.reachThreshold()); - - // After write, the position is 33 - buffers.writeVertex(vertex); - Assert.assertTrue(buffers.reachThreshold()); - } - - @Test - public void testIsEmpty() throws IOException { - WriteBuffers buffers = new WriteBuffers(context(), 10, 20); - Assert.assertTrue(buffers.isEmpty()); - - Vertex vertex = context().graphFactory().createVertex( - BytesId.of(1L), new DoubleValue(0.5d)); - buffers.writeVertex(vertex); - Assert.assertFalse(buffers.isEmpty()); - } - - @Test - public void testWriteVertex() throws IOException { - GraphFactory graphFactory = context().graphFactory(); - - // NOTE: need ensure the buffer size can hold follow writed bytes - WriteBuffers buffers = new WriteBuffers(context(), 100, 110); - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - buffers.writeVertex(vertex); - WriteBuffer buffer = Whitebox.getInternalState(buffers, - "writingBuffer"); - long position1 = buffer.output().position(); - Assert.assertGt(0L, position1); - - vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - Properties properties = graphFactory.createProperties(); - properties.put("name", BytesId.of("marko")); - properties.put("age", new IntValue(18)); - properties.put("city", new ListValue<>(ValueType.ID, - ImmutableList.of(BytesId.of("wuhan"), - BytesId.of("xian")))); - vertex.properties(properties); - buffers.writeVertex(vertex); - buffer = Whitebox.getInternalState(buffers, "writingBuffer"); - long position2 = buffer.output().position(); - Assert.assertGt(position1, position2); - - vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - buffers.writeEdges(vertex); - buffer = Whitebox.getInternalState(buffers, "writingBuffer"); - long position3 = buffer.output().position(); - Assert.assertGt(position2, position3); - } - - @Test - public void testWriteMessage() throws IOException { - WriteBuffers buffers = new WriteBuffers(context(), 50, 100); - WriteBuffer buffer = Whitebox.getInternalState(buffers, - "writingBuffer"); - - buffers.writeMessage(BytesId.of(1L), new DoubleValue(0.85D)); - long position1 = buffer.output().position(); - Assert.assertGt(0L, position1); - - buffers.writeMessage(BytesId.of(2L), new DoubleValue(0.15D)); - long position2 = buffer.output().position(); - Assert.assertGt(position1, position2); - } - - @Test - public void testPrepareSorting() throws IOException, InterruptedException { - GraphFactory graphFactory = context().graphFactory(); - - WriteBuffers buffers = new WriteBuffers(context(), 50, 100); - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - buffers.writeEdges(vertex); - // Reached threshold, the position is 76 - Assert.assertTrue(buffers.reachThreshold()); - Assert.assertFalse(buffers.isEmpty()); - // Exchange writing buffer and sorting buffer - buffers.prepareSorting(); - Assert.assertFalse(buffers.reachThreshold()); - Assert.assertTrue(buffers.isEmpty()); - - Thread thread1 = new Thread(() -> { - Assert.assertThrows(ComputerException.class, () -> { - buffers.prepareSorting(); - }, e -> { - Assert.assertTrue(e.getMessage().contains("Interrupted")); - }); - }); - thread1.start(); - - Thread.sleep(100); - thread1.interrupt(); - } - - @Test - public void testSwitchAndFinishSorting() throws IOException, - InterruptedException { - GraphFactory graphFactory = context().graphFactory(); - - WriteBuffers buffers = new WriteBuffers(context(), 50, 100); - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - vertex.addEdge(graphFactory.createEdge(BytesId.of(2L))); - vertex.addEdge(graphFactory.createEdge("knows", BytesId.of(3L))); - vertex.addEdge(graphFactory.createEdge("watch", "1111", - BytesId.of(4L))); - buffers.writeEdges(vertex); - // Reached threshold, the position is 76 - Assert.assertTrue(buffers.reachThreshold()); - /* - * When reached threshold, switchForSorting will exchange writing buffer - * and sorting buffer, so the writing buffer become clean - */ - buffers.switchForSorting(); - Assert.assertFalse(buffers.reachThreshold()); - Assert.assertTrue(buffers.isEmpty()); - // Nothing changed - buffers.switchForSorting(); - Assert.assertFalse(buffers.reachThreshold()); - Assert.assertTrue(buffers.isEmpty()); - // The writing buffer reached threshold again, position is 76 - buffers.writeEdges(vertex); - - AtomicInteger counter = new AtomicInteger(0); - Thread thread1 = new Thread(() -> { - // Await until finishSorting method called - buffers.switchForSorting(); - Assert.assertEquals(2, counter.get()); - }); - Thread thread2 = new Thread(() -> { - while (counter.get() < 2) { - try { - Thread.sleep(100); - } catch (InterruptedException e) { - Assert.fail(e.getMessage()); - } - counter.incrementAndGet(); - } - // counter is 2 - buffers.finishSorting(); - }); - thread1.start(); - thread2.start(); - - thread1.join(); - thread2.join(); - } - - @Test - public void wrapForRead() throws IOException { - GraphFactory graphFactory = context().graphFactory(); - - WriteBuffers buffers = new WriteBuffers(context(), 10, 20); - Vertex vertex = graphFactory.createVertex(BytesId.of(1L), - new DoubleValue(0.5d)); - buffers.writeVertex(vertex); - buffers.prepareSorting(); - - try (RandomAccessInput input = buffers.wrapForRead()) { - EntryInput entryInput = new EntryInputImpl(input); - StreamGraphInput graphInput = new StreamGraphInput(context(), - entryInput); - vertex.value(null); - Assert.assertEquals(vertex, graphInput.readVertex()); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/SorterTestUtil.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/SorterTestUtil.java deleted file mode 100644 index 30cc9f295..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/SorterTestUtil.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.function.Supplier; - -import org.apache.hugegraph.computer.core.combiner.AbstractPointerCombiner; -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.store.StoreTestUtil; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.testutil.Assert; - -public class SorterTestUtil { - - public static void writeData(BytesOutput output, Integer value) - throws IOException { - // Write data length placeholder - output.writeFixedInt(0); - long position = output.position(); - // Write data - output.writeInt(value); - // Fill data length placeholder - int dataLength = (int) (output.position() - position); - output.writeFixedInt(position - Integer.BYTES, dataLength); - } - - public static BytesOutput writeKvMapToOutput(List map) - throws IOException { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - - for (int i = 0; i < map.size(); ) { - writeData(output, map.get(i++)); - writeData(output, map.get(i++)); - } - return output; - } - - public static BytesOutput writeSubKvMapToOutput(List> data) - throws IOException { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - for (List entry : data) { - Integer key = entry.get(0); - // Write key - writeData(output, key); - // Write subKv - long position = output.position(); - int count = 0; - // Write value length placeholder - output.writeFixedInt(0); - // Write subKv count placeholder - output.writeFixedInt(0); - for (int i = 1; i < entry.size(); ) { - Integer subKey = entry.get(i++); - Integer subValue = entry.get(i++); - writeData(output, subKey); - writeData(output, subValue); - count++; - } - long currentPosition = output.position(); - output.seek(position); - output.writeFixedInt((int) (currentPosition - position - 4)); - output.writeFixedInt(count); - output.seek(currentPosition); - } - return output; - } - - public static BytesInput inputFromKvMap(List map) - throws IOException { - return EntriesUtil.inputFromOutput(writeKvMapToOutput(map)); - } - - public static BytesInput inputFromSubKvMap(List> map) - throws IOException { - return EntriesUtil.inputFromOutput(writeSubKvMapToOutput(map)); - } - - public static void assertOutputEqualsMap(BytesOutput output, - Map> map) - throws IOException { - byte[] buffer = output.buffer(); - BytesInput input = IOFactory.createBytesInput(buffer); - for (Map.Entry> entry : map.entrySet()) { - input.readInt(); - int key = input.readInt(); - Assert.assertEquals(entry.getKey().intValue(), key); - int valueLength = input.readFixedInt(); - int valueCount = valueLength / Integer.BYTES; - List values = new ArrayList<>(); - for (int i = 0; i < valueCount; i++) { - values.add(input.readInt()); - } - Assert.assertEquals(entry.getValue(), values); - } - } - - public static void assertKvEntry(KvEntry entry, Id expectKey, - Id expectValue) throws IOException { - Assert.assertEquals(expectKey, - StoreTestUtil.idFromPointer(entry.key())); - Assert.assertEquals(expectValue, - StoreTestUtil.idFromPointer(entry.value())); - } - - public static void assertKvEntry(KvEntry entry, Integer expectKey, - Integer expectValue) - throws IOException { - Assert.assertEquals(expectKey, - StoreTestUtil.dataFromPointer(entry.key())); - Assert.assertEquals(expectValue, - StoreTestUtil.dataFromPointer(entry.value())); - } - - public static void assertSubKvByKv(KvEntry entry, int... expect) - throws IOException { - int index = 0; - Assert.assertEquals(expect[index++], - StoreTestUtil.dataFromPointer(entry.key())); - - Iterator subKvs = EntriesUtil.subKvIterFromEntry(entry); - while (subKvs.hasNext()) { - KvEntry subKv = subKvs.next(); - Assert.assertEquals(expect[index++], - StoreTestUtil.dataFromPointer(subKv.key())); - Assert.assertEquals(expect[index++], - StoreTestUtil.dataFromPointer(subKv.value())); - } - } - - public static PointerCombiner - createPointerCombiner(Supplier supplier, - Combiner combiner) { - return new AbstractPointerCombiner(supplier, combiner) { }; - } - - public static Sorter createSorter(Config config) { - if (config.get(ComputerOptions.TRANSPORT_RECV_FILE_MODE)) { - return new BufferFileSorter(config); - } else { - return new HgkvFileSorter(config); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/combiner/MockIntSumCombiner.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/combiner/MockIntSumCombiner.java deleted file mode 100644 index 764329714..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/combiner/MockIntSumCombiner.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.combiner; - -import org.apache.hugegraph.computer.core.combiner.Combiner; -import org.apache.hugegraph.computer.core.graph.value.IntValue; - -public class MockIntSumCombiner implements Combiner { - - @Override - public void combine(IntValue v1, IntValue v2, IntValue result) { - result.value(v1.intValue() + v2.intValue()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/EmptyFlusherTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/EmptyFlusherTest.java deleted file mode 100644 index a650c8eda..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/EmptyFlusherTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class EmptyFlusherTest { - - @Test - public void test() throws Exception { - PeekableIterator it = PeekableIterator.emptyIterator(); - Assert.assertFalse(it.hasNext()); - - Assert.assertThrows(NoSuchElementException.class, () -> { - it.next(); - }); - - Assert.assertThrows(UnsupportedOperationException.class, () -> { - it.metadata("key"); - }); - - Assert.assertThrows(NoSuchElementException.class, () -> { - it.peek(); - }); - - it.close(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SortLargeDataTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SortLargeDataTest.java deleted file mode 100644 index b80262ac9..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SortLargeDataTest.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.time.StopWatch; -import org.apache.hugegraph.computer.core.combiner.IntValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.sort.Sorter; -import org.apache.hugegraph.computer.core.sort.SorterTestUtil; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.KvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileWriter; -import org.apache.hugegraph.computer.core.store.StoreTestUtil; -import org.apache.hugegraph.computer.core.store.entry.DefaultKvEntry; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.InlinePointer; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvDirBuilderImpl; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Bytes; -import org.apache.hugegraph.util.Log; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.slf4j.Logger; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; - -public class SortLargeDataTest { - - private static final Logger LOG = Log.logger(SortLargeDataTest.class); - private static Config CONFIG; - - @BeforeClass - public static void init() { - CONFIG = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MERGE_FILES_NUM, "200", - ComputerOptions.HGKV_MAX_FILE_SIZE, String.valueOf(Bytes.GB), - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - } - - @Before - public void setup() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @After - public void teardown() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @Test - public void testAllProcess() throws Exception { - StopWatch watcher = new StopWatch(); - final long bufferSize = Bytes.MB; - final int mergeBufferNum = 300; - final int dataSize = 1000000; - long value = 0; - - Random random = new Random(); - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - List buffers = new ArrayList<>(mergeBufferNum); - List mergeBufferFiles = new ArrayList<>(); - int fileNum = 10; - Sorter sorter = SorterTestUtil.createSorter(CONFIG); - - watcher.start(); - for (int i = 0; i < dataSize; i++) { - SorterTestUtil.writeData(output, random.nextInt(dataSize)); - int entryValue = random.nextInt(5); - SorterTestUtil.writeData(output, entryValue); - value = value + entryValue; - - // Write data to buffer and sort buffer - if (output.position() >= bufferSize || (i + 1) == dataSize) { - BytesInput input = EntriesUtil.inputFromOutput(output); - buffers.add(sortBuffer(sorter, input)); - output.seek(0); - } - - // Merge buffers to HgkvDir - if (buffers.size() >= mergeBufferNum || (i + 1) == dataSize) { - String outputFile = StoreTestUtil.availablePathById(fileNum++); - mergeBufferFiles.add(outputFile); - mergeBuffers(sorter, buffers, outputFile); - buffers.clear(); - } - } - - // Merge file - String resultFile = StoreTestUtil.availablePathById("0"); - mergeFiles(sorter, mergeBufferFiles, Lists.newArrayList(resultFile)); - - watcher.stop(); - LOG.info("testAllProcess sort time: {}", watcher.getTime()); - - long result = sumOfEntryValue(sorter, ImmutableList.of(resultFile)); - Assert.assertEquals(value, result); - } - - @Test - public void testMergeBuffers() throws Exception { - StopWatch watcher = new StopWatch(); - // Sort buffers total size 100M, each buffer is 50KB - final long bufferSize = Bytes.KB * 50; - final long bufferNum = 2000; - final int keyRange = 10000000; - long totalValue = 0L; - - Random random = new Random(); - List buffers = new ArrayList<>(); - for (int i = 0; i < bufferNum; i++) { - BytesOutput buffer = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - while (buffer.position() < bufferSize) { - // Write data - int key = random.nextInt(keyRange); - SorterTestUtil.writeData(buffer, key); - int value = random.nextInt(100); - SorterTestUtil.writeData(buffer, value); - totalValue += value; - } - buffers.add(EntriesUtil.inputFromOutput(buffer)); - } - - // Sort buffer - Sorter sorter = SorterTestUtil.createSorter(CONFIG); - watcher.start(); - List sortedBuffers = new ArrayList<>(); - for (RandomAccessInput buffer : buffers) { - RandomAccessInput sortedBuffer = sortBuffer(sorter, buffer); - sortedBuffers.add(sortedBuffer); - } - watcher.stop(); - - LOG.info("testMergeBuffers sort buffer cost time: {}", - watcher.getTime()); - - String resultFile = StoreTestUtil.availablePathById("0"); - // Sort buffers - watcher.reset(); - watcher.start(); - sorter.mergeBuffers(sortedBuffers, new KvOuterSortFlusher(), - resultFile, false); - watcher.stop(); - - LOG.info("testMergeBuffers merge buffers cost time: {}", - watcher.getTime()); - - // Assert result - long result = sumOfEntryValue(sorter, ImmutableList.of(resultFile)); - Assert.assertEquals(totalValue, result); - assertFileOrder(sorter, ImmutableList.of(resultFile)); - } - - @Test - public void testMergeBuffersAllSameKey() throws Exception { - List buffers = new ArrayList<>(); - for (int i = 0; i < 1000; i++) { - BytesOutput buffer = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - for (int j = 0; j < 100; j++) { - // Write data - SorterTestUtil.writeData(buffer, 1); - SorterTestUtil.writeData(buffer, 1); - } - buffers.add(EntriesUtil.inputFromOutput(buffer)); - } - - String resultFile = StoreTestUtil.availablePathById("0"); - Sorter sorter = SorterTestUtil.createSorter(CONFIG); - mergeBuffers(sorter, buffers, resultFile); - - // Assert result - long result = sumOfEntryValue(sorter, ImmutableList.of(resultFile)); - Assert.assertEquals(1000 * 100, result); - } - - @Test - public void testDiffNumEntriesFileMerge() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MERGE_FILES_NUM, "3", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - List sizeList = ImmutableList.of(200, 500, 20, 50, 300, - 250, 10, 33, 900, 89, 20); - List inputs = new ArrayList<>(); - - for (int j = 0; j < sizeList.size(); j++) { - String file = StoreTestUtil.availablePathById(j + 10); - inputs.add(file); - try (KvEntryFileWriter builder = new HgkvDirBuilderImpl(config, - file)) { - for (int i = 0; i < sizeList.get(j); i++) { - byte[] keyBytes = StoreTestUtil.intToByteArray(i); - byte[] valueBytes = StoreTestUtil.intToByteArray(1); - Pointer key = new InlinePointer(keyBytes); - Pointer value = new InlinePointer(valueBytes); - KvEntry entry = new DefaultKvEntry(key, value); - builder.write(entry); - } - } - } - - List outputs = ImmutableList.of( - StoreTestUtil.availablePathById(0), - StoreTestUtil.availablePathById(1), - StoreTestUtil.availablePathById(2), - StoreTestUtil.availablePathById(3)); - Sorter sorter = SorterTestUtil.createSorter(config); - sorter.mergeInputs(inputs, new KvOuterSortFlusher(), outputs, false); - - int total = sizeList.stream().mapToInt(i -> i).sum(); - int mergeTotal = 0; - for (String output : outputs) { - mergeTotal += HgkvDirImpl.open(output).numEntries(); - } - Assert.assertEquals(total, mergeTotal); - } - - private static RandomAccessInput sortBuffer(Sorter sorter, - RandomAccessInput input) - throws Exception { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - InnerSortFlusher flusher = new CombineKvInnerSortFlusher(output, - combiner); - sorter.sortBuffer(input, flusher, false); - return EntriesUtil.inputFromOutput(output); - } - - private static void mergeBuffers(Sorter sorter, - List buffers, - String output) throws Exception { - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - OuterSortFlusher flusher = new CombineKvOuterSortFlusher(combiner); - sorter.mergeBuffers(buffers, flusher, output, false); - } - - private static void mergeFiles(Sorter sorter, List files, - List outputs) throws Exception { - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - OuterSortFlusher flusher = new CombineKvOuterSortFlusher(combiner); - sorter.mergeInputs(files, flusher, outputs, false); - } - - private static long sumOfEntryValue(Sorter sorter, List files) - throws Exception { - long entrySize = 0L; - for (String file : files) { - HgkvDir dir = HgkvDirImpl.open(file); - entrySize += dir.numEntries(); - } - LOG.info("Finally kvEntry size: {}", entrySize); - - try (PeekableIterator iterator = sorter.iterator(files, - false)) { - long result = 0; - while (iterator.hasNext()) { - KvEntry next = iterator.next(); - result += StoreTestUtil.dataFromPointer(next.value()); - } - return result; - } - } - - private static void assertFileOrder(Sorter sorter, List files) - throws Exception { - KvEntry last = null; - try (PeekableIterator iterator = - sorter.iterator(files, false)) { - while (iterator.hasNext()) { - KvEntry next = iterator.next(); - if (last == null) { - last = iterator.next(); - continue; - } - Assert.assertLte(0, last.key().compareTo(next.key())); - } - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTest.java deleted file mode 100644 index f41e89bd4..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTest.java +++ /dev/null @@ -1,489 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import java.io.File; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.combiner.IntValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.PointerCombiner; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.sort.Sorter; -import org.apache.hugegraph.computer.core.sort.SorterTestUtil; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.CombineKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.CombineSubKvInnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.CombineSubKvOuterSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.InnerSortFlusher; -import org.apache.hugegraph.computer.core.sort.flusher.OuterSortFlusher; -import org.apache.hugegraph.computer.core.store.EntryIterator; -import org.apache.hugegraph.computer.core.store.KvEntryFileReader; -import org.apache.hugegraph.computer.core.store.StoreTestUtil; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesInput; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.reader.HgkvDirReaderImpl; -import org.apache.hugegraph.computer.core.store.file.select.DisperseEvenlySelector; -import org.apache.hugegraph.computer.core.store.file.select.InputFilesSelector; -import org.apache.hugegraph.computer.core.util.FileUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.iterator.CIter; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; - -public class SorterTest { - - @Before - public void setup() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @After - public void teardown() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @Test - public void testSortKvBuffer() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MAX_FILE_SIZE, "32", - ComputerOptions.HGKV_DATABLOCK_SIZE, "16", - ComputerOptions.HGKV_MERGE_FILES_NUM, "3" - ); - List map = ImmutableList.of(2, 3, - 1, 23, - 6, 2, - 5, 9, - 2, 2, - 6, 1, - 1, 20); - BytesInput input = SorterTestUtil.inputFromKvMap(map); - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - - Sorter sorter = SorterTestUtil.createSorter(config); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - sorter.sortBuffer(input, - new CombineKvInnerSortFlusher(output, combiner), - false); - - BytesInput resultInput = EntriesUtil.inputFromOutput(output); - KvEntriesInput iter = new KvEntriesInput(resultInput); - SorterTestUtil.assertKvEntry(iter.next(), 1, 43); - SorterTestUtil.assertKvEntry(iter.next(), 2, 5); - SorterTestUtil.assertKvEntry(iter.next(), 5, 9); - SorterTestUtil.assertKvEntry(iter.next(), 6, 3); - iter.close(); - } - - @Test - public void testSortKvBuffers() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MAX_FILE_SIZE, "32", - ComputerOptions.HGKV_DATABLOCK_SIZE, "16", - ComputerOptions.HGKV_MERGE_FILES_NUM, "3", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - List map1 = ImmutableList.of(2, 3, - 2, 1, - 5, 2, - 6, 9, - 6, 2); - List map2 = ImmutableList.of(1, 3, - 1, 1, - 3, 2, - 6, 9, - 8, 2); - String path = StoreTestUtil.availablePathById("1"); - - // Merge 4 sorted input - List inputs = ImmutableList.of( - SorterTestUtil.inputFromKvMap(map1), - SorterTestUtil.inputFromKvMap(map2), - SorterTestUtil.inputFromKvMap(map1), - SorterTestUtil.inputFromKvMap(map2)); - Sorter sorter = SorterTestUtil.createSorter(config); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - sorter.mergeBuffers(inputs, new CombineKvOuterSortFlusher(combiner), - path, false); - - // Assert merge result from target hgkvDir - KvEntryFileReader reader = new HgkvDirReaderImpl(path, false); - EntryIterator iter = reader.iterator(); - SorterTestUtil.assertKvEntry(iter.next(), 1, 8); - SorterTestUtil.assertKvEntry(iter.next(), 2, 8); - SorterTestUtil.assertKvEntry(iter.next(), 3, 4); - SorterTestUtil.assertKvEntry(iter.next(), 5, 4); - SorterTestUtil.assertKvEntry(iter.next(), 6, 40); - SorterTestUtil.assertKvEntry(iter.next(), 8, 4); - Assert.assertFalse(iter.hasNext()); - } - - @Test - public void testMergeKvInputs() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MAX_FILE_SIZE, "32", - ComputerOptions.HGKV_DATABLOCK_SIZE, "16", - ComputerOptions.HGKV_MERGE_FILES_NUM, "3", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - this.testMergeKvInputs(config); - - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MAX_FILE_SIZE, "32", - ComputerOptions.HGKV_DATABLOCK_SIZE, "16", - ComputerOptions.HGKV_MERGE_FILES_NUM, "3", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "true" - ); - this.testMergeKvInputs(config); - } - - private void testMergeKvInputs(Config config) throws Exception { - List map1 = ImmutableList.of(2, 3, - 2, 1, - 5, 2, - 6, 9, - 6, 2); - List map2 = ImmutableList.of(1, 3, - 1, 2, - 3, 2); - - // Input hgkvDirs - String file1Name = StoreTestUtil.availablePathById("1"); - String file2Name = StoreTestUtil.availablePathById("2"); - String file3Name = StoreTestUtil.availablePathById("3"); - String file4Name = StoreTestUtil.availablePathById("4"); - String file5Name = StoreTestUtil.availablePathById("5"); - String file6Name = StoreTestUtil.availablePathById("6"); - String file7Name = StoreTestUtil.availablePathById("7"); - String file8Name = StoreTestUtil.availablePathById("8"); - String file9Name = StoreTestUtil.availablePathById("9"); - String file10Name = StoreTestUtil.availablePathById("10"); - - List inputs = Lists.newArrayList(file1Name, file2Name, - file3Name, file4Name, - file5Name, file6Name, - file7Name, file8Name, - file9Name, file10Name); - // Output hgkvDirs - String output1 = StoreTestUtil.availablePathById("20"); - String output2 = StoreTestUtil.availablePathById("21"); - List outputs = ImmutableList.of(output1, output2); - - for (int i = 0; i < inputs.size(); i++) { - List map; - if ((i & 1) == 0) { - map = map1; - } else { - map = map2; - } - if (config.get(ComputerOptions.TRANSPORT_RECV_FILE_MODE)) { - StoreTestUtil.bufferFileFromKvMap(map, inputs.get(i)); - } else { - StoreTestUtil.hgkvDirFromKvMap(config, map, inputs.get(i)); - } - } - - // Merge file - Sorter sorter = SorterTestUtil.createSorter(config); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - sorter.mergeInputs(inputs, new CombineKvOuterSortFlusher(combiner), - outputs, false); - - // Assert sort result - List result = ImmutableList.of(1, 25, - 2, 20, - 3, 10, - 5, 10, - 6, 55); - Iterator resultIter = result.iterator(); - Iterator iterator = sorter.iterator(outputs, false); - KvEntry last = iterator.next(); - int value = StoreTestUtil.dataFromPointer(last.value()); - while (true) { - KvEntry current = null; - if (iterator.hasNext()) { - current = iterator.next(); - if (last.compareTo(current) == 0) { - value += StoreTestUtil.dataFromPointer(current.value()); - continue; - } - } - - Assert.assertEquals(StoreTestUtil.dataFromPointer(last.key()), - resultIter.next()); - Assert.assertEquals(value, resultIter.next()); - - if (current == null) { - break; - } - - last = current; - value = StoreTestUtil.dataFromPointer(last.value()); - } - Assert.assertFalse(resultIter.hasNext()); - - FileUtil.deleteFilesQuietly(inputs); - FileUtil.deleteFilesQuietly(outputs); - } - - private BytesInput sortedSubKvBuffer(Config config) throws Exception { - List kv1 = ImmutableList.of(3, - 2, 1, - 4, 1); - List kv2 = ImmutableList.of(1, - 3, 1, - 5, 1); - List kv3 = ImmutableList.of(2, - 8, 1, - 9, 1); - List kv4 = ImmutableList.of(3, - 2, 1, - 3, 1); - List kv5 = ImmutableList.of(2, - 5, 1, - 8, 1); - List> data = ImmutableList.of(kv1, kv2, kv3, kv4, kv5); - - BytesInput input = SorterTestUtil.inputFromSubKvMap(data); - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - int flushThreshold = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - InnerSortFlusher flusher = new CombineSubKvInnerSortFlusher( - output, combiner, flushThreshold); - - Sorter sorter = SorterTestUtil.createSorter(config); - sorter.sortBuffer(input, flusher, true); - - return EntriesUtil.inputFromOutput(output); - } - - @Test - public void testSortSubKvBuffer() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "2" - ); - - /* - * Assert result - * key 1 subKv 3 1, 5 1 - * key 2 subKv 5 1, 8 2 - * key 2 subKv 9 1 - * key 3 subKv 2 2, 3 1 - * key 3 subKv 4 1 - */ - BytesInput input = this.sortedSubKvBuffer(config); - EntryIterator iter = new KvEntriesInput(input, true); - SorterTestUtil.assertSubKvByKv(iter.next(), 1, 3, 1, 5, 1); - SorterTestUtil.assertSubKvByKv(iter.next(), 2, 5, 1, 8, 2); - SorterTestUtil.assertSubKvByKv(iter.next(), 2, 9, 1); - SorterTestUtil.assertSubKvByKv(iter.next(), 3, 2, 2, 3, 1); - SorterTestUtil.assertSubKvByKv(iter.next(), 3, 4, 1); - iter.close(); - } - - @Test - public void testSortSubKvBuffers() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "2", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - int flushThreshold = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - - BytesInput i1 = this.sortedSubKvBuffer(config); - BytesInput i2 = this.sortedSubKvBuffer(config); - BytesInput i3 = this.sortedSubKvBuffer(config); - List buffers = ImmutableList.of(i1, i2, i3); - - Sorter sorter = SorterTestUtil.createSorter(config); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - OuterSortFlusher flusher = new CombineSubKvOuterSortFlusher( - combiner, flushThreshold); - flusher.sources(buffers.size()); - - String outputFile = StoreTestUtil.availablePathById("1"); - sorter.mergeBuffers(buffers, flusher, outputFile, true); - - /* - * Assert result - * key 1 subKv 3 3, 5 3 - * key 2 subKv 5 3, 8 6 - * key 2 subKv 9 3 - * key 3 subKv 2 6, 3 3 - * key 3 subKv 4 3 - */ - ImmutableList outputs = ImmutableList.of(outputFile); - Iterator kvIter = sorter.iterator(outputs, true); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 1, 3, 3, 5, 3); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 2, 5, 3, 8, 6); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 2, 9, 3); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 3, 2, 6, 3, 3); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 3, 4, 3); - - // Assert file properties - HgkvDir dir = HgkvDirImpl.open(outputFile); - Assert.assertEquals(5, dir.numEntries()); - Assert.assertEquals(8, dir.numSubEntries()); - } - - @Test - public void testMergeSubKvFiles() throws Exception { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "2", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "false" - ); - this.testMergeSubKvFiles(config); - - config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX, "2", - ComputerOptions.TRANSPORT_RECV_FILE_MODE, "true" - ); - this.testMergeSubKvFiles(config); - } - - private void testMergeSubKvFiles(Config config) throws Exception { - int flushThreshold = config.get( - ComputerOptions.INPUT_MAX_EDGES_IN_ONE_VERTEX); - - List kv1 = ImmutableList.of(1, - 2, 1, - 4, 1); - List kv2 = ImmutableList.of(4, - 2, 1, - 3, 1); - List kv3 = ImmutableList.of(4, - 6, 1, - 8, 1); - List kv4 = ImmutableList.of(1, - 1, 1, - 2, 1); - List kv5 = ImmutableList.of(1, - 5, 1, - 7, 1); - List kv6 = ImmutableList.of(2, - 2, 1, - 5, 1); - - List> data1 = ImmutableList.of(kv1, kv2, kv3); - List> data2 = ImmutableList.of(kv4, kv5, kv6); - List> data3 = ImmutableList.of(kv4, kv1, kv3); - List>> datas = ImmutableList.of(data1, data2, data3); - - String input1 = StoreTestUtil.availablePathById(1); - String input2 = StoreTestUtil.availablePathById(2); - String input3 = StoreTestUtil.availablePathById(3); - String output = StoreTestUtil.availablePathById(0); - - List inputs = ImmutableList.of(input1, input2, input3); - List outputs = ImmutableList.of(output); - - boolean useBufferFile = config.get( - ComputerOptions.TRANSPORT_RECV_FILE_MODE); - for (int i = 0; i < inputs.size(); i++) { - String input = inputs.get(i); - List> data = datas.get(i); - if (useBufferFile) { - StoreTestUtil.bufferFileFromSubKvMap(data, input); - } else { - StoreTestUtil.hgkvDirFromSubKvMap(config, data, input); - } - } - - Sorter sorter = SorterTestUtil.createSorter(config); - PointerCombiner combiner = SorterTestUtil.createPointerCombiner( - IntValue::new, - new IntValueSumCombiner()); - OuterSortFlusher flusher = new CombineSubKvOuterSortFlusher( - combiner, flushThreshold); - flusher.sources(inputs.size()); - sorter.mergeInputs(inputs, flusher, outputs, true); - - /* Assert result - * key 1 subKv 1 2 2 4 - * key 1 subKv 4 2 5 1 - * key 1 subKv 7 1 - * key 2 subKv 2 1 5 1 - * key 4 subKv 2 1 3 1 - * key 4 subKv 6 2 8 2 - */ - try (CIter kvIter = sorter.iterator(outputs, true)) { - SorterTestUtil.assertSubKvByKv(kvIter.next(), 1, 1, 2, 2, 4); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 1, 4, 2, 5, 1); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 1, 7, 1); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 2, 2, 1, 5, 1); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 4, 2, 1, 3, 1); - SorterTestUtil.assertSubKvByKv(kvIter.next(), 4, 6, 2, 8, 2); - } - - FileUtil.deleteFilesQuietly(inputs); - FileUtil.deleteFilesQuietly(outputs); - } - - @Test - public void testExceptionCaseForSelector() { - // Parameter inputs size < outputs size - String input1 = StoreTestUtil.availablePathById("1"); - String input2 = StoreTestUtil.availablePathById("2"); - List inputs = ImmutableList.of(input1, input2); - - String output1 = StoreTestUtil.availablePathById("3"); - String output2 = StoreTestUtil.availablePathById("4"); - String output3 = StoreTestUtil.availablePathById("5"); - List outputs = ImmutableList.of(output1, output2, output3); - - InputFilesSelector selector = new DisperseEvenlySelector(); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - selector.selectedByHgkvFile(inputs, outputs); - }, e -> { - String errorMsg = "inputs size of InputFilesSelector must be >= " + - "outputs size"; - Assert.assertContains(errorMsg, e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTestSuite.java deleted file mode 100644 index 5b5ef42ce..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/SorterTestSuite.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorter; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - FlusherTest.class, - SortLargeDataTest.class, - SorterTest.class, - EmptyFlusherTest.class -}) -public class SorterTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSortingTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSortingTest.java deleted file mode 100644 index 86daee806..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/InputsSortingTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.List; - -import org.junit.Test; - -public class InputsSortingTest { - - private final SortingMode mode; - - protected InputsSortingTest(SortingMode mode) { - this.mode = mode; - } - - @Test - public void testSorting() { - InputsSorting sorting; - sorting = SortingFactory.createSorting(TestData.data(), this.mode); - TestData.assertSorted(TestData.data(), sorting); - - sorting = SortingFactory.createSorting(TestData.dataWithEmpty(), - this.mode); - TestData.assertSorted(TestData.dataWithEmpty(), sorting); - - sorting = SortingFactory.createSorting(TestData.dataEmpty(), - this.mode); - TestData.assertSorted(TestData.dataEmpty(), sorting); - - sorting = SortingFactory.createSorting(TestData.sameDataLists(), - this.mode); - TestData.assertSorted(TestData.sameDataLists(), sorting); - } - - @Test - public void testWithRandomLists() { - List> randomLists = TestData.randomSortedLists(1000, 50); - InputsSorting sorting; - sorting = SortingFactory.createSorting( - TestData.toIterators(randomLists), this.mode); - TestData.assertSorted(TestData.toIterators(randomLists), sorting); - } - - public static class LoserTreeInputsSortingTest extends InputsSortingTest { - - public LoserTreeInputsSortingTest() { - super(SortingMode.LOSER_TREE); - } - } - - public static class HeapInputsSortingTest extends InputsSortingTest { - - public HeapInputsSortingTest() { - super(SortingMode.HEAP); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingTestSuite.java deleted file mode 100644 index fe1f622a1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - InputsSortingTest.HeapInputsSortingTest.class, - InputsSortingTest.LoserTreeInputsSortingTest.class -}) -public class SortingTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/TestData.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/TestData.java deleted file mode 100644 index 420a60dae..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/TestData.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.sort.sorting; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.Random; -import java.util.stream.Collectors; - -import org.apache.hugegraph.testutil.Assert; - -import com.google.common.collect.ImmutableList; - -public class TestData { - - private static final List> MULTIWAY_DATA_LIST = - ImmutableList.of( - ImmutableList.of(10, 29, 35), - ImmutableList.of(50), - ImmutableList.of(4, 29), - ImmutableList.of(5, 5, 10), - ImmutableList.of(11, 23) - ); - - private static final List> MULTIWAY_DATA_HAS_EMPTY_LIST = - ImmutableList.of( - ImmutableList.of(10, 29, 35), - ImmutableList.of(), - ImmutableList.of(4, 29), - ImmutableList.of(11, 23), - ImmutableList.of() - ); - - private static final List> ALL_EMPTY_LIST = - ImmutableList.of( - ImmutableList.of(), - ImmutableList.of(), - ImmutableList.of() - ); - - public static List getSortedResult(List> list) { - return list.stream() - .map(iter -> { - List itemList = new ArrayList<>(); - while (iter.hasNext()) { - itemList.add(iter.next()); - } - return itemList; - }) - .flatMap(Collection::stream) - .sorted() - .collect(Collectors.toList()); - } - - public static List> toIterators( - List> list) { - return cloneList(list).stream() - .map(List::iterator) - .collect(Collectors.toList()); - } - - private static List> cloneList(List> list) { - List> result = new ArrayList<>(); - list.forEach(item -> { - List resultItem = new ArrayList<>(item); - result.add(resultItem); - }); - return result; - } - - public static List> data() { - return toIterators(MULTIWAY_DATA_LIST); - } - - public static List> dataWithEmpty() { - return toIterators(MULTIWAY_DATA_HAS_EMPTY_LIST); - } - - public static List> dataEmpty() { - return toIterators(ALL_EMPTY_LIST); - } - - public static List> sameDataLists() { - List> lists = new ArrayList<>(); - for (int i = 0; i < 16; i++) { - lists.add(ImmutableList.of(1, 1, 1)); - } - - return toIterators(lists); - } - - public static List> randomSortedLists(int sourcesSize, - int listSize) { - Random random = new Random(); - List> lists = new ArrayList<>(); - for (int i = 0; i < sourcesSize; i++) { - List list = new ArrayList<>(); - for (int j = 0; j < listSize; j++) { - list.add(random.nextInt(100)); - } - lists.add(list); - } - - lists.forEach(Collections::sort); - - return lists; - } - - public static void assertSorted(List> list, - InputsSorting inputsSorting) { - List result = TestData.getSortedResult(list); - Iterator sortedResult = result.iterator(); - - while (inputsSorting.hasNext() && sortedResult.hasNext()) { - Assert.assertEquals(inputsSorting.next(), sortedResult.next()); - } - - Assert.assertFalse(inputsSorting.hasNext()); - Assert.assertFalse(sortedResult.hasNext()); - Assert.assertThrows(NoSuchElementException.class, inputsSorting::next); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/BitFileTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/BitFileTest.java deleted file mode 100644 index 173e9d25c..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/BitFileTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.store.file.seqfile.BitsFileReader; -import org.apache.hugegraph.computer.core.store.file.seqfile.BitsFileReaderImpl; -import org.apache.hugegraph.computer.core.store.file.seqfile.BitsFileWriter; -import org.apache.hugegraph.computer.core.store.file.seqfile.BitsFileWriterImpl; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class BitFileTest { - - private static final Config CONFIG = ComputerContext.instance().config(); - - @Test - public void test() throws IOException { - File dir = createTempDir(); - - try { - try (BitsFileWriter writer = new BitsFileWriterImpl(CONFIG, dir)) { - for (int i = 0; i < 1000000; i++) { - writer.writeBoolean(i % 2 == 0); - } - } - - try (BitsFileReader reader = new BitsFileReaderImpl(CONFIG, dir)) { - for (int i = 0; i < 1000000; i++) { - Assert.assertEquals(i % 2 == 0, reader.readBoolean()); - } - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testRandomValue() throws IOException { - File dir = createTempDir(); - - List data = new ArrayList<>(); - Random random = new Random(); - try { - try (BitsFileWriter writer = new BitsFileWriterImpl(CONFIG, dir)) { - for (int i = 0; i < 1000000; i++) { - boolean item = random.nextInt(2) == 0; - writer.writeBoolean(item); - data.add(item); - } - } - - try (BitsFileReader reader = new BitsFileReaderImpl(CONFIG, dir)) { - for (int i = 0; i < data.size(); i++) { - Assert.assertEquals(data.get(i), reader.readBoolean()); - } - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - private static File createTempDir() { - File dir = new File(UUID.randomUUID().toString()); - dir.mkdirs(); - return dir; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntriesUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntriesUtilTest.java deleted file mode 100644 index 3dd2a80cf..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntriesUtilTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.IOException; -import java.util.NoSuchElementException; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.store.buffer.SubKvEntriesInput; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.KvEntryWriter; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class EntriesUtilTest { - - @Test - public void testSubKvEntriesInput() throws Exception { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(output); - - KvEntryWriter subKvWriter = entryOutput.writeEntry(BytesId.of(100)); - subKvWriter.writeSubKv(BytesId.of(20), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(10), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(50), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(40), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(10), BytesId.of(1)); - subKvWriter.writeFinish(); - - BytesInput input = EntriesUtil.inputFromOutput(output); - - // Test inlinePointer kvEntry - KvEntry entry = EntriesUtil.kvEntryFromInput(input, true, true); - Assert.assertEquals(BytesId.of(100), - StoreTestUtil.idFromPointer(entry.key())); - try (EntryIterator iter = new SubKvEntriesInput(entry, true)) { - Assert.assertEquals(BytesId.of(10), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(10), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(20), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(40), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(50), - StoreTestUtil.idFromPointer(iter.next().key())); - } - - input.seek(0); - - // Test cachedPointer kvEntry - entry = EntriesUtil.kvEntryFromInput(input, false, true); - Assert.assertEquals(BytesId.of(100), - StoreTestUtil.idFromPointer(entry.key())); - try (EntryIterator iter = new SubKvEntriesInput(entry, false)) { - Assert.assertEquals(BytesId.of(10), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(10), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(20), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(40), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertEquals(BytesId.of(50), - StoreTestUtil.idFromPointer(iter.next().key())); - Assert.assertThrows(NoSuchElementException.class, iter::next); - } - } - - @Test - public void testKvEntryWithFirstSubKv() throws IOException { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(output); - KvEntryWriter subKvWriter = entryOutput.writeEntry(BytesId.of(100)); - subKvWriter.writeSubKv(BytesId.of(1), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(1), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(1), BytesId.of(1)); - subKvWriter.writeSubKv(BytesId.of(1), BytesId.of(1)); - subKvWriter.writeFinish(); - - BytesInput input = EntriesUtil.inputFromOutput(output); - - // Read entry from buffer - KvEntry entry = EntriesUtil.kvEntryFromInput(input, true, true); - entry = EntriesUtil.kvEntryWithFirstSubKv(entry); - // Assert subKvEntry size - Assert.assertEquals(4, entry.numSubEntries()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntryOutputTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntryOutputTest.java deleted file mode 100644 index 122d40ff1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/EntryOutputTest.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.IOException; -import java.util.List; -import java.util.stream.Collectors; - -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.sort.SorterTestUtil; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesInput; -import org.apache.hugegraph.computer.core.store.entry.EntriesUtil; -import org.apache.hugegraph.computer.core.store.entry.EntryOutput; -import org.apache.hugegraph.computer.core.store.entry.EntryOutputImpl; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.KvEntryWriter; -import org.junit.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class EntryOutputTest { - - @Test - public void testWriteKvEntry() throws Exception { - List entries = ImmutableList.of(1, 5, - 6, 6, - 2, 1, - 4, 8); - List data = intListToLongIds(entries); - - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(output); - - for (int i = 0; i < data.size(); ) { - Id id = data.get(i++); - Writable value = data.get(i++); - entryOutput.writeEntry(id, value); - } - - // Assert result - BytesInput input = EntriesUtil.inputFromOutput(output); - EntryIterator iter = new KvEntriesInput(input); - SorterTestUtil.assertKvEntry(iter.next(), BytesId.of(1), BytesId.of(5)); - SorterTestUtil.assertKvEntry(iter.next(), BytesId.of(6), BytesId.of(6)); - SorterTestUtil.assertKvEntry(iter.next(), BytesId.of(2), BytesId.of(1)); - SorterTestUtil.assertKvEntry(iter.next(), BytesId.of(4), BytesId.of(8)); - iter.close(); - } - - @Test - public void testSubKvNotNeedSort() throws Exception { - List entries = ImmutableList.of(5, - 6, 6, - 2, 1, - 4, 8, - 1, - 2, 2, - 6, 1); - BytesInput input = inputFromEntries(entries, false); - EntryIterator iter = new KvEntriesInput(input, true); - - // Assert entry1 - KvEntry kvEntry1 = iter.next(); - Assert.assertEquals(3, kvEntry1.numSubEntries()); - Id key1 = StoreTestUtil.idFromPointer(kvEntry1.key()); - Assert.assertEquals(BytesId.of(5), key1); - EntryIterator kvEntry1SubKvs = EntriesUtil.subKvIterFromEntry(kvEntry1); - KvEntry subKv1 = kvEntry1SubKvs.next(); - Assert.assertEquals(0, subKv1.numSubEntries()); - SorterTestUtil.assertKvEntry(subKv1, BytesId.of(6), BytesId.of(6)); - SorterTestUtil.assertKvEntry(kvEntry1SubKvs.next(), - BytesId.of(2), BytesId.of(1)); - SorterTestUtil.assertKvEntry(kvEntry1SubKvs.next(), - BytesId.of(4), BytesId.of(8)); - // Assert entry2 - KvEntry kvEntry2 = iter.next(); - Id key2 = StoreTestUtil.idFromPointer(kvEntry2.key()); - Assert.assertEquals(BytesId.of(1), key2); - EntryIterator kvEntry2SubKvs = EntriesUtil.subKvIterFromEntry(kvEntry2); - SorterTestUtil.assertKvEntry(kvEntry2SubKvs.next(), - BytesId.of(2), BytesId.of(2)); - SorterTestUtil.assertKvEntry(kvEntry2SubKvs.next(), - BytesId.of(6), BytesId.of(1)); - - iter.close(); - } - - @Test - public void testSubKvNeedSort() throws Exception { - List entries = ImmutableList.of(5, - 6, 6, - 2, 1, - 4, 8, - 1, - 2, 2, - 6, 1); - BytesInput input = inputFromEntries(entries, true); - EntryIterator iter = new KvEntriesInput(input, true); - - // Assert entry1 - KvEntry kvEntry1 = iter.next(); - Id key1 = StoreTestUtil.idFromPointer(kvEntry1.key()); - Assert.assertEquals(BytesId.of(5), key1); - - EntryIterator kvEntry1SubKvs = EntriesUtil.subKvIterFromEntry(kvEntry1); - KvEntry subKv1 = kvEntry1SubKvs.next(); - Assert.assertEquals(0, subKv1.numSubEntries()); - SorterTestUtil.assertKvEntry(subKv1, BytesId.of(2), BytesId.of(1)); - KvEntry subKv2 = kvEntry1SubKvs.next(); - Assert.assertEquals(0, subKv2.numSubEntries()); - SorterTestUtil.assertKvEntry(subKv2, BytesId.of(4), BytesId.of(8)); - KvEntry subKv3 = kvEntry1SubKvs.next(); - Assert.assertEquals(0, subKv3.numSubEntries()); - SorterTestUtil.assertKvEntry(subKv3, BytesId.of(6), BytesId.of(6)); - // Assert entry2 - KvEntry kvEntry2 = iter.next(); - Id key2 = StoreTestUtil.idFromPointer(kvEntry2.key()); - Assert.assertEquals(BytesId.of(1), key2); - - EntryIterator kvEntry2SubKvs = EntriesUtil.subKvIterFromEntry(kvEntry2); - SorterTestUtil.assertKvEntry(kvEntry2SubKvs.next(), - BytesId.of(2), BytesId.of(2)); - SorterTestUtil.assertKvEntry(kvEntry2SubKvs.next(), - BytesId.of(6), BytesId.of(1)); - - iter.close(); - } - - private static BytesInput inputFromEntries(List entries, - boolean needSort) - throws IOException { - /* - * All integer data will convert to Id type, so upper layer also - * needs to use the Id type to make a judgment - */ - List data = intListToLongIds(entries); - - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - EntryOutput entryOutput = new EntryOutputImpl(output, needSort); - int index = 0; - KvEntryWriter entry1 = entryOutput.writeEntry(data.get(index++)); - entry1.writeSubKv(data.get(index++), data.get(index++)); - entry1.writeSubKv(data.get(index++), data.get(index++)); - entry1.writeSubKv(data.get(index++), data.get(index++)); - entry1.writeFinish(); - KvEntryWriter entry2 = entryOutput.writeEntry(data.get(index++)); - entry2.writeSubKv(data.get(index++), data.get(index++)); - entry2.writeSubKv(data.get(index++), data.get(index)); - entry2.writeFinish(); - - return EntriesUtil.inputFromOutput(output); - } - - private static List intListToLongIds(List list) { - return list.stream() - .map(BytesId::of) - .collect(Collectors.toList()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/FileManagerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/FileManagerTest.java deleted file mode 100644 index 03dbd543b..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/FileManagerTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.File; -import java.io.IOException; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class FileManagerTest extends UnitTestBase { - - @Test - public void testInitWithFile() throws IOException { - File file = new File("exist"); - file.createNewFile(); - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.WORKER_DATA_DIRS, "[" + file.getAbsolutePath() + "]" - ); - FileManager dataFileManager = new FileManager(); - Assert.assertEquals(FileManager.NAME, dataFileManager.name()); - Assert.assertThrows(ComputerException.class, () -> { - dataFileManager.init(config); - }, e -> { - Assert.assertContains("Can't create dir ", e.getMessage()); - }); - file.delete(); - } - - @Test - public void testInitWithReadOnlyDir() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.WORKER_DATA_DIRS, "[/etc]" - ); - FileManager dataFileManager = new FileManager(); - Assert.assertThrows(ComputerException.class, () -> { - dataFileManager.init(config); - }, e -> { - Assert.assertContains("Can't create dir", e.getMessage()); - }); - } - - @Test - public void testNextDir() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]" - ); - FileManager dataFileManager = new FileManager(); - - dataFileManager.init(config); - - String dir1 = dataFileManager.nextDirectory(); - String dir2 = dataFileManager.nextDirectory(); - String dir3 = dataFileManager.nextDirectory(); - String dir4 = dataFileManager.nextDirectory(); - String dir5 = dataFileManager.nextDirectory(); - Assert.assertEquals(dir1, dir3); - Assert.assertEquals(dir3, dir5); - Assert.assertEquals(dir2, dir4); - - dataFileManager.close(config); - } - - @Test - public void testNextDirWithPaths() { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_001", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.WORKER_DATA_DIRS, "[data_dir1, data_dir2]" - ); - FileManager dataFileManager = new FileManager(); - - dataFileManager.init(config); - - File dir1 = new File(dataFileManager.nextDirectory("vertex")); - Assert.assertEquals("vertex", dir1.getName()); - - File dir2 = new File(dataFileManager.nextDirectory("message", "1")); - Assert.assertEquals("1", dir2.getName()); - Assert.assertEquals("message", dir2.getParentFile().getName()); - - dataFileManager.close(config); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvDirTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvDirTest.java deleted file mode 100644 index 5b1b8ac62..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvDirTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.NoSuchElementException; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDir; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvFileImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvDirBuilderImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.reader.HgkvDirReaderImpl; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.google.common.collect.ImmutableList; - -public class HgkvDirTest { - - private static Config CONFIG; - - @BeforeClass - public static void init() { - CONFIG = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.HGKV_MAX_FILE_SIZE, "32", - ComputerOptions.HGKV_DATABLOCK_SIZE, "16" - ); - } - - @Before - public void setup() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @After - public void teardown() throws IOException { - FileUtils.deleteDirectory(new File(StoreTestUtil.FILE_DIR)); - } - - @Test - public void testHgkvDirBuilder() throws IOException { - // The data must be ordered - List data = ImmutableList.of(2, 3, - 2, 1, - 5, 2, - 5, 9, - 6, 2); - List kvEntries = StoreTestUtil.kvEntriesFromMap(data); - - String path = StoreTestUtil.availablePathById("1"); - try (KvEntryFileWriter builder = new HgkvDirBuilderImpl(CONFIG, path)) { - for (KvEntry entry : kvEntries) { - builder.write(entry); - } - builder.finish(); - - // Open the file and determine the footer is as expected - HgkvDir dir = HgkvDirImpl.open(path); - Assert.assertEquals(HgkvFileImpl.MAGIC, dir.magic()); - String version = HgkvDirImpl.MAJOR_VERSION + "." + - HgkvDirImpl.MINOR_VERSION; - Assert.assertEquals(version, dir.version()); - Assert.assertEquals(5, dir.numEntries()); - int maxKey = StoreTestUtil.byteArrayToInt(dir.max()); - Assert.assertEquals(6, maxKey); - int minKey = StoreTestUtil.byteArrayToInt(dir.min()); - Assert.assertEquals(2, minKey); - } finally { - FileUtils.deleteQuietly(new File(path)); - } - } - - @Test - public void testHgkvDirReader() throws Exception { - // The keys in the data must be ordered - List data = ImmutableList.of(2, 3, - 2, 1, - 5, 2, - 5, 5, - 5, 9, - 6, 2); - String path = StoreTestUtil.availablePathById("1"); - StoreTestUtil.hgkvDirFromKvMap(CONFIG, data, path); - KvEntryFileReader reader = new HgkvDirReaderImpl(path, false); - try (EntryIterator iterator = reader.iterator()) { - int i = 0; - while (iterator.hasNext()) { - KvEntry entry = iterator.next(); - int key = StoreTestUtil.byteArrayToInt(entry.key().bytes()); - Assert.assertEquals(data.get(i).intValue(), key); - i += 2; - } - Assert.assertThrows(NoSuchElementException.class, iterator::next); - } - } - - @Test - public void testExceptionCaseForHgkvDir() throws IOException { - // Path isn't directory - File file = new File(StoreTestUtil.availablePathById("1")); - file.getParentFile().mkdirs(); - file.createNewFile(); - Assert.assertThrows(IllegalArgumentException.class, () -> { - HgkvDirImpl.open(file.getPath()); - }, e -> { - Assert.assertContains("because it's not a directory", - e.getMessage()); - }); - FileUtils.deleteQuietly(file); - - // Open not exists file - Assert.assertThrows(IllegalArgumentException.class, () -> { - HgkvDirImpl.open(file.getPath()); - }, e -> { - Assert.assertContains("because it does not exists", - e.getMessage()); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestSuite.java deleted file mode 100644 index 7ff80b208..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestSuite.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - HgkvDirTest.class, - HgkvFileTest.class, - EntryOutputTest.class, - PointerTest.class, - EntriesUtilTest.class, - FileManagerTest.class, - ValueFileTest.class, - BitFileTest.class -}) -public class StoreTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestUtil.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestUtil.java deleted file mode 100644 index 7ae88a257..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/StoreTestUtil.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.sort.SorterTestUtil; -import org.apache.hugegraph.computer.core.store.buffer.KvEntriesInput; -import org.apache.hugegraph.computer.core.store.entry.KvEntry; -import org.apache.hugegraph.computer.core.store.entry.Pointer; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.HgkvDirImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvDirBuilderImpl; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvFileBuilder; -import org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvFileBuilderImpl; -import org.apache.hugegraph.testutil.Assert; - -public class StoreTestUtil { - - public static final String FILE_DIR = "hgkv"; - - private static void writeData(BytesOutput output, Integer value) - throws IOException { - // Write data length placeholder - output.writeFixedInt(0); - long position = output.position(); - // Write data - output.writeInt(value); - // Fill data length placeholder - int dataLength = (int) (output.position() - position); - output.writeFixedInt(position - Integer.BYTES, dataLength); - } - - public static List kvEntriesFromMap(List map) - throws IOException { - BytesOutput data = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - Iterator iterator = map.iterator(); - while (iterator.hasNext()) { - // Write key length - writeData(data, iterator.next()); - // Write value length - writeData(data, iterator.next()); - } - - BytesInput input = IOFactory.createBytesInput(data.buffer(), - (int) data.position()); - KvEntriesInput iter = new KvEntriesInput(input); - List entries = new ArrayList<>(); - while (iter.hasNext()) { - entries.add(iter.next()); - } - iter.close(); - - return entries; - } - - public static void hgkvDirFromKvMap(Config config, List map, - String path) throws IOException { - File file = new File(path); - try (KvEntryFileWriter builder = new HgkvDirBuilderImpl(config, path)) { - List entries = StoreTestUtil.kvEntriesFromMap(map); - for (KvEntry entry : entries) { - builder.write(entry); - } - builder.finish(); - } catch (Exception e) { - FileUtils.deleteQuietly(file); - throw e; - } - } - - public static void hgkvDirFromSubKvMap(Config config, - List> map, - String path) throws IOException { - BytesInput input = SorterTestUtil.inputFromSubKvMap(map); - KvEntriesInput iter = new KvEntriesInput(input, true); - try (KvEntryFileWriter builder = new HgkvDirBuilderImpl(config, path)) { - while (iter.hasNext()) { - builder.write(iter.next()); - } - } - iter.close(); - } - - public static void bufferFileFromKvMap(List map, String path) - throws IOException { - RandomAccessOutput output = IOFactory.createFileOutput(new File(path)); - BytesInput buffer = SorterTestUtil.inputFromKvMap(map); - output.write(buffer.readBytes((int) buffer.available())); - output.close(); - } - - public static void bufferFileFromSubKvMap(List> map, - String path) throws IOException { - RandomAccessOutput output = IOFactory.createFileOutput(new File(path)); - BytesInput buffer = SorterTestUtil.inputFromSubKvMap(map); - output.write(buffer.readBytes((int) buffer.available())); - output.close(); - } - - public static File mapToHgkvFile(Config config, List map, - String path) throws IOException { - File file = new File(path); - - try (HgkvFileBuilder builder = new HgkvFileBuilderImpl(config, path)) { - List entries = StoreTestUtil.kvEntriesFromMap(map); - for (KvEntry entry : entries) { - builder.add(entry); - } - builder.finish(); - /* - * Some fields are written in a variable-length way, - * so it's not recommended to assert length value. - */ - Assert.assertEquals(19, builder.headerLength()); - } catch (Exception e) { - FileUtils.deleteQuietly(file); - throw e; - } - return file; - } - - public static Id idFromPointer(Pointer pointer) throws IOException { - BytesInput input = IOFactory.createBytesInput(pointer.bytes()); - Id id = new BytesId(); - id.read(input); - return id; - } - - public static Integer dataFromPointer(Pointer pointer) throws IOException { - return byteArrayToInt(pointer.bytes()); - } - - public static String availablePathById(String id) { - String fileName = StringUtils.join(HgkvDirImpl.FILE_NAME_PREFIX, id, - HgkvDirImpl.FILE_EXTEND_NAME); - return Paths.get(FILE_DIR, fileName).toString(); - } - - public static String availablePathById(int id) { - return availablePathById(String.valueOf(id)); - } - - public static int byteArrayToInt(byte[] bytes) throws IOException { - return IOFactory.createBytesInput(bytes).readInt(); - } - - public static byte[] intToByteArray(int data) throws IOException { - BytesOutput output = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE); - output.writeInt(data); - return output.toByteArray(); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/ValueFileTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/ValueFileTest.java deleted file mode 100644 index a83093fcc..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/ValueFileTest.java +++ /dev/null @@ -1,489 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.store; - -import java.io.EOFException; -import java.io.File; -import java.io.IOException; -import java.util.Random; -import java.util.UUID; - -import org.apache.commons.io.FileUtils; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.io.UnsafeBytesInput; -import org.apache.hugegraph.computer.core.io.UnsafeBytesOutput; -import org.apache.hugegraph.computer.core.store.file.seqfile.ValueFileInput; -import org.apache.hugegraph.computer.core.store.file.seqfile.ValueFileOutput; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.E; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ValueFileTest { - - private static Config CONFIG; - - @BeforeClass - public static void init() { - CONFIG = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.VALUE_FILE_MAX_SEGMENT_SIZE, "32" - ); - } - - @Test - public void testConstructor() throws IOException { - int bufferCapacity = 13; - File dir = createTempDir(); - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferCapacity)) { - Assert.assertEquals(0, output.position()); - } - Assert.assertThrows(IllegalArgumentException.class, () -> { - new ValueFileOutput(CONFIG, dir, 1); - }, e -> { - Assert.assertContains("bufferCapacity must be >= 8", - e.getMessage()); - }); - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferCapacity)) { - Assert.assertEquals(0, input.position()); - } - Assert.assertThrows(IllegalArgumentException.class, () -> { - new ValueFileInput(CONFIG, dir, 1); - }, e -> { - Assert.assertContains("The parameter bufferSize must be >= 8", - e.getMessage()); - }); - - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.VALUE_FILE_MAX_SEGMENT_SIZE, - String.valueOf(Integer.MAX_VALUE) - ); - try (ValueFileOutput output = new ValueFileOutput(config, dir)) { - Assert.assertEquals(0, output.position()); - } - try (ValueFileInput input = new ValueFileInput(config, dir)) { - Assert.assertEquals(0, input.position()); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testByteArray() throws IOException { - File dir = createTempDir(); - final int bufferSize = 13; - - byte[] bytes; - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - // The remaining capacity of the buffer can hold - bytes = orderBytesBySize(5); - output.write(bytes); - - /* - * The remaining capacity of the buffer can't hold and write - * size is smaller than buffer capacity - */ - bytes = orderBytesBySize(11); - output.write(bytes); - - /* - * Write size is greater than buffer capacity and remaining of - * segment can hold write size - */ - bytes = orderBytesBySize(14); - output.write(bytes); - - /* - * Write size is greater than buffer capacity and remaining of - * segment can't hold write size - */ - bytes = orderBytesBySize(80); - output.write(bytes); - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - assertBytes(5, input.readBytes(5)); - assertBytes(11, input.readBytes(11)); - assertBytes(14, input.readBytes(14)); - assertBytes(80, input.readBytes(80)); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testWriteInt() throws IOException { - File dir = createTempDir(); - final int bufferSize = 10; - - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - output.writeInt(i); - } - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - Assert.assertEquals(i, input.readInt()); - } - Assert.assertThrows(IOException.class, input::readInt, e -> { - Assert.assertContains("overflows buffer", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testWriteIntWithPosition() throws IOException { - File dir = createTempDir(); - final int bufferSize = 20; - - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - // Write position in buffer - if (i == 2) { - output.writeFixedInt(4, 100); - } - output.writeInt(i); - } - output.writeFixedInt(Integer.BYTES * 10, 100); - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - if (i == 1 || i == 10) { - Assert.assertEquals(100, input.readInt()); - continue; - } - Assert.assertEquals(i, input.readInt()); - } - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testSeek() throws IOException { - File dir = createTempDir(); - final int bufferSize = 15; - - try { - // Test ValueFileInput - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - output.writeInt(i); - } - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - Long fileLength = Whitebox.getInternalState(input, - "fileLength"); - Assert.assertEquals(200L, fileLength); - - long position; - // Position in buffer - position = 13L; - assertSeek(fileLength, input, position); - - // Position not in buffer but in current segment - position = 28L; - assertSeek(fileLength, input, position); - - // Position not in buffer and not in current segment - position = 200L; - assertSeek(fileLength, input, position); - position = 3L; - assertSeek(fileLength, input, position); - position = 3L; - assertSeek(fileLength, input, position); - position = 68L; - assertSeek(fileLength, input, position); - position = 0L; - assertSeek(fileLength, input, position); - - // Position out of bound - position = 300L; - long finalPosition = position; - Assert.assertThrows(EOFException.class, () -> { - input.seek(finalPosition); - }, e -> { - Assert.assertContains("reach the end of file", - e.getMessage()); - }); - - input.seek(16 * Integer.BYTES); - Assert.assertEquals(16, input.readInt()); - - // Random seek and assert data - Random random = new Random(); - for (int i = 0; i < 10; i++) { - int num = random.nextInt(49); - input.seek(num * Integer.BYTES); - Assert.assertEquals(num, input.readInt()); - } - } - - // Test ValueFileOutput - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - // 200, 100, 2, 3, 4..... - for (int i = 0; i < 50; i++) { - // Position in buffer - if (i == 2) { - output.seek(4); - output.writeInt(100); - } - // Position not int buffer - if (i == 10) { - long oldPosition = output.position(); - output.seek(0); - output.writeInt(200); - output.seek(oldPosition); - } - output.writeInt(i); - } - - Assert.assertThrows(EOFException.class, () -> { - output.seek(500L); - }, e -> { - Assert.assertContains("reach the end of file", - e.getMessage()); - }); - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - if (i == 0) { - Assert.assertEquals(200, input.readInt()); - continue; - } - if (i == 1) { - Assert.assertEquals(100, input.readInt()); - continue; - } - Assert.assertEquals(i, input.readInt()); - } - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testSkip() throws IOException { - File dir = createTempDir(); - final int bufferSize = 15; - - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - // 100, 1, 2, 200, 4, 5 ...... - for (int i = 0; i < 50; i++) { - output.writeInt(i); - } - output.seek(0); - output.writeInt(100); - - output.skip(8); - output.writeInt(200); - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - Assert.assertEquals(100, input.readInt()); - - input.skip(8); - Assert.assertEquals(200, input.readInt()); - - input.seek(20 * Integer.BYTES); - Assert.assertEquals(20, input.readInt()); - - input.skip(10 * Integer.BYTES); - Assert.assertEquals(31, input.readInt()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - input.skip(500L); - }, e -> { - Assert.assertContains("because don't have enough data", - e.getMessage()); - }); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testDuplicate() throws IOException { - File dir = createTempDir(); - final int bufferSize = 15; - - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - for (int i = 0; i < 50; i++) { - output.writeInt(i); - } - } - - try (ValueFileInput input = new ValueFileInput(CONFIG, dir, - bufferSize)) { - input.seek(20 * Integer.BYTES); - Assert.assertEquals(20, input.readInt()); - - UnsafeBytesInput other = input.duplicate(); - Assert.assertEquals(21, other.readInt()); - Assert.assertEquals(21, input.readInt()); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - @Test - public void testCompare() throws IOException { - File dir = createTempDir(); - final int bufferSize = 15; - - try { - try (ValueFileOutput output = new ValueFileOutput(CONFIG, dir, - bufferSize)) { - String data = "HugeGraph is a fast-speed and highly-scalable " + - "graph database"; - output.write(data.getBytes()); - } - - try (ValueFileInput input1 = new ValueFileInput(CONFIG, dir, - bufferSize); - ValueFileInput input2 = new ValueFileInput(CONFIG, dir, - bufferSize)) { - int result; - - // All in buffer - result = input1.compare(0, 3, input2, 1, 3); - Assert.assertLt(0, result); - - result = input1.compare(0, 3, input2, 0, 5); - Assert.assertLt(0, result); - - result = input1.compare(1, 3, input2, 1, 3); - Assert.assertEquals(0, result); - - // The input1 in buffer, input2 not in buffer - result = input1.compare(0, 3, input2, 21, 3); - Assert.assertLt(0, result); - - result = input1.compare(1, 3, input2, 23, 3); - Assert.assertGt(0, result); - - result = input1.compare(0, 3, input2, 23, 5); - Assert.assertLt(0, result); - - result = input1.compare(3, 1, input2, 23, 1); - Assert.assertEquals(0, result); - - // The input1 not in buffer, input2 in buffer - input2.seek(20); - result = input1.compare(23, 5, input2, 23, 5); - Assert.assertEquals(0, result); - - result = input1.compare(23, 12, input2, 23, 5); - Assert.assertGt(0, result); - - // All not in buffer - input2.seek(0); - result = input1.compare(23, 5, input2, 23, 5); - Assert.assertEquals(0, result); - - result = input1.compare(23, 12, input2, 23, 5); - Assert.assertGt(0, result); - - // Compare with different class - UnsafeBytesOutput output = new UnsafeBytesOutput(20); - output.writeBytes("banana"); - UnsafeBytesInput input = new UnsafeBytesInput(output.buffer()); - output.close(); - - result = input1.compare(0, 2, input, 0, 4); - Assert.assertLt(0, result); - - result = input1.compare(1, 5, input, 0, 4); - Assert.assertGt(0, result); - } - } finally { - FileUtils.deleteQuietly(dir); - } - } - - private static byte[] orderBytesBySize(int size) { - E.checkArgument(size <= Byte.MAX_VALUE, - "Size must be <= %s but get '%s'", - Byte.MAX_VALUE, size); - byte[] bytes = new byte[size]; - for (int i = 0; i < size; i++) { - bytes[i] = (byte) i; - } - return bytes; - } - - private static void assertBytes(int expectSize, byte[] bytes) { - E.checkArgument(expectSize <= Byte.MAX_VALUE, - "Size must be <= %s but get '%s'", - Byte.MAX_VALUE, expectSize); - for (int i = 0; i < expectSize; i++) { - Assert.assertEquals(i, bytes[i]); - } - } - - private static File createTempDir() { - File dir = new File(UUID.randomUUID().toString()); - dir.mkdirs(); - return dir; - } - - private static void assertSeek(long fileLength, ValueFileInput input, - long position) throws IOException { - input.seek(position); - Assert.assertEquals(position, input.position()); - Assert.assertEquals(fileLength - position, input.available()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtilTest.java deleted file mode 100644 index 7eb46b3a0..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/ComputerContextUtilTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.util.Map; -import java.util.Properties; - -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.worker.MockComputationParams; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -import com.google.common.collect.ImmutableMap; - -public class ComputerContextUtilTest { - - @Test - public void testConvertToMap() { - Assert.assertThrows(ComputerException.class, () -> { - ComputerContextUtil.convertToMap((String) null); - }); - - Assert.assertThrows(ComputerException.class, () -> { - ComputerContextUtil.convertToMap((Properties) null); - }); - - Assert.assertThrows(ComputerException.class, () -> { - ComputerContextUtil.convertToMap(new String[0]); - }); - - Assert.assertThrows(ComputerException.class, () -> { - ComputerContextUtil.convertToMap("just one"); - }); - - Map result = ComputerContextUtil.convertToMap( - "key1", "value1", "key2", "value2"); - Assert.assertEquals(ImmutableMap.of("key1", "value1", "key2", "value2"), - result); - - Properties properties = new Properties(); - properties.setProperty("key1", "newValue1"); - properties.setProperty("algorithm.params_class", - MockComputationParams.class.getName()); - result = ComputerContextUtil.convertToMap(properties); - Assert.assertEquals(ImmutableMap.of( - "key1", "newValue1", - "algorithm.params_class", - MockComputationParams.class.getName()), result); - - ComputerContextUtil.initContext(properties); - Assert.assertEquals("newValue1", - ComputerContext.instance() - .config() - .getString("key1", "")); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/IdUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/IdUtilTest.java deleted file mode 100644 index 739690820..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/IdUtilTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class IdUtilTest { - - @Test - public void testParseId() { - String idUtf8WithString = "\"abc\""; - String idUtf8WithNumber = "\"222\""; - String idLong = "222"; - String idUuid = "U\"3b676b77-c484-4ba6-b627-8c040bc42863\""; - - String idNull = null; - String idEmpty = ""; - String idDouble = "1.23"; - String idUuidInvalid = "U\"123\""; - - Assert.assertEquals(IdType.UTF8, IdUtil.parseId(idUtf8WithString).idType()); - Assert.assertEquals(IdType.UTF8, IdUtil.parseId(idUtf8WithNumber).idType()); - Assert.assertEquals(IdType.LONG, IdUtil.parseId(idLong).idType()); - Assert.assertEquals(IdType.UUID, IdUtil.parseId(idUuid).idType()); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - IdUtil.parseId(idNull).idType(); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - IdUtil.parseId(idEmpty).idType(); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - IdUtil.parseId(idDouble).idType(); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { - IdUtil.parseId(idUuidInvalid).idType(); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilTest.java deleted file mode 100644 index af5cea0a4..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/JsonUtilTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.math.BigInteger; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class JsonUtilTest { - - @Test - public void testJson() { - BigInteger integer = BigInteger.valueOf(127L); - String json = JsonUtil.toJson(integer); - Object integer1 = JsonUtil.fromJson(json, BigInteger.class); - Assert.assertEquals(integer, integer1); - } - - @Test - public void testNull() { - String json = JsonUtil.toJson(null); - PartitionStat partitionStat1 = JsonUtil.fromJson(json, - PartitionStat.class); - Assert.assertEquals(null, partitionStat1); - } - - @Test - public void testException() { - Assert.assertThrows(ComputerException.class, () -> { - JsonUtil.fromJson("abc", PartitionStat.class); - }); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtilTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtilTest.java deleted file mode 100644 index 7f542de64..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/SerializeUtilTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.hugegraph.computer.core.graph.id.BytesId; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class SerializeUtilTest { - - @Test - public void testConvertBytesAndObject() { - Id id1 = BytesId.of(1L); - byte[] bytes = SerializeUtil.toBytes(id1); - Id id2 = BytesId.of(2L); - SerializeUtil.fromBytes(bytes, id2); - - Assert.assertEquals(id1, id2); - } - - @Test - public void testConvertBytesAndListObject() { - Id id1 = BytesId.of(1L); - Id id2 = BytesId.of(2L); - List list1 = new ArrayList<>(2); - list1.add(id1); - list1.add(id2); - - byte[] bytes = SerializeUtil.toBytes(list1); - List list2 = SerializeUtil.fromBytes(bytes, () -> new BytesId()); - - Assert.assertEquals(list1, list2); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/UtilTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/UtilTestSuite.java deleted file mode 100644 index afde73580..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/util/UtilTestSuite.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.util; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - ComputerContextUtilTest.class, - JsonUtilTest.class, - SerializeUtilTest.class -}) -public class UtilTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation.java deleted file mode 100644 index 24302f5e5..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Iterator; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.graph.vertex.Vertex; -import org.apache.hugegraph.testutil.Assert; - -public class MockComputation implements Computation { - - private Aggregator aggrCustomInt; - private Aggregator aggrCustomFloat; - - private Aggregator aggrIntSum; - private Aggregator aggrIntMax; - - private Aggregator aggrLongSum; - private Aggregator aggrLongMax; - - private Aggregator aggrFloatSum; - private Aggregator aggrFloatMin; - - private Aggregator aggrDoubleSum; - private Aggregator aggrDoubleMin; - - @Override - public void beforeSuperstep(WorkerContext context) { - this.createAndRunAggregators(context); - - if (context.superstep() == 0) { - this.assertStep0Aggregators(context); - } else if (context.superstep() == 1) { - this.assertStep1Aggregators(context); - } - } - - @Override - public void afterSuperstep(WorkerContext context) { - context.aggregateValue(MockMasterComputation.AGGR_CUSTOM_INT, - this.aggrCustomInt.aggregatedValue()); - context.aggregateValue(MockMasterComputation.AGGR_CUSTOM_FLOAT, - this.aggrCustomFloat.aggregatedValue()); - - context.aggregateValue(MockMasterComputation.AGGR_FLOAT_UNSTABLE, - new FloatValue(3.14f)); - context.aggregateValue(MockMasterComputation.AGGR_INT_UNSTABLE, - new IntValue(10 - context.superstep())); - - context.aggregateValue(MockMasterComputation.AGGR_INT_SUM, - this.aggrIntSum.aggregatedValue()); - context.aggregateValue(MockMasterComputation.AGGR_INT_MAX, - this.aggrIntMax.aggregatedValue()); - - context.aggregateValue(MockMasterComputation.AGGR_LONG_SUM, - this.aggrLongSum.aggregatedValue()); - context.aggregateValue(MockMasterComputation.AGGR_LONG_MAX, - this.aggrLongMax.aggregatedValue()); - - context.aggregateValue(MockMasterComputation.AGGR_FLOAT_SUM, - this.aggrFloatSum.aggregatedValue()); - context.aggregateValue(MockMasterComputation.AGGR_FLOAT_MIN, - this.aggrFloatMin.aggregatedValue()); - - context.aggregateValue(MockMasterComputation.AGGR_DOUBLE_SUM, - this.aggrDoubleSum.aggregatedValue()); - context.aggregateValue(MockMasterComputation.AGGR_DOUBLE_MIN, - this.aggrDoubleMin.aggregatedValue()); - - this.assertAggregateValueWithError(context); - } - - private void assertAggregateValueWithError(WorkerContext context) { - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregateValue(MockMasterComputation.AGGR_INT_SUM, - this.aggrLongSum.aggregatedValue()); - }, e -> { - Assert.assertContains("Can't set long value '5' to int aggregator", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregateValue(MockMasterComputation.AGGR_LONG_SUM, - this.aggrIntSum.aggregatedValue()); - }, e -> { - Assert.assertContains("Can't set int value '5' to long aggregator", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregateValue(MockMasterComputation.AGGR_DOUBLE_SUM, - this.aggrFloatSum.aggregatedValue()); - }, e -> { - Assert.assertContains("Can't set float value '10.4' to double ", - e.getMessage()); - }); - - Assert.assertThrows(ClassCastException.class, () -> { - context.aggregateValue(MockMasterComputation.AGGR_CUSTOM_FLOAT, - new IntValue(7)); - }, e -> { - Assert.assertContains("IntValue cannot be cast to", e.getMessage()); - Assert.assertContains("FloatValue", e.getMessage()); - }); - } - - protected void createAndRunAggregators(WorkerContext context) { - // AGGR_CUSTOM_INT - this.aggrCustomInt = context.createAggregator( - MockMasterComputation.AGGR_CUSTOM_INT); - - Assert.assertEquals(new IntValue(0), - this.aggrCustomInt.aggregatedValue()); - - this.aggrCustomInt.aggregateValue(1); - Assert.assertEquals(new IntValue(1), - this.aggrCustomInt.aggregatedValue()); - - this.aggrCustomInt.aggregateValue(new IntValue(1)); - Assert.assertEquals(new IntValue(2), - this.aggrCustomInt.aggregatedValue()); - - this.aggrCustomInt.aggregateValue(3); - Assert.assertEquals(new IntValue(5), - this.aggrCustomInt.aggregatedValue()); - - // AGGR_CUSTOM_FLOAT - this.aggrCustomFloat = context.createAggregator( - MockMasterComputation.AGGR_CUSTOM_FLOAT); - - Assert.assertEquals(new FloatValue(0f), - this.aggrCustomFloat.aggregatedValue()); - - this.aggrCustomFloat.aggregateValue(1f); - Assert.assertEquals(new FloatValue(1f), - this.aggrCustomFloat.aggregatedValue()); - - this.aggrCustomFloat.aggregateValue(new FloatValue(1f)); - Assert.assertEquals(new FloatValue(2f), - this.aggrCustomFloat.aggregatedValue()); - - this.aggrCustomFloat.aggregateValue(3.2f); - Assert.assertEquals(new FloatValue(5.2f), - this.aggrCustomFloat.aggregatedValue()); - - // AGGR_INT_SUM - this.aggrIntSum = context.createAggregator( - MockMasterComputation.AGGR_INT_SUM); - - Assert.assertEquals(new IntValue(0), - this.aggrIntSum.aggregatedValue()); - - this.aggrIntSum.aggregateValue(1); - Assert.assertEquals(new IntValue(1), - this.aggrIntSum.aggregatedValue()); - - this.aggrIntSum.aggregateValue(new IntValue(1)); - Assert.assertEquals(new IntValue(2), - this.aggrIntSum.aggregatedValue()); - - this.aggrIntSum.aggregateValue(3); - Assert.assertEquals(new IntValue(5), - this.aggrIntSum.aggregatedValue()); - - // AGGR_INT_MAX - this.aggrIntMax = context.createAggregator( - MockMasterComputation.AGGR_INT_MAX); - - Assert.assertEquals(new IntValue(0), - this.aggrIntMax.aggregatedValue()); - - this.aggrIntMax.aggregateValue(1); - Assert.assertEquals(new IntValue(1), - this.aggrIntMax.aggregatedValue()); - - this.aggrIntMax.aggregateValue(8); - Assert.assertEquals(new IntValue(8), - this.aggrIntMax.aggregatedValue()); - - this.aggrIntMax.aggregateValue(3); - Assert.assertEquals(new IntValue(8), - this.aggrIntMax.aggregatedValue()); - - // AGGR_LONG_SUM - this.aggrLongSum = context.createAggregator( - MockMasterComputation.AGGR_LONG_SUM); - - Assert.assertEquals(new LongValue(0L), - this.aggrLongSum.aggregatedValue()); - - this.aggrLongSum.aggregateValue(1L); - Assert.assertEquals(new LongValue(1L), - this.aggrLongSum.aggregatedValue()); - - this.aggrLongSum.aggregateValue(new LongValue(1L)); - Assert.assertEquals(new LongValue(2L), - this.aggrLongSum.aggregatedValue()); - - this.aggrLongSum.aggregateValue(3L); - Assert.assertEquals(new LongValue(5L), - this.aggrLongSum.aggregatedValue()); - - // AGGR_LONG_MAX - this.aggrLongMax = context.createAggregator( - MockMasterComputation.AGGR_LONG_MAX); - - Assert.assertEquals(new LongValue(0L), - this.aggrLongMax.aggregatedValue()); - - this.aggrLongMax.aggregateValue(1L); - Assert.assertEquals(new LongValue(1L), - this.aggrLongMax.aggregatedValue()); - - this.aggrLongMax.aggregateValue(8L); - Assert.assertEquals(new LongValue(8L), - this.aggrLongMax.aggregatedValue()); - - this.aggrLongMax.aggregateValue(3L); - Assert.assertEquals(new LongValue(8L), - this.aggrLongMax.aggregatedValue()); - - // AGGR_FLOAT_SUM - this.aggrFloatSum = context.createAggregator( - MockMasterComputation.AGGR_FLOAT_SUM); - - Assert.assertEquals(new FloatValue(0.0f), - this.aggrFloatSum.aggregatedValue()); - - this.aggrFloatSum.aggregateValue(1.1f); - Assert.assertEquals(new FloatValue(1.1f), - this.aggrFloatSum.aggregatedValue()); - - this.aggrFloatSum.aggregateValue(2.3f); - Assert.assertEquals(new FloatValue(3.4f), - this.aggrFloatSum.aggregatedValue()); - - this.aggrFloatSum.aggregateValue(7.0f); - Assert.assertEquals(new FloatValue(10.4f), - this.aggrFloatSum.aggregatedValue()); - - // AGGR_FLOAT_MIN - this.aggrFloatMin = context.createAggregator( - MockMasterComputation.AGGR_FLOAT_MIN); - - Assert.assertEquals(new FloatValue(0.0f), - this.aggrFloatMin.aggregatedValue()); - - this.aggrFloatMin.aggregateValue(1.1f); - Assert.assertEquals(new FloatValue(0.0f), - this.aggrFloatMin.aggregatedValue()); - - this.aggrFloatMin.aggregateValue(-10.0f); - Assert.assertEquals(new FloatValue(-10.0f), - this.aggrFloatMin.aggregatedValue()); - - this.aggrFloatMin.aggregateValue(-4.0f); - Assert.assertEquals(new FloatValue(-10.0f), - this.aggrFloatMin.aggregatedValue()); - - // AGGR_DOUBLE_SUM - this.aggrDoubleSum = context.createAggregator( - MockMasterComputation.AGGR_DOUBLE_SUM); - - Assert.assertEquals(new DoubleValue(0.0), - this.aggrDoubleSum.aggregatedValue()); - - this.aggrDoubleSum.aggregateValue(1.1); - Assert.assertEquals(new DoubleValue(1.1), - this.aggrDoubleSum.aggregatedValue()); - - this.aggrDoubleSum.aggregateValue(2.3); - Assert.assertEquals(new DoubleValue(3.4), - this.aggrDoubleSum.aggregatedValue()); - - this.aggrDoubleSum.aggregateValue(7.0); - Assert.assertEquals(new DoubleValue(10.4), - this.aggrDoubleSum.aggregatedValue()); - - // AGGR_DOUBLE_MIN - this.aggrDoubleMin = context.createAggregator( - MockMasterComputation.AGGR_DOUBLE_MIN); - - Assert.assertEquals(new DoubleValue(0.0), - this.aggrDoubleMin.aggregatedValue()); - - this.aggrDoubleMin.aggregateValue(1.1); - Assert.assertEquals(new DoubleValue(0.0), - this.aggrDoubleMin.aggregatedValue()); - - this.aggrDoubleMin.aggregateValue(-10.0); - Assert.assertEquals(new DoubleValue(-10.0), - this.aggrDoubleMin.aggregatedValue()); - - this.aggrDoubleMin.aggregateValue(-4.0); - Assert.assertEquals(new DoubleValue(-10.0), - this.aggrDoubleMin.aggregatedValue()); - } - - protected void assertStep0Aggregators(WorkerContext context) { - Assert.assertEquals(new IntValue(0), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(0f), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(Integer.MAX_VALUE), - context.aggregatedValue( - MockMasterComputation.AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(0), context.aggregatedValue( - MockMasterComputation.AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(0), context.aggregatedValue( - MockMasterComputation.AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(0L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(0L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(0d), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(0d), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_MIN)); - } - - protected void assertStep1Aggregators(WorkerContext context) { - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(5.2f), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(8.8f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(888), context.aggregatedValue( - MockMasterComputation.AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - MockMasterComputation.AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(5L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(10.4), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_MIN)); - } - - @Override - public String name() { - return "mock"; - } - - @Override - public String category() { - return "mock"; - } - - @Override - public void compute0(ComputationContext context, Vertex vertex) { - vertex.value(new DoubleValue(0.5D)); - } - - @Override - public void compute(ComputationContext context, Vertex vertex, - Iterator messages) { - // pass - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation2.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation2.java deleted file mode 100644 index 8d1a707d1..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputation2.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.testutil.Assert; - -public class MockComputation2 extends MockComputation { - - @Override - protected void assertStep1Aggregators(WorkerContext context) { - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - MockMasterComputation.AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - MockMasterComputation.AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(10L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(20.8f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(20.8), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_MIN)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputationParams.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputationParams.java deleted file mode 100644 index 3f72b633f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockComputationParams.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Map; - -import org.apache.hugegraph.computer.algorithm.AlgorithmParams; -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.output.LimitedLogOutput; - -public class MockComputationParams implements AlgorithmParams { - - @Override - public void setAlgorithmParameters(Map params) { - this.setIfAbsent(params, ComputerOptions.MASTER_COMPUTATION_CLASS, - MockMasterComputation.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName()); - this.setIfAbsent(params, ComputerOptions.WORKER_COMBINER_CLASS, - DoubleValueSumCombiner.class.getName()); - this.setIfAbsent(params, ComputerOptions.OUTPUT_CLASS, - LimitedLogOutput.class.getName()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation.java deleted file mode 100644 index 2a05d6b68..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.apache.hugegraph.computer.core.aggregator.Aggregator; -import org.apache.hugegraph.computer.core.combiner.DoubleValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.FloatValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.IntValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.LongValueSumCombiner; -import org.apache.hugegraph.computer.core.combiner.ValueMaxCombiner; -import org.apache.hugegraph.computer.core.combiner.ValueMinCombiner; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.ValueType; -import org.apache.hugegraph.computer.core.master.DefaultMasterComputation; -import org.apache.hugegraph.computer.core.master.MasterComputationContext; -import org.apache.hugegraph.computer.core.master.MasterContext; -import org.apache.hugegraph.testutil.Assert; - -public class MockMasterComputation extends DefaultMasterComputation { - - public static final String AGGR_CUSTOM_INT = "aggr_int"; - public static final String AGGR_CUSTOM_FLOAT = "aggr_float"; - - public static final String AGGR_FLOAT_UNSTABLE = "aggr_float_unstable"; - public static final String AGGR_INT_UNSTABLE = "aggr_int_unstable"; - - public static final String AGGR_INT_SUM = "aggr_int_sum"; - public static final String AGGR_INT_MAX = "aggr_int_max"; - - public static final String AGGR_LONG_SUM = "aggr_long_sum"; - public static final String AGGR_LONG_MAX = "aggr_long_max"; - - public static final String AGGR_FLOAT_SUM = "aggr_float_sum"; - public static final String AGGR_FLOAT_MIN = "aggr_float_min"; - - public static final String AGGR_DOUBLE_SUM = "aggr_double_sum"; - public static final String AGGR_DOUBLE_MIN = "aggr_double_min"; - - @SuppressWarnings("unchecked") - @Override - public void init(MasterContext context) { - context.registerAggregator(AGGR_CUSTOM_INT, MockIntAggregator.class); - context.registerAggregator(AGGR_CUSTOM_FLOAT, - MockFloatAggregator.class); - - context.registerAggregator(AGGR_FLOAT_UNSTABLE, - MockFloatAggregator.class); - - context.registerAggregator(AGGR_INT_UNSTABLE, - new IntValue(0), - ValueMinCombiner.class); - context.registerAggregator(AGGR_INT_UNSTABLE, // overwrite is ok - new IntValue(Integer.MAX_VALUE), - ValueMinCombiner.class); - - context.registerAggregator(AGGR_INT_SUM, ValueType.INT, - IntValueSumCombiner.class); - context.registerAggregator(AGGR_INT_MAX, ValueType.INT, - ValueMaxCombiner.class); - - context.registerAggregator(AGGR_LONG_SUM, ValueType.LONG, - LongValueSumCombiner.class); - context.registerAggregator(AGGR_LONG_MAX, ValueType.LONG, - ValueMaxCombiner.class); - - context.registerAggregator(AGGR_FLOAT_SUM, ValueType.FLOAT, - FloatValueSumCombiner.class); - context.registerAggregator(AGGR_FLOAT_MIN, ValueType.FLOAT, - ValueMinCombiner.class); - - context.registerAggregator(AGGR_DOUBLE_SUM, ValueType.DOUBLE, - DoubleValueSumCombiner.class); - context.registerAggregator(AGGR_DOUBLE_MIN, ValueType.DOUBLE, - ValueMinCombiner.class); - - this.registerAggregatorWithError(context); - } - - private void registerAggregatorWithError(MasterContext context) { - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.registerAggregator("", MockIntAggregator.class); - }, e -> { - Assert.assertContains("registered aggregator name can't be empty", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.registerAggregator(null, MockIntAggregator.class); - }, e -> { - Assert.assertContains("registered aggregator name can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.registerAggregator("", ValueType.INT, - IntValueSumCombiner.class); - }, e -> { - Assert.assertContains("registered aggregator name can't be empty", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.registerAggregator(null, ValueType.INT, - IntValueSumCombiner.class); - }, e -> { - Assert.assertContains("registered aggregator name can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.registerAggregator(AGGR_INT_UNSTABLE, ValueType.INT, null); - }, e -> { - Assert.assertContains("combiner of aggregator can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - ValueType type = null; - context.registerAggregator(AGGR_INT_UNSTABLE, type, - IntValueSumCombiner.class); - }, e -> { - Assert.assertContains("value type of aggregator can't be null", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - IntValue value = null; - context.registerAggregator(AGGR_INT_UNSTABLE, value, - IntValueSumCombiner.class); - }, e -> { - Assert.assertContains("The aggregator default value can't be null", - e.getMessage()); - }); - - // Not applied now, can get it through aggregatedValue() after inited() - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(AGGR_INT_UNSTABLE, - new IntValue(Integer.MAX_VALUE)); - }, e -> { - Assert.assertContains("Can't get aggregator 'aggr_int_unstable", - e.getMessage()); - }); - } - - @Override - public boolean compute(MasterComputationContext context) { - if (context.superstep() == 0) { - this.assertStep0Aggregators(context); - this.updateStep0Aggregators(context); - } else if (context.superstep() == 1) { - this.assertStep1Aggregators(context); - } - - return true; - } - - protected void assertStat(MasterComputationContext context) { - Assert.assertEquals(6L, context.totalVertexCount()); - Assert.assertEquals(5L, context.totalEdgeCount()); - Assert.assertEquals(0L, context.finishedVertexCount()); - Assert.assertEquals(0L, context.messageCount()); - Assert.assertEquals(0L, context.messageBytes()); - } - - protected void assertStep0Aggregators(MasterComputationContext context) { - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(5.2f), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(3.14f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(10), - context.aggregatedValue( - MockMasterComputation.AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - MockMasterComputation.AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(5L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(10.4), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_MIN)); - } - - protected void assertStep1Aggregators(MasterComputationContext context) { - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(5.2f), context.aggregatedValue( - MockMasterComputation.AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(3.14f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(9), context.aggregatedValue( - MockMasterComputation.AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(5), context.aggregatedValue( - MockMasterComputation.AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - MockMasterComputation.AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(5L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - MockMasterComputation.AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(10.4), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - MockMasterComputation.AGGR_DOUBLE_MIN)); - } - - protected void updateStep0Aggregators(MasterComputationContext context) { - // Update UNSTABLE aggregator - context.aggregatedValue(MockMasterComputation.AGGR_FLOAT_UNSTABLE, - new FloatValue(8.8f)); - Assert.assertEquals(new FloatValue(8.8f), context.aggregatedValue( - MockMasterComputation.AGGR_FLOAT_UNSTABLE)); - - context.aggregatedValue(MockMasterComputation.AGGR_INT_UNSTABLE, - new IntValue(888)); - Assert.assertEquals(new IntValue(888), context.aggregatedValue( - MockMasterComputation.AGGR_INT_UNSTABLE)); - - // Update aggregator with error - this.assertAggregatedValueWithError(context); - } - - private void assertAggregatedValueWithError(MasterComputationContext - context) { - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_INT_SUM, - new LongValue(7L)); - }, e -> { - Assert.assertContains("Can't set long value '7' to int aggregator", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_LONG_SUM, - new IntValue(7)); - }, e -> { - Assert.assertContains("Can't set int value '7' to long aggregator", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_DOUBLE_SUM, - new FloatValue(7f)); - }, e -> { - Assert.assertContains("Can't set float value '7.0' to double ", - e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_DOUBLE_MIN, - null); - }, e -> { - Assert.assertContains("Can't set value to null for aggregator " + - "'aggr_double_min'", e.getMessage()); - }); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_CUSTOM_INT, - null); - }, e -> { - Assert.assertContains("Can't set value to null for aggregator " + - "'aggr_int'", e.getMessage()); - }); - - Assert.assertThrows(ClassCastException.class, () -> { - context.aggregatedValue(MockMasterComputation.AGGR_CUSTOM_FLOAT, - new IntValue(7)); - }, e -> { - Assert.assertContains("IntValue cannot be cast to", e.getMessage()); - Assert.assertContains("FloatValue", e.getMessage()); - }); - } - - public static class MockIntAggregator implements Aggregator { - - private IntValue value = new IntValue(); - - @Override - public void aggregateValue(int value) { - this.value.value(this.value.value() + value); - } - - @Override - public void aggregateValue(IntValue value) { - this.value.value(this.value.value() + value.value()); - } - - @Override - public IntValue aggregatedValue() { - return this.value; - } - - @Override - public void aggregatedValue(IntValue value) { - this.value = value; - } - - @Override - public Aggregator copy() { - MockIntAggregator copy = new MockIntAggregator(); - copy.value = this.value.copy(); - return copy; - } - - @Override - public void repair(ComputerContext context) { - // pass - } - } - - public static class MockFloatAggregator implements Aggregator { - - private FloatValue value = new FloatValue(); - - @Override - public void aggregateValue(float value) { - this.value.value(this.value.value() + value); - } - - @Override - public void aggregateValue(FloatValue value) { - this.value.value(this.value.value() + value.value()); - } - - @Override - public FloatValue aggregatedValue() { - return this.value; - } - - @Override - public void aggregatedValue(FloatValue value) { - this.value = value; - } - - @Override - public Aggregator copy() { - MockFloatAggregator copy = new MockFloatAggregator(); - copy.value = this.value.copy(); - return copy; - } - - @Override - public void repair(ComputerContext context) { - // pass - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation2.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation2.java deleted file mode 100644 index b86973df4..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockMasterComputation2.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.graph.value.FloatValue; -import org.apache.hugegraph.computer.core.graph.value.IntValue; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.master.MasterComputationContext; -import org.apache.hugegraph.testutil.Assert; - -public class MockMasterComputation2 extends MockMasterComputation { - - @Override - protected void assertStep0Aggregators(MasterComputationContext context) { - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(6.28f), context.aggregatedValue( - AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(10L), context.aggregatedValue( - AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(20.8f), context.aggregatedValue( - AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(20.8), context.aggregatedValue( - AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - AGGR_DOUBLE_MIN)); - } - - @Override - protected void assertStep1Aggregators(MasterComputationContext context) { - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - AGGR_CUSTOM_INT)); - Assert.assertEquals(new FloatValue(10.4f), context.aggregatedValue( - AGGR_CUSTOM_FLOAT)); - - Assert.assertEquals(new FloatValue(6.28f), context.aggregatedValue( - AGGR_FLOAT_UNSTABLE)); - Assert.assertEquals(new IntValue(9), context.aggregatedValue( - AGGR_INT_UNSTABLE)); - - Assert.assertEquals(new IntValue(10), context.aggregatedValue( - AGGR_INT_SUM)); - Assert.assertEquals(new IntValue(8), context.aggregatedValue( - AGGR_INT_MAX)); - - Assert.assertEquals(new LongValue(10L), context.aggregatedValue( - AGGR_LONG_SUM)); - Assert.assertEquals(new LongValue(8L), context.aggregatedValue( - AGGR_LONG_MAX)); - - Assert.assertEquals(new FloatValue(20.8f), context.aggregatedValue( - AGGR_FLOAT_SUM)); - Assert.assertEquals(new FloatValue(-10.0f), context.aggregatedValue( - AGGR_FLOAT_MIN)); - - Assert.assertEquals(new DoubleValue(20.8), context.aggregatedValue( - AGGR_DOUBLE_SUM)); - Assert.assertEquals(new DoubleValue(-10.0), context.aggregatedValue( - AGGR_DOUBLE_MIN)); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockWorkerService.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockWorkerService.java deleted file mode 100644 index 74d3c5e59..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/MockWorkerService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.apache.hugegraph.computer.core.config.Config; - -/** - * This class used for test case. There are several managers mocked here. - */ -public class MockWorkerService extends WorkerService { - - @Override - public void init(Config config) { - super.init(config); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java deleted file mode 100644 index 3e7d1c0ba..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.util.Arrays; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.master.MasterService; -import org.apache.hugegraph.computer.core.output.LimitedLogOutput; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.RpcOptions; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.junit.Test; -import org.slf4j.Logger; - -public class WorkerServiceTest extends UnitTestBase { - - private static final Logger LOG = Log.logger(WorkerServiceTest.class); - - @Test - public void testServiceWith1Worker() throws InterruptedException { - ExecutorService pool = Executors.newFixedThreadPool(2); - CountDownLatch countDownLatch = new CountDownLatch(2); - Throwable[] exceptions = new Throwable[2]; - - pool.submit(() -> { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_002", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.TRANSPORT_SERVER_PORT, "8086", - ComputerOptions.BSP_REGISTER_TIMEOUT, "100000", - ComputerOptions.BSP_LOG_INTERVAL, "30000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation.class.getName(), - ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName(), - ComputerOptions.OUTPUT_CLASS, - LimitedLogOutput.class.getName() - ); - try (WorkerService workerService = new MockWorkerService()) { - workerService.init(config); - workerService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start worker", e); - exceptions[0] = e; - } finally { - countDownLatch.countDown(); - } - }); - - pool.submit(() -> { - Config config = UnitTestBase.updateWithRequiredOptions( - RpcOptions.RPC_SERVER_HOST, "localhost", - ComputerOptions.JOB_ID, "local_002", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.BSP_REGISTER_TIMEOUT, "100000", - ComputerOptions.BSP_LOG_INTERVAL, "30000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.MASTER_COMPUTATION_CLASS, - MockMasterComputation.class.getName(), - ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName() - ); - try (MasterService masterService = new MasterService()) { - masterService.init(config); - masterService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start master", e); - exceptions[1] = e; - } finally { - /* - * It must close the service first. The pool will be shutdown - * if count down is executed first, and the server thread in - * master service will not be closed. - */ - countDownLatch.countDown(); - } - }); - - countDownLatch.await(); - pool.shutdownNow(); - - Assert.assertFalse(Arrays.asList(exceptions).toString(), existError(exceptions)); - } - - @Test - public void testServiceWith2Workers() throws InterruptedException { - ExecutorService pool = Executors.newFixedThreadPool(3); - CountDownLatch countDownLatch = new CountDownLatch(3); - Throwable[] exceptions = new Throwable[3]; - - pool.submit(() -> { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_003", - ComputerOptions.JOB_WORKERS_COUNT, "2", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.TRANSPORT_SERVER_PORT, "8086", - ComputerOptions.WORKER_DATA_DIRS, "[job_8086]", - ComputerOptions.BSP_REGISTER_TIMEOUT, "30000", - ComputerOptions.BSP_LOG_INTERVAL, "10000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation2.class.getName(), - ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName() - ); - - try (WorkerService workerService = new MockWorkerService()) { - workerService.init(config); - workerService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start worker", e); - exceptions[0] = e; - } finally { - countDownLatch.countDown(); - } - }); - - pool.submit(() -> { - Config config = UnitTestBase.updateWithRequiredOptions( - ComputerOptions.JOB_ID, "local_003", - ComputerOptions.JOB_WORKERS_COUNT, "2", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.TRANSPORT_SERVER_PORT, "8087", - ComputerOptions.WORKER_DATA_DIRS, "[job_8087]", - ComputerOptions.BSP_REGISTER_TIMEOUT, "30000", - ComputerOptions.BSP_LOG_INTERVAL, "10000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation2.class.getName(), - ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName() - ); - try (WorkerService workerService = new MockWorkerService()) { - workerService.init(config); - workerService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start worker", e); - exceptions[1] = e; - } finally { - countDownLatch.countDown(); - } - }); - - pool.submit(() -> { - Config config = UnitTestBase.updateWithRequiredOptions( - RpcOptions.RPC_SERVER_HOST, "localhost", - ComputerOptions.JOB_ID, "local_003", - ComputerOptions.JOB_WORKERS_COUNT, "2", - ComputerOptions.JOB_PARTITIONS_COUNT, "2", - ComputerOptions.BSP_REGISTER_TIMEOUT, "30000", - ComputerOptions.BSP_LOG_INTERVAL, "10000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.MASTER_COMPUTATION_CLASS, - MockMasterComputation2.class.getName(), - ComputerOptions.ALGORITHM_RESULT_CLASS, - DoubleValue.class.getName(), - ComputerOptions.ALGORITHM_MESSAGE_CLASS, - DoubleValue.class.getName() - ); - try (MasterService masterService = new MasterService()) { - masterService.init(config); - masterService.execute(); - } catch (Throwable e) { - LOG.error("Failed to start master", e); - exceptions[2] = e; - } finally { - countDownLatch.countDown(); - } - }); - - countDownLatch.await(); - pool.shutdownNow(); - - Assert.assertFalse(Arrays.asList(exceptions).toString(), existError(exceptions)); - } - - @Test - public void testFailToConnectEtcd() { - Config config = UnitTestBase.updateWithRequiredOptions( - // Unavailable etcd endpoints - ComputerOptions.BSP_ETCD_ENDPOINTS, "http://invalid-ip:8098", - ComputerOptions.JOB_ID, "local_004", - ComputerOptions.JOB_WORKERS_COUNT, "1", - ComputerOptions.BSP_LOG_INTERVAL, "30000", - ComputerOptions.BSP_MAX_SUPER_STEP, "2", - ComputerOptions.WORKER_COMPUTATION_CLASS, - MockComputation.class.getName() - ); - - try (WorkerService workerService = new MockWorkerService()) { - Assert.assertThrows(ComputerException.class, () -> { - workerService.init(config); - workerService.execute(); - }, e -> { - Assert.assertContains("Error while getting with key='BSP_MASTER_INIT_DONE'", - e.getMessage()); - Assert.assertContains("UNAVAILABLE: unresolved address", - e.getCause().getMessage()); - }); - } - } - - @Test - public void testDataTransportManagerFail() { - /* - * TODO: Complete this test case after data transport manager is - * completed. - */ - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStatTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStatTest.java deleted file mode 100644 index 9dcda0462..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerStatTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import java.io.IOException; - -import org.apache.hugegraph.computer.core.graph.partition.PartitionStat; -import org.apache.hugegraph.computer.core.receiver.MessageStat; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class WorkerStatTest { - - @Test - public void testConstructor() { - WorkerStat workerStat1 = new WorkerStat(); - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - workerStat1.add(stat1); - workerStat1.add(stat2); - Assert.assertEquals(2, workerStat1.size()); - Assert.assertEquals(stat1, workerStat1.get(0)); - Assert.assertEquals(stat2, workerStat1.get(1)); - WorkerStat workerStat2 = new WorkerStat(1); - Assert.assertEquals(1, workerStat2.workerId()); - Assert.assertEquals(0, workerStat2.size()); - } - - @Test - public void testReadWrite() throws IOException { - WorkerStat workerStat = new WorkerStat(1); - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - workerStat.add(stat1); - workerStat.add(stat2); - WorkerStat stats1ReadObj = new WorkerStat(); - UnitTestBase.assertEqualAfterWriteAndRead(workerStat, stats1ReadObj); - } - - @Test - public void testEquals() { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - WorkerStat workerStat1 = new WorkerStat(); - workerStat1.add(stat1); - workerStat1.add(stat2); - - WorkerStat workerStat2 = new WorkerStat(); - workerStat2.add(stat1); - workerStat2.add(stat2); - - WorkerStat workerStat3 = new WorkerStat(); - - Assert.assertEquals(workerStat1, workerStat2); - Assert.assertNotEquals(workerStat1, workerStat3); - Assert.assertNotEquals(workerStat1, new Object()); - } - - @Test - public void testHashCode() { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - WorkerStat workerStat1 = new WorkerStat(1); - workerStat1.add(stat1); - workerStat1.add(stat2); - - WorkerStat workerStat2 = new WorkerStat(1); - workerStat2.add(stat1); - workerStat2.add(stat2); - - WorkerStat workerStat3 = new WorkerStat(2); - - Assert.assertEquals(workerStat1.hashCode(), workerStat2.hashCode()); - Assert.assertNotEquals(workerStat1.hashCode(), workerStat3.hashCode()); - } - - @Test - public void testToString() { - PartitionStat stat1 = new PartitionStat(0, 1L, 2L, 0L); - PartitionStat stat2 = new PartitionStat(1, 4L, 3L, 2L); - stat2.mergeSendMessageStat(new MessageStat(5L, 6L)); - stat2.mergeRecvMessageStat(new MessageStat(7L, 8L)); - - WorkerStat workerStat = new WorkerStat(); - workerStat.add(stat1); - workerStat.add(stat2); - String str = "WorkerStat{\"workerId\":0," + - "\"partitionStats\":[{\"partitionId\":0," + - "\"vertexCount\":1,\"edgeCount\":2,\"" + - "finishedVertexCount\":0," + - "\"messageSendCount\":0,\"messageSendBytes\":0," + - "\"messageRecvCount\":0,\"messageRecvBytes\":0}," + - "{\"partitionId\":1,\"vertexCount\":4," + - "\"edgeCount\":3,\"finishedVertexCount\":2," + - "\"messageSendCount\":5,\"messageSendBytes\":6," + - "\"messageRecvCount\":7,\"messageRecvBytes\":8}]}"; - Assert.assertEquals(str, workerStat.toString()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerTestSuite.java deleted file mode 100644 index a10c3a64f..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.core.worker; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - WorkerStatTest.class, - WorkerServiceTest.class -}) -public class WorkerTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/dist/ComputerDistTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/dist/ComputerDistTestSuite.java deleted file mode 100644 index ebdf1f4dd..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/dist/ComputerDistTestSuite.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.dist; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - HugeGraphComputerTest.class -}) -public class ComputerDistTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputerTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputerTest.java deleted file mode 100644 index 429aa75fc..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/dist/HugeGraphComputerTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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. - */ -package org.apache.hugegraph.computer.dist; - -import java.util.Arrays; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.Log; -import org.junit.Test; -import org.slf4j.Logger; - -public class HugeGraphComputerTest extends UnitTestBase { - - private static final Logger LOG = Log.logger(HugeGraphComputerTest.class); - - @Test - public void testServiceWith1Worker() throws InterruptedException { - ExecutorService pool = Executors.newFixedThreadPool(2); - CountDownLatch countDownLatch = new CountDownLatch(2); - Throwable[] exceptions = new Throwable[2]; - String masterConfPath = HugeGraphComputerTest.class.getResource( - "/computer.properties").getPath(); - String work1ConfPath = HugeGraphComputerTest.class.getResource( - "/computer.properties").getPath(); - pool.submit(() -> { - try { - Thread.sleep(2000L); - String[] args = {work1ConfPath, "worker", "local"}; - HugeGraphComputer.main(args); - } catch (Throwable e) { - LOG.error("Failed to start worker", e); - exceptions[0] = e; - } finally { - countDownLatch.countDown(); - } - }); - - pool.submit(() -> { - try { - String[] args = {masterConfPath, "master", "local"}; - HugeGraphComputer.main(args); - } catch (Throwable e) { - LOG.error("Failed to start master", e); - exceptions[1] = e; - } finally { - countDownLatch.countDown(); - } - }); - - countDownLatch.await(); - pool.shutdownNow(); - - Assert.assertFalse(Arrays.asList(exceptions).toString(), - this.existError(exceptions)); - } - - @Test - public void testServiceWithError() { - String work1ConfPath = HugeGraphComputerTest.class.getResource( - "/computer.properties").getPath(); - Assert.assertThrows(IllegalArgumentException.class, - () -> { - String[] args1 = {work1ConfPath, "worker111", - "local"}; - HugeGraphComputer.main(args1); - }); - } - - @Test - public void testPrintUncaughtException() throws InterruptedException { - AtomicBoolean isRun = new AtomicBoolean(false); - Thread.UncaughtExceptionHandler handler = (t, e) -> { - isRun.compareAndSet(false, true); - }; - Thread.setDefaultUncaughtExceptionHandler(handler); - HugeGraphComputer.setUncaughtExceptionHandler(); - Thread t = new Thread(() -> { - throw new RuntimeException(); - }); - t.start(); - t.join(); - Assert.assertTrue(isRun.get()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/ComputerOptionsTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/driver/ComputerOptionsTest.java deleted file mode 100644 index c74822ef7..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/ComputerOptionsTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import static org.apache.hugegraph.config.OptionChecker.disallowEmpty; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.configuration2.MapConfiguration; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.driver.config.DriverConfigOption; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.ConfigException; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.TypedOption; -import org.apache.hugegraph.testutil.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ComputerOptionsTest extends UnitTestBase { - private static Map options; - - @BeforeClass - public static void setup() { - options = new HashMap<>(); - options.put(ComputerOptions.JOB_ID.name(), "local_002"); - options.put(ComputerOptions.JOB_WORKERS_COUNT.name(), "1"); - options.put(ComputerOptions.ALGORITHM_RESULT_CLASS.name(), - LongValue.class.getName()); - options.put(ComputerOptions.BSP_ETCD_ENDPOINTS.name(), - "http://abc:8098"); - options.put(ComputerOptions.HUGEGRAPH_URL.name(), - "http://127.0.0.1:8080"); - } - - @Test - public void testDriverConfigOption() { - DriverConfigOption option = new DriverConfigOption<>( - "test", "desc", - disallowEmpty(), - String.class); - - Assert.assertThrows(ConfigException.class, () -> { - option.checkVal(""); - }); - - Assert.assertNull(option.parseConvert(null)); - } - - @Test - public void testOptions() { - MapConfiguration mapConfig = new MapConfiguration(options); - HugeConfig config = new HugeConfig(mapConfig); - - Map> allOptions = ComputerOptions.instance() - .options(); - Collection> typedOptions = allOptions.values(); - - for (TypedOption typedOption : typedOptions) { - Object value = config.get(typedOption); - String key = typedOption.name(); - if (options.containsKey(key)) { - Assert.assertEquals(value instanceof Class ? ((Class) value).getName() : - String.valueOf(value), options.get(key)); - } else { - Assert.assertEquals(value, typedOption.defaultValue()); - } - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTest.java deleted file mode 100644 index bfcc2e4c6..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import org.apache.hugegraph.computer.driver.util.JsonUtil; -import org.apache.hugegraph.testutil.Assert; -import org.junit.Test; - -public class DriverTest { - - @Test - public void jsonUtilTest() { - SuperstepStat superstepStat = new SuperstepStat(); - String json = JsonUtil.toJson(superstepStat); - SuperstepStat superstepStat1 = JsonUtil.fromJson(json, - SuperstepStat.class); - Assert.assertEquals(superstepStat, superstepStat1); - - Assert.assertThrows(RuntimeException.class, () -> { - JsonUtil.fromJson("123", SuperstepStat.class); - }); - } - - @Test - public void testJobStatus() { - Assert.assertFalse(JobStatus.finished(JobStatus.INITIALIZING)); - Assert.assertFalse(JobStatus.finished(JobStatus.RUNNING)); - Assert.assertTrue(JobStatus.finished(JobStatus.FAILED)); - Assert.assertTrue(JobStatus.finished(JobStatus.SUCCEEDED)); - Assert.assertTrue(JobStatus.finished(JobStatus.CANCELLED)); - } - - @Test - public void testJobStateAndSuperstepStat() { - DefaultJobState jobState = new DefaultJobState(); - jobState.jobStatus(JobStatus.INITIALIZING); - jobState.superstep(3); - jobState.maxSuperstep(99); - SuperstepStat superstepStat = new SuperstepStat(); - superstepStat.vertexCount(1); - superstepStat.edgeCount(1); - superstepStat.finishedVertexCount(1); - superstepStat.messageCount(1); - superstepStat.active(true); - superstepStat.messageBytes(1); - jobState.lastSuperstepStat(superstepStat); - - Assert.assertEquals(JobStatus.INITIALIZING, jobState.jobStatus()); - Assert.assertEquals(3, jobState.superstep()); - Assert.assertEquals(99, jobState.maxSuperstep()); - - Assert.assertEquals(1, superstepStat.vertexCount()); - Assert.assertEquals(1, superstepStat.edgeCount()); - Assert.assertEquals(1, superstepStat.finishedVertexCount()); - Assert.assertEquals(1, superstepStat.messageCount()); - Assert.assertTrue(superstepStat.active()); - Assert.assertEquals(1, superstepStat.messageBytes()); - - SuperstepStat superstepStat2 = new SuperstepStat(); - superstepStat2.vertexCount(1); - superstepStat2.edgeCount(1); - superstepStat2.finishedVertexCount(1); - superstepStat2.messageCount(1); - superstepStat2.active(true); - superstepStat2.messageBytes(1); - Assert.assertEquals(superstepStat, superstepStat2); - Assert.assertEquals(superstepStat.hashCode(), - superstepStat2.hashCode()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java deleted file mode 100644 index 5a9b303e2..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/driver/DriverTestSuite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.driver; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - DriverTest.class, - ComputerOptionsTest.class, -}) -public class DriverTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/AbstractK8sTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/AbstractK8sTest.java deleted file mode 100644 index fd8c9e044..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/AbstractK8sTest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s; - -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; - -import org.apache.commons.configuration2.MapConfiguration; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.k8s.config.KubeDriverOptions; -import org.apache.hugegraph.computer.k8s.config.KubeSpecOptions; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJobList; -import org.apache.hugegraph.computer.k8s.driver.KubernetesDriver; -import org.apache.hugegraph.computer.k8s.operator.OperatorEntrypoint; -import org.apache.hugegraph.computer.k8s.operator.config.OperatorOptions; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.config.OptionSpace; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.ExecutorUtil; -import org.junit.After; -import org.junit.Before; - -import com.google.common.collect.Lists; - -import io.fabric8.kubernetes.api.model.NamespaceBuilder; -import io.fabric8.kubernetes.api.model.Secret; -import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition; -import io.fabric8.kubernetes.client.Config; -import io.fabric8.kubernetes.client.DefaultKubernetesClient; -import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.dsl.MixedOperation; -import io.fabric8.kubernetes.client.dsl.Resource; -import io.fabric8.kubernetes.client.utils.Utils; - -public abstract class AbstractK8sTest { - - protected String namespace = "test"; - protected HugeConfig config; - protected KubernetesDriver driver; - protected KubernetesClient kubeClient; - protected OperatorEntrypoint entrypoint; - protected Future operatorFuture; - protected MixedOperation> operation; - - protected static final String IMAGE_REPOSITORY_URL = "hugegraph/busybox"; - - static { - OptionSpace.register("computer", - "org.apache.hugegraph.computer.core.config.ComputerOptions"); - OptionSpace.register("computer-k8s-driver", - "org.apache.hugegraph.computer.k8s.config.KubeDriverOptions"); - OptionSpace.register("computer-k8s-spec", - "org.apache.hugegraph.computer.k8s.config.KubeSpecOptions"); - } - - protected void updateOptions(String key, Object value) { - this.config.clearProperty(key); - this.config.addProperty(key, String.valueOf(value)); - } - - @Before - public void setup() throws IOException { - this.initConfig(); - @SuppressWarnings("resource") - DefaultKubernetesClient client = new DefaultKubernetesClient(); - this.kubeClient = client.inNamespace(this.namespace); - - this.createCRD(this.kubeClient); - this.initKubernetesDriver(); - this.initOperator(); - } - - @After - public void teardown() throws InterruptedException, ExecutionException { - this.driver.close(); - this.entrypoint.shutdown(); - this.operatorFuture.get(); - this.kubeClient.close(); - Set keySet = OperatorOptions.instance().options().keySet(); - for (String key : keySet) { - System.clearProperty(key); - } - System.clearProperty(Config.KUBERNETES_KUBECONFIG_FILE); - } - - protected void initConfig() { - HashMap options = new HashMap<>(); - options.put(ComputerOptions.JOB_ID.name(), - KubeUtil.genJobId("PageRank")); - options.put(ComputerOptions.JOB_WORKERS_COUNT.name(), "1"); - options.put(ComputerOptions.ALGORITHM_RESULT_CLASS.name(), - LongValue.class.getName()); - options.put(ComputerOptions.ALGORITHM_PARAMS_CLASS.name(), - "org.apache.hugegraph.computer.core.config.Null"); - options.put(ComputerOptions.JOB_PARTITIONS_COUNT.name(), - "1000"); - options.put(ComputerOptions.BSP_ETCD_ENDPOINTS.name(), - "http://abc:8098"); - options.put(ComputerOptions.HUGEGRAPH_URL.name(), - "http://127.0.0.1:8080"); - options.put(KubeDriverOptions.NAMESPACE.name(), - this.namespace); - options.put(KubeDriverOptions.LOG4J_XML_PATH.name(), - "conf/log4j2-test.xml"); - options.put(KubeDriverOptions.ENABLE_INTERNAL_ALGORITHM.name(), - "false"); - options.put(KubeDriverOptions.IMAGE_REPOSITORY_URL.name(), - IMAGE_REPOSITORY_URL); - options.put(KubeDriverOptions.IMAGE_REPOSITORY_USERNAME.name(), - "hugegraph"); - options.put(KubeDriverOptions.IMAGE_REPOSITORY_PASSWORD.name(), - "hugegraph"); - options.put(KubeDriverOptions.INTERNAL_ALGORITHM_IMAGE_URL.name(), - IMAGE_REPOSITORY_URL + ":pageRank-latest"); - options.put(KubeSpecOptions.PULL_POLICY.name(), "IfNotPresent"); - options.put(KubeSpecOptions.JVM_OPTIONS.name(), "-Dlog4j2.debug=true"); - options.put(KubeSpecOptions.MASTER_COMMAND.name(), "[/bin/sh, -c]"); - options.put(KubeSpecOptions.WORKER_COMMAND.name(), "[/bin/sh, -c]"); - options.put(KubeSpecOptions.MASTER_ARGS.name(), "[echo master]"); - options.put(KubeSpecOptions.WORKER_ARGS.name(), "[echo worker]"); - MapConfiguration mapConfig = new MapConfiguration(options); - this.config = new HugeConfig(mapConfig); - } - - protected void initPullSecret() { - String dockerServer = this.config.get( - KubeDriverOptions.IMAGE_REPOSITORY_URL); - String username = this.config.get( - KubeDriverOptions.IMAGE_REPOSITORY_USERNAME); - String password = this.config.get( - KubeDriverOptions.IMAGE_REPOSITORY_PASSWORD); - Secret secret = KubeUtil.dockerRegistrySecret(this.namespace, - dockerServer, - username, - password); - this.kubeClient.secrets().createOrReplace(secret); - this.updateOptions(KubeDriverOptions.PULL_SECRET_NAMES.name(), - Lists.newArrayList(secret.getMetadata().getName())); - } - - protected void initKubernetesDriver() { - this.driver = new KubernetesDriver(this.config); - this.operation = Whitebox.getInternalState(this.driver, - "operation"); - } - - protected void initOperator() { - this.operation.delete(this.operation.list().getItems()); - ExecutorService pool = ExecutorUtil.newFixedThreadPool("operator-test"); - this.operatorFuture = pool.submit(() -> { - String watchNameSpace = Utils.getSystemPropertyOrEnvVar( - "WATCH_NAMESPACE"); - if (!Objects.equals(watchNameSpace, Constants.ALL_NAMESPACE)) { - System.setProperty("WATCH_NAMESPACE", this.namespace); - } else { - NamespaceBuilder namespaceBuilder = new NamespaceBuilder() - .withNewMetadata() - .withName(this.namespace) - .endMetadata(); - KubeUtil.ignoreExists(() -> { - return this.kubeClient.namespaces() - .create(namespaceBuilder.build()); - }); - } - this.entrypoint = new OperatorEntrypoint(); - this.entrypoint.start(); - }); - UnitTestBase.sleep(2000L); - } - - private void createCRD(KubernetesClient client) { - Resource crd = client - .apiextensions() - .v1beta1() - .customResourceDefinitions() - .load(new File("../computer-k8s-operator/manifest" + - "/hugegraph-computer-crd.v1beta1.yaml")); - crd.createOrReplace(); - crd.waitUntilReady(2, TimeUnit.SECONDS); - Assert.assertNotNull(crd.get()); - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/K8sTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/K8sTestSuite.java deleted file mode 100644 index 71b5b5b21..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/K8sTestSuite.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - KubernetesDriverTest.class, - OperatorTest.class, - MiniKubeTest.class -}) -public class K8sTestSuite { -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/KubernetesDriverTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/KubernetesDriverTest.java deleted file mode 100644 index b95b602ee..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/KubernetesDriverTest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.k8s; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.mutable.MutableBoolean; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.driver.ComputerDriverException; -import org.apache.hugegraph.computer.driver.DefaultJobState; -import org.apache.hugegraph.computer.driver.JobObserver; -import org.apache.hugegraph.computer.driver.JobState; -import org.apache.hugegraph.computer.driver.JobStatus; -import org.apache.hugegraph.computer.k8s.config.KubeDriverOptions; -import org.apache.hugegraph.computer.k8s.config.KubeSpecOptions; -import org.apache.hugegraph.computer.k8s.crd.model.ComputerJobSpec; -import org.apache.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob; -import org.apache.hugegraph.computer.k8s.driver.KubernetesDriver; -import org.apache.hugegraph.computer.k8s.util.KubeUtil; -import org.apache.hugegraph.computer.suite.unit.UnitTestBase; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.Mockito; - -import io.fabric8.kubernetes.api.model.NamedCluster; -import io.fabric8.kubernetes.api.model.NamedClusterBuilder; -import io.fabric8.kubernetes.api.model.NamedContext; -import io.fabric8.kubernetes.api.model.NamedContextBuilder; -import io.fabric8.kubernetes.client.Config; -import io.fabric8.kubernetes.client.DefaultKubernetesClient; -import io.fabric8.kubernetes.client.Watcher; -import io.fabric8.kubernetes.client.WatcherException; -import io.fabric8.kubernetes.client.dsl.internal.AbstractWatchManager; -import io.fabric8.kubernetes.client.internal.KubeConfigUtils; -import io.fabric8.kubernetes.client.server.mock.KubernetesServer; - -public class KubernetesDriverTest extends AbstractK8sTest { - - @Rule - public KubernetesServer server = new KubernetesServer(true, true); - - @Before - @Override - public void setup() throws IOException { - this.initConfig(); - Config configuration = this.server.getClient().getConfiguration(); - File tempFile = File.createTempFile(UUID.randomUUID().toString(), ""); - try { - String absolutePath = tempFile.getAbsolutePath(); - this.updateOptions(KubeDriverOptions.KUBE_CONFIG.name(), absolutePath); - NamedCluster cluster = new NamedClusterBuilder() - .withName("kubernetes") - .withNewCluster() - .withServer(configuration.getMasterUrl()) - .withInsecureSkipTlsVerify(configuration.isTrustCerts()) - .withCertificateAuthorityData(configuration.getCaCertData()) - .endCluster() - .build(); - NamedContext context = new NamedContextBuilder() - .withName("test@kubernetes") - .withNewContext() - .withCluster(cluster.getName()) - .endContext() - .build(); - io.fabric8.kubernetes.api.model.Config config = Config.builder() - .withClusters(cluster) - .addToContexts(context) - .withCurrentContext( - context.getName()) - .build(); - KubeConfigUtils.persistKubeConfigIntoFile(config, absolutePath); - System.setProperty(Config.KUBERNETES_KUBECONFIG_FILE, absolutePath); - - @SuppressWarnings("resource") - DefaultKubernetesClient client = new DefaultKubernetesClient(); - this.kubeClient = client.inNamespace(this.namespace); - - this.initPullSecret(); - this.initKubernetesDriver(); - this.initOperator(); - } finally { - FileUtils.deleteQuietly(tempFile); - } - } - - @After - @Override - public void teardown() throws InterruptedException, ExecutionException { - super.teardown(); - } - - @Test - public void testConstruct() { - String namespace = Whitebox.getInternalState(this.driver, "namespace"); - HugeConfig conf = Whitebox.getInternalState(this.driver, "conf"); - Object operation = Whitebox.getInternalState(this.driver, "operation"); - MutableBoolean watchActive = Whitebox.getInternalState(this.driver, "watchActive"); - Assert.assertTrue(watchActive.booleanValue()); - Assert.assertEquals(namespace, "test"); - Assert.assertNotNull(conf); - Assert.assertNotNull(operation); - - final int workerInstances = 2; - this.updateOptions(KubeSpecOptions.WORKER_INSTANCES.name(), workerInstances); - Map defaultSpec = Whitebox.invoke(KubernetesDriver.class, - "defaultSpec", this.driver); - String workerInstancesKey = KubeUtil.covertSpecKey(KubeSpecOptions.WORKER_INSTANCES.name()); - Assert.assertEquals(defaultSpec.get(workerInstancesKey), workerInstances); - } - - @Test - public void testUploadAlgorithmJar() throws FileNotFoundException { - Whitebox.setInternalState(this.driver, "bashPath", "conf/images/docker_push_test.sh"); - Whitebox.setInternalState(this.driver, "registry", "registry.hub.docker.com"); - String url = "https://github.com/apache/hugegraph-doc/raw/" + - "binary-1.0/dist/computer/test.jar"; - String path = "conf/images/test.jar"; - downloadFileByUrl(url, path); - - InputStream inputStream = new FileInputStream(path); - this.driver.uploadAlgorithmJar("PageRank", inputStream); - - File file = new File("/tmp/upload.txt"); - try { - Assert.assertTrue(file.exists()); - } finally { - FileUtils.deleteQuietly(file); - } - } - - @Test - public void testUploadAlgorithmJarWithError() { - Whitebox.setInternalState(this.driver, "bashPath", "conf/images/upload_test-x.sh"); - String url = "https://github.com/apache/hugegraph-doc/raw/" + - "binary-1.0/dist/computer/test.jar"; - String path = "conf/images/test.jar"; - downloadFileByUrl(url, path); - - try (InputStream inputStream = new FileInputStream(path)) { - Assert.assertThrows(ComputerDriverException.class, () -> { - this.driver.uploadAlgorithmJar("PageRank", inputStream); - }, e -> { - ComputerDriverException exception = (ComputerDriverException) e; - Assert.assertContains("No such file", exception.rootCause().getMessage()); - }); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Test - public void testSubmitJob() { - Map params = new HashMap<>(); - params.put(KubeSpecOptions.WORKER_INSTANCES.name(), "10"); - String jobId = this.driver.submitJob("PageRank", params); - HugeGraphComputerJob computerJob = this.operation.withName(KubeUtil.crName(jobId)).get(); - Assert.assertNotNull(computerJob); - Assert.assertEquals(computerJob.getSpec().getAlgorithmName(), "PageRank"); - Assert.assertEquals(computerJob.getSpec().getJobId(), jobId); - } - - @Test - public void testCancelJob() { - Map params = new HashMap<>(); - params.put(KubeSpecOptions.WORKER_INSTANCES.name(), "10"); - String jobId = this.driver.submitJob("PageRank2", params); - - String crName = KubeUtil.crName(jobId); - HugeGraphComputerJob computerJob = this.operation.withName(crName).get(); - Assert.assertNotNull(computerJob); - - UnitTestBase.sleep(1000L); - - this.driver.cancelJob(jobId, params); - HugeGraphComputerJob canceledComputerJob = this.operation.withName(crName).get(); - Assert.assertNull(canceledComputerJob); - Assert.assertNull(this.driver.jobState(jobId, params)); - } - - @Test - public void testWatchJobAndCancel() { - Map params = new HashMap<>(); - params.put(KubeSpecOptions.WORKER_INSTANCES.name(), "10"); - String jobId = this.driver.submitJob("PageRank3", params); - - JobObserver jobObserver = Mockito.mock(JobObserver.class); - - CompletableFuture future = this.driver.waitJobAsync(jobId, params, jobObserver); - - Mockito.verify(jobObserver, Mockito.timeout(5000L).atLeast(1)) - .onJobStateChanged(Mockito.any(DefaultJobState.class)); - - future.getNow(null); - - MutableBoolean watchActive = Whitebox.getInternalState(this.driver, "watchActive"); - watchActive.setFalse(); - this.driver.waitJobAsync(jobId, params, jobObserver); - - this.driver.cancelJob(jobId, params); - UnitTestBase.sleep(1000L); - - CompletableFuture future2 = this.driver.waitJobAsync(jobId, params, jobObserver); - Assert.assertNull(future2); - } - - @Test - public void testJobState() { - Map params = new HashMap<>(); - params.put(KubeSpecOptions.WORKER_INSTANCES.name(), "10"); - String jobId = this.driver.submitJob("PageRank4", params); - - JobState jobState = this.driver.jobState(jobId, params); - Assert.assertNotNull(jobState); - Assert.assertEquals(JobStatus.INITIALIZING, jobState.jobStatus()); - } - - @Test - public void testOnClose() { - Map, JobObserver>> waits = - Whitebox.getInternalState(this.driver, "waits"); - waits.put("test-123", Pair.of(new CompletableFuture<>(), Mockito.mock(JobObserver.class))); - - AbstractWatchManager watch = Whitebox.getInternalState(this.driver, - "watch"); - Watcher watcher = Whitebox.getInternalState(watch, "watcher"); - - watcher.eventReceived(Watcher.Action.ADDED, null); - watcher.eventReceived(Watcher.Action.ERROR, new HugeGraphComputerJob()); - HugeGraphComputerJob computerJob = new HugeGraphComputerJob(); - computerJob.setSpec(new ComputerJobSpec()); - watcher.eventReceived(Watcher.Action.MODIFIED, computerJob); - - WatcherException testClose = new WatcherException("test close"); - watcher.onClose(testClose); - - MutableBoolean watchActive = Whitebox.getInternalState(this.driver, "watchActive"); - Assert.assertFalse(watchActive.booleanValue()); - } - - @Test - public void testCheckComputerConf() { - Map params = new HashMap<>(); - params.put(ComputerOptions.JOB_PARTITIONS_COUNT.name(), "9"); - params.put(KubeSpecOptions.WORKER_INSTANCES.name(), "10"); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - this.driver.submitJob("PageRank3", params); - }, e -> { - Assert.assertContains("The partitions count must be >= workers instances", - e.getMessage() - ); - }); - - Map defaultConf = Whitebox.getInternalState(this.driver, "defaultConf"); - defaultConf = new HashMap<>(defaultConf); - defaultConf.remove(ComputerOptions.ALGORITHM_PARAMS_CLASS.name()); - Whitebox.setInternalState(this.driver, "defaultConf", defaultConf); - - Assert.assertThrows(IllegalArgumentException.class, () -> { - this.driver.submitJob("PageRank3", params); - }, e -> { - Assert.assertContains("The [algorithm.params_class] options can't be null", - e.getMessage() - ); - }); - } - - public static void downloadFileByUrl(String url, String destPath) { - int connectTimeout = 5000; - int readTimeout = 10000; - try { - FileUtils.copyURLToFile(new URL(url), new File(destPath), connectTimeout, readTimeout); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java deleted file mode 100644 index 7b273f864..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/IntegrateTestSuite.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.suite.integrate; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.config.OptionSpace; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.Log; -import org.apache.logging.log4j.LogManager; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.slf4j.Logger; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - SenderIntegrateTest.class -}) -public class IntegrateTestSuite { - - private static final Logger LOG = Log.logger(IntegrateTestSuite.class); - - @BeforeClass - public static void setup() { - Runtime.getRuntime().addShutdownHook(new Thread(LogManager::shutdown)); - - LOG.info("Setup for IntegrateTestSuite of hugegraph-computer"); - - // Don't forget to register options - OptionSpace.register("computer", - "org.apache.hugegraph.computer.core.config.ComputerOptions"); - OptionSpace.register("computer-rpc", "org.apache.hugegraph.config.RpcOptions"); - - String etcdUrl = System.getenv("BSP_ETCD_URL"); - if (StringUtils.isNotBlank(etcdUrl)) { - Whitebox.setInternalState(ComputerOptions.BSP_ETCD_ENDPOINTS, - "defaultValue", etcdUrl); - } - - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java deleted file mode 100644 index 6ae0008be..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.suite.integrate; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; - -import org.apache.hugegraph.computer.algorithm.centrality.pagerank.PageRankParams; -import org.apache.hugegraph.computer.core.common.exception.TransportException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.value.DoubleValue; -import org.apache.hugegraph.computer.core.manager.Managers; -import org.apache.hugegraph.computer.core.master.MasterService; -import org.apache.hugegraph.computer.core.network.DataClientManager; -import org.apache.hugegraph.computer.core.network.connection.ConnectionManager; -import org.apache.hugegraph.computer.core.network.message.Message; -import org.apache.hugegraph.computer.core.network.netty.NettyTransportClient; -import org.apache.hugegraph.computer.core.network.session.ClientSession; -import org.apache.hugegraph.computer.core.util.ComputerContextUtil; -import org.apache.hugegraph.computer.core.worker.WorkerService; -import org.apache.hugegraph.config.RpcOptions; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.Log; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.slf4j.Logger; - -import com.google.common.collect.Sets; - -public class SenderIntegrateTest { - - public static final Logger LOG = Log.logger(SenderIntegrateTest.class); - - private static final Class COMPUTATION = MockComputation.class; - - @BeforeClass - public static void init() { - // pass - } - - @AfterClass - public static void clear() { - // pass - } - - @Test - public void testOneWorker() { - AtomicReference masterServiceRef = new AtomicReference<>(); - AtomicReference workerServiceRef = new AtomicReference<>(); - CompletableFuture masterFuture = new CompletableFuture<>(); - Thread masterThread = new Thread(() -> { - String[] args = OptionsBuilder.newInstance() - .withJobId("local_002") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(1) - .withBufferThreshold(50) - .withBufferCapacity(60) - .withRpcServerHost("127.0.0.1") - .withRpcServerPort(8611) - .withRpcServerPort(0) - .build(); - try (MasterService service = initMaster(args)) { - masterServiceRef.set(service); - service.execute(); - masterFuture.complete(null); - } catch (Exception e) { - LOG.error("Failed to execute master service", e); - masterFuture.completeExceptionally(e); - } - }); - masterThread.setDaemon(true); - - CompletableFuture workerFuture = new CompletableFuture<>(); - Thread workerThread = new Thread(() -> { - String[] args = OptionsBuilder.newInstance() - .withJobId("local_002") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(1) - .withBufferThreshold(50) - .withBufferCapacity(60) - .withTransoprtServerPort(0) - .build(); - try (WorkerService service = initWorker(args)) { - workerServiceRef.set(service); - service.execute(); - workerFuture.complete(null); - } catch (Throwable e) { - LOG.error("Failed to execute worker service", e); - workerFuture.completeExceptionally(e); - } - }); - workerThread.setDaemon(true); - masterThread.start(); - workerThread.start(); - - try { - CompletableFuture.allOf(workerFuture, masterFuture).join(); - } finally { - workerServiceRef.get().close(); - masterServiceRef.get().close(); - } - } - - @Test - public void testMultiWorkers() throws IOException { - int workerCount = 3; - int partitionCount = 3; - AtomicReference masterServiceRef = new AtomicReference<>(); - Set workerServices = Sets.newConcurrentHashSet(); - CompletableFuture masterFuture = new CompletableFuture<>(); - Thread masterThread = new Thread(() -> { - String[] args = OptionsBuilder.newInstance() - .withJobId("local_003") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(workerCount) - .withPartitionCount(partitionCount) - .withRpcServerHost("127.0.0.1") - .withRpcServerPort(0) - .build(); - try { - MasterService service = initMaster(args); - masterServiceRef.set(service); - service.execute(); - masterFuture.complete(null); - } catch (Throwable e) { - LOG.error("Failed to execute master service", e); - masterFuture.completeExceptionally(e); - } - }); - masterThread.setDaemon(true); - - Map> workers = new HashMap<>(workerCount); - for (int i = 1; i <= workerCount; i++) { - String dir = "[jobs-" + i + "]"; - - CompletableFuture workerFuture = new CompletableFuture<>(); - Thread thread = new Thread(() -> { - String[] args; - args = OptionsBuilder.newInstance() - .withJobId("local_003") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(workerCount) - .withPartitionCount(partitionCount) - .withTransoprtServerPort(0) - .withDataDirs(dir) - .build(); - try { - WorkerService service = initWorker(args); - workerServices.add(service); - service.execute(); - workerFuture.complete(null); - } catch (Throwable e) { - LOG.error("Failed to execute worker service", e); - workerFuture.completeExceptionally(e); - } - }); - thread.setDaemon(true); - workers.put(thread, workerFuture); - } - - masterThread.start(); - for (Thread worker : workers.keySet()) { - worker.start(); - } - - List> futures = new ArrayList<>(workers.values()); - futures.add(masterFuture); - try { - CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join(); - } finally { - for (WorkerService workerService : workerServices) { - workerService.close(); - } - masterServiceRef.get().close(); - } - } - - @Test - public void testOneWorkerWithBusyClient() { - AtomicReference masterServiceRef = new AtomicReference<>(); - AtomicReference workerServiceRef = new AtomicReference<>(); - CompletableFuture masterFuture = new CompletableFuture<>(); - Thread masterThread = new Thread(() -> { - String[] args = OptionsBuilder.newInstance() - .withJobId("local_002") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(1) - .withWriteBufferHighMark(10) - .withWriteBufferLowMark(5) - .withRpcServerHost("127.0.0.1") - .withRpcServerPort(0) - .build(); - try (MasterService service = initMaster(args)) { - masterServiceRef.set(service); - service.execute(); - masterFuture.complete(null); - } catch (Throwable e) { - LOG.error("Failed to execute master service", e); - masterFuture.completeExceptionally(e); - } - }); - masterThread.setDaemon(true); - - CompletableFuture workerFuture = new CompletableFuture<>(); - int transoprtServerPort = 8998; - Thread workerThread = new Thread(() -> { - String[] args = OptionsBuilder.newInstance() - .withJobId("local_002") - .withAlgorithm(PageRankParams.class) - .withResultName("rank") - .withResultClass(DoubleValue.class) - .withMessageClass(DoubleValue.class) - .withMaxSuperStep(3) - .withComputationClass(COMPUTATION) - .withWorkerCount(1) - .withWriteBufferHighMark(20) - .withWriteBufferLowMark(10) - .withTransoprtServerPort(transoprtServerPort) - .build(); - try (WorkerService service = initWorker(args)) { - workerServiceRef.set(service); - // Let send rate slowly - this.slowSendFunc(service, transoprtServerPort); - service.execute(); - workerFuture.complete(null); - } catch (Throwable e) { - LOG.error("Failed to execute worker service", e); - workerFuture.completeExceptionally(e); - } - }); - workerThread.setDaemon(true); - masterThread.start(); - workerThread.start(); - - try { - CompletableFuture.allOf(workerFuture, masterFuture).join(); - } finally { - workerServiceRef.get().close(); - masterServiceRef.get().close(); - } - } - - private void slowSendFunc(WorkerService service, int port) throws TransportException { - Managers managers = Whitebox.getInternalState(service, "managers"); - DataClientManager clientManager = managers.get( - DataClientManager.NAME); - ConnectionManager connManager = Whitebox.getInternalState( - clientManager, "connManager"); - NettyTransportClient client = (NettyTransportClient) - connManager.getOrCreateClient( - "127.0.0.1", port); - ClientSession clientSession = Whitebox.invoke(client.getClass(), - "clientSession", client); - Function> sendFuncBak = Whitebox.getInternalState( - clientSession, - "sendFunction"); - Function> sendFunc = message -> { - try { - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return sendFuncBak.apply(message); - }; - Whitebox.setInternalState(clientSession, "sendFunction", sendFunc); - } - - private MasterService initMaster(String[] args) { - Config config = ComputerContextUtil.initContext( - ComputerContextUtil.convertToMap(args)); - MasterService service = new MasterService(); - service.init(config); - return service; - } - - private WorkerService initWorker(String[] args) { - Config config = ComputerContextUtil.initContext( - ComputerContextUtil.convertToMap(args)); - WorkerService service = new WorkerService(); - service.init(config); - return service; - } - - private static class OptionsBuilder { - - private final List options; - - public static OptionsBuilder newInstance() { - return new OptionsBuilder(); - } - - public OptionsBuilder() { - this.options = new ArrayList<>(); - } - - public String[] build() { - return this.options.toArray(new String[0]); - } - - public OptionsBuilder withJobId(String jobId) { - this.options.add(ComputerOptions.JOB_ID.name()); - this.options.add(jobId); - return this; - } - - public OptionsBuilder withAlgorithm(Class clazz) { - this.options.add(ComputerOptions.ALGORITHM_PARAMS_CLASS.name()); - this.options.add(clazz.getName()); - return this; - } - - public OptionsBuilder withResultClass(Class clazz) { - this.options.add(ComputerOptions.ALGORITHM_RESULT_CLASS.name()); - this.options.add(clazz.getName()); - return this; - } - - public OptionsBuilder withMessageClass(Class clazz) { - this.options.add(ComputerOptions.ALGORITHM_MESSAGE_CLASS.name()); - this.options.add(clazz.getName()); - return this; - } - - public OptionsBuilder withResultName(String name) { - this.options.add(ComputerOptions.OUTPUT_RESULT_NAME.name()); - this.options.add(name); - return this; - } - - public OptionsBuilder withMaxSuperStep(int maxSuperStep) { - this.options.add(ComputerOptions.BSP_MAX_SUPER_STEP.name()); - this.options.add(String.valueOf(maxSuperStep)); - return this; - } - - public OptionsBuilder withComputationClass(Class clazz) { - this.options.add(ComputerOptions.WORKER_COMPUTATION_CLASS.name()); - this.options.add(clazz.getName()); - return this; - } - - public OptionsBuilder withWorkerCount(int count) { - this.options.add(ComputerOptions.JOB_WORKERS_COUNT.name()); - this.options.add(String.valueOf(count)); - return this; - } - - public OptionsBuilder withPartitionCount(int count) { - this.options.add(ComputerOptions.JOB_PARTITIONS_COUNT.name()); - this.options.add(String.valueOf(count)); - return this; - } - - public OptionsBuilder withBufferThreshold(int sizeInByte) { - this.options.add(ComputerOptions.WORKER_WRITE_BUFFER_THRESHOLD - .name()); - this.options.add(String.valueOf(sizeInByte)); - return this; - } - - public OptionsBuilder withBufferCapacity(int sizeInByte) { - this.options.add(ComputerOptions.WORKER_WRITE_BUFFER_INIT_CAPACITY - .name()); - this.options.add(String.valueOf(sizeInByte)); - return this; - } - - public OptionsBuilder withTransoprtServerPort(int dataPort) { - this.options.add(ComputerOptions.TRANSPORT_SERVER_PORT.name()); - this.options.add(String.valueOf(dataPort)); - return this; - } - - public OptionsBuilder withWriteBufferHighMark(int mark) { - this.options.add(ComputerOptions.TRANSPORT_WRITE_BUFFER_HIGH_MARK - .name()); - this.options.add(String.valueOf(mark)); - return this; - } - - public OptionsBuilder withWriteBufferLowMark(int mark) { - this.options.add(ComputerOptions.TRANSPORT_WRITE_BUFFER_LOW_MARK - .name()); - this.options.add(String.valueOf(mark)); - return this; - } - - public OptionsBuilder withRpcServerHost(String host) { - this.options.add(RpcOptions.RPC_SERVER_HOST.name()); - this.options.add(host); - return this; - } - - public OptionsBuilder withRpcServerPort(int port) { - this.options.add(RpcOptions.RPC_SERVER_PORT.name()); - this.options.add(String.valueOf(port)); - return this; - } - - public OptionsBuilder withDataDirs(String dataDirs) { - this.options.add(ComputerOptions.WORKER_DATA_DIRS.name()); - this.options.add(String.valueOf(dataDirs)); - return this; - } - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestBase.java b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestBase.java deleted file mode 100644 index efc0703fb..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestBase.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.suite.unit; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; - -import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.computer.core.common.ComputerContext; -import org.apache.hugegraph.computer.core.common.Constants; -import org.apache.hugegraph.computer.core.common.exception.ComputerException; -import org.apache.hugegraph.computer.core.config.ComputerOptions; -import org.apache.hugegraph.computer.core.config.Config; -import org.apache.hugegraph.computer.core.graph.GraphFactory; -import org.apache.hugegraph.computer.core.graph.id.Id; -import org.apache.hugegraph.computer.core.graph.id.IdFactory; -import org.apache.hugegraph.computer.core.graph.id.IdType; -import org.apache.hugegraph.computer.core.graph.value.LongValue; -import org.apache.hugegraph.computer.core.graph.value.Value; -import org.apache.hugegraph.computer.core.io.BytesInput; -import org.apache.hugegraph.computer.core.io.BytesOutput; -import org.apache.hugegraph.computer.core.io.IOFactory; -import org.apache.hugegraph.computer.core.io.OutputFormat; -import org.apache.hugegraph.computer.core.io.RandomAccessInput; -import org.apache.hugegraph.computer.core.io.RandomAccessOutput; -import org.apache.hugegraph.computer.core.io.Readable; -import org.apache.hugegraph.computer.core.io.StreamGraphInput; -import org.apache.hugegraph.computer.core.io.StreamGraphOutput; -import org.apache.hugegraph.computer.core.io.Writable; -import org.apache.hugegraph.computer.core.store.entry.EntryInput; -import org.apache.hugegraph.computer.core.store.entry.EntryInputImpl; -import org.apache.hugegraph.computer.core.util.ComputerContextUtil; -import org.apache.hugegraph.computer.core.worker.MockComputationParams; -import org.apache.hugegraph.config.OptionSpace; -import org.apache.hugegraph.config.TypedOption; -import org.apache.hugegraph.driver.HugeClient; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.apache.logging.log4j.LogManager; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.slf4j.Logger; - -public class UnitTestBase { - - private static final Logger LOG = Log.logger(UnitTestBase.class); - - private static final String CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + - "0123456789" + - "abcdefghijklmnopqrstuvxyz"; - private static String URL; - private static String GRAPH; - private static String USERNAME; - private static String PASSWORD; - private static HugeClient CLIENT = null; - - protected static void clearAll() { - client().graphs().clearGraph(GRAPH, "I'm sure to delete all data"); - } - - @BeforeClass - public static void init() throws ClassNotFoundException { - Runtime.getRuntime().addShutdownHook(new Thread(LogManager::shutdown)); - - LOG.info("Setup for UnitTestSuite of hugegraph-computer"); - - String etcdUrl = System.getenv("BSP_ETCD_URL"); - if (StringUtils.isNotBlank(etcdUrl)) { - Whitebox.setInternalState(ComputerOptions.BSP_ETCD_ENDPOINTS, - "defaultValue", etcdUrl); - } - - Whitebox.setInternalState(ComputerOptions.HUGEGRAPH_URL, - "defaultValue", - "http://127.0.0.1:8080"); - Whitebox.setInternalState(ComputerOptions.HUGEGRAPH_GRAPH_NAME, - "defaultValue", - "hugegraph"); - Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_URL, - "defaultValue", - "hdfs://127.0.0.1:9000"); - Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_USER, - "defaultValue", - System.getProperty("user.name")); - Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_KERBEROS_ENABLE, - "defaultValue", - false); - Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_KRB5_CONF, - "defaultValue", - "/etc/krb5.conf"); - Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_KERBEROS_KEYTAB, - "defaultValue", - ""); - Whitebox.setInternalState( - ComputerOptions.OUTPUT_HDFS_KERBEROS_PRINCIPAL, - "defaultValue", - ""); - Whitebox.setInternalState( - ComputerOptions.INPUT_LOADER_SCHEMA_PATH, - "defaultValue", - "src/main/resources/hdfs_input_test/schema.json"); - Whitebox.setInternalState( - ComputerOptions.INPUT_LOADER_STRUCT_PATH, - "defaultValue", - "src/main/resources/hdfs_input_test/struct.json"); - - URL = ComputerOptions.HUGEGRAPH_URL.defaultValue(); - GRAPH = ComputerOptions.HUGEGRAPH_GRAPH_NAME.defaultValue(); - USERNAME = ComputerOptions.HUGEGRAPH_USERNAME.defaultValue(); - PASSWORD = ComputerOptions.HUGEGRAPH_PASSWORD.defaultValue(); - - Class.forName(IdType.class.getName()); - // Don't forget to register options - OptionSpace.register("computer", - "org.apache.hugegraph.computer.core.config.ComputerOptions"); - OptionSpace.register("computer-rpc", "org.apache.hugegraph.config.RpcOptions"); - - UnitTestBase.updateOptions( - ComputerOptions.ALGORITHM_RESULT_CLASS, LongValue.class.getName() - ); - } - - @AfterClass - public static void cleanup() { - if (CLIENT != null) { - CLIENT.close(); - CLIENT = null; - } - } - - public static void assertIdEqualAfterWriteAndRead(Id oldId) - throws IOException { - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - oldId.write(bao); - bytes = bao.toByteArray(); - } - - Id newId = IdFactory.createId(oldId.idType()); - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - newId.read(bai); - Assert.assertEquals(oldId, newId); - } - } - - public static void assertValueEqualAfterWriteAndRead(Value oldValue) - throws IOException { - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - oldValue.write(bao); - bytes = bao.toByteArray(); - } - - Value newValue = graphFactory().createValue(oldValue.valueType()); - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - newValue.read(bai); - Assert.assertEquals(oldValue, newValue); - } - } - - public static void assertEquals(double v1, double v2) { - Assert.assertEquals(v1, v2, 1E-6); - } - - public static void updateOptions(Object... optionKeyValues) { - if (optionKeyValues == null || optionKeyValues.length == 0) { - throw new ComputerException("Options can't be null or empty"); - } - if ((optionKeyValues.length & 0x01) == 1) { - throw new ComputerException("Options length must be even"); - } - Map map = new HashMap<>(); - for (int i = 0; i < optionKeyValues.length; i += 2) { - Object key = optionKeyValues[i]; - E.checkArgument(key instanceof TypedOption, - "The option key must be TypedOption class"); - Object value = optionKeyValues[i + 1]; - E.checkArgument(value instanceof String, - "The option value must be String class"); - map.put(((TypedOption) key).name(), (String) value); - } - if (!map.keySet().contains( - ComputerOptions.ALGORITHM_PARAMS_CLASS.name())) { - map.put(ComputerOptions.ALGORITHM_PARAMS_CLASS.name(), - MockComputationParams.class.getName()); - } - ComputerContextUtil.initContext(map); - } - - public static synchronized Config updateWithRequiredOptions( - Object... options) { - Object[] requiredOptions = new Object[] { - }; - Object[] allOptions = new Object[requiredOptions.length + - options.length]; - System.arraycopy(requiredOptions, 0, allOptions, 0, - requiredOptions.length); - System.arraycopy(options, 0, allOptions, - requiredOptions.length, options.length); - UnitTestBase.updateOptions(allOptions); - return ComputerContext.instance().config(); - } - - public static void assertEqualAfterWriteAndRead(Writable writeObj, - Readable readObj) - throws IOException { - byte[] bytes; - try (BytesOutput bao = IOFactory.createBytesOutput( - Constants.SMALL_BUF_SIZE)) { - writeObj.write(bao); - bytes = bao.toByteArray(); - } - - try (BytesInput bai = IOFactory.createBytesInput(bytes)) { - readObj.read(bai); - Assert.assertEquals(writeObj, readObj); - } - } - - public static void sleep(long ms) { - try { - Thread.sleep(ms); - } catch (InterruptedException ignored) { - // Ignore InterruptedException - } - } - - public static byte[] randomBytes(int size) { - Random random = new Random(); - byte[] bytes = new byte[size]; - for (int i = 0; i < size; i++) { - bytes[i] = (byte) random.nextInt(); - } - return bytes; - } - - public static String randomString(int size) { - Random random = new Random(); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < size; i++) { - sb.append(CHARS.charAt(random.nextInt(CHARS.length()))); - } - return sb.toString(); - } - - protected static ComputerContext context() { - return ComputerContext.instance(); - } - - protected static GraphFactory graphFactory() { - return context().graphFactory(); - } - - protected static StreamGraphInput newStreamGraphInput( - RandomAccessInput input) { - EntryInput entryInput = new EntryInputImpl(input); - return new StreamGraphInput(context(), entryInput); - } - - protected static StreamGraphOutput newStreamGraphOutput( - RandomAccessOutput output) { - return (StreamGraphOutput) IOFactory.createGraphOutput(context(), - OutputFormat.BIN, - output); - } - - protected static synchronized HugeClient client() { - if (CLIENT == null) { - CLIENT = HugeClient.builder(URL, GRAPH).configUser(USERNAME, PASSWORD).build(); - } - return CLIENT; - } - - public static boolean existError(Throwable[] exceptions) { - boolean error = false; - for (Throwable e : exceptions) { - if (e != null) { - error = true; - LOG.warn("There exist error:", e); - break; - } - } - return error; - } -} diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestSuite.java b/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestSuite.java deleted file mode 100644 index 62dec2cff..000000000 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/unit/UnitTestSuite.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -package org.apache.hugegraph.computer.suite.unit; - -import org.apache.hugegraph.computer.algorithm.AlgorithmTestSuite; -import org.apache.hugegraph.computer.core.allocator.AllocatorTestSuite; -import org.apache.hugegraph.computer.core.bsp.BspTestSuite; -import org.apache.hugegraph.computer.core.combiner.CombinerTestSuite; -import org.apache.hugegraph.computer.core.common.CommonTestSuite; -import org.apache.hugegraph.computer.core.compute.ComputeTestSuite; -import org.apache.hugegraph.computer.core.config.ConfigTestSuite; -import org.apache.hugegraph.computer.core.graph.GraphTestSuite; -import org.apache.hugegraph.computer.core.input.InputTestSuite; -import org.apache.hugegraph.computer.core.io.IOTestSuite; -import org.apache.hugegraph.computer.core.network.NetworkTestSuite; -import org.apache.hugegraph.computer.core.receiver.ReceiverTestSuite; -import org.apache.hugegraph.computer.core.sender.SenderTestSuite; -import org.apache.hugegraph.computer.core.sort.sorter.SorterTestSuite; -import org.apache.hugegraph.computer.core.sort.sorting.SortingTestSuite; -import org.apache.hugegraph.computer.core.store.StoreTestSuite; -import org.apache.hugegraph.computer.core.util.UtilTestSuite; -import org.apache.hugegraph.computer.core.worker.WorkerTestSuite; -import org.apache.hugegraph.computer.dist.ComputerDistTestSuite; -import org.apache.hugegraph.computer.driver.DriverTestSuite; -import org.apache.hugegraph.computer.k8s.K8sTestSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - AllocatorTestSuite.class, - CommonTestSuite.class, - ConfigTestSuite.class, - UtilTestSuite.class, - BspTestSuite.class, - CombinerTestSuite.class, - GraphTestSuite.class, - IOTestSuite.class, - InputTestSuite.class, - WorkerTestSuite.class, - NetworkTestSuite.class, - StoreTestSuite.class, - SorterTestSuite.class, - SortingTestSuite.class, - SenderTestSuite.class, - ReceiverTestSuite.class, - ComputeTestSuite.class, - ComputerDistTestSuite.class, - DriverTestSuite.class, - K8sTestSuite.class, - AlgorithmTestSuite.class, -}) -public class UnitTestSuite { -} diff --git a/computer-test/src/main/resources/computer.properties b/computer-test/src/main/resources/computer.properties deleted file mode 100644 index 57e9e78ec..000000000 --- a/computer-test/src/main/resources/computer.properties +++ /dev/null @@ -1,31 +0,0 @@ -# -# 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. -# -rpc.server_host=localhost -rpc.server_port=8190 - -job.id=local_002 -job.workers_count=1 - -bsp.register_timeout=100000 -bsp.log_interval=30000 -bsp.max_super_step=2 - -master.computation_class=org.apache.hugegraph.computer.core.worker.MockMasterComputation - -algorithm.result_class=org.apache.hugegraph.computer.core.graph.value.DoubleValue -algorithm.message_class=org.apache.hugegraph.computer.core.graph.value.DoubleValue -algorithm.params_class=org.apache.hugegraph.computer.core.worker.MockComputationParams diff --git a/computer-test/src/main/resources/hdfs_input_test/core-site.xml b/computer-test/src/main/resources/hdfs_input_test/core-site.xml deleted file mode 100644 index e2578ed06..000000000 --- a/computer-test/src/main/resources/hdfs_input_test/core-site.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - fs.defaultFS - - hdfs://127.0.0.1:9000 - - diff --git a/computer-test/src/main/resources/hdfs_input_test/struct.json b/computer-test/src/main/resources/hdfs_input_test/struct.json deleted file mode 100644 index 15c20a814..000000000 --- a/computer-test/src/main/resources/hdfs_input_test/struct.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "version": "2.0", - "structs": [ - { - "id": "1", - "skip": false, - "input": { - "type": "HDFS", - "path": "hdfs://127.0.0.1:9000/dataset/ml-latest-small/user_id.csv", - "core_site_path": "src/main/resources/hdfs_input_test/core-site.xml", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "userId" - ], - "charset": "UTF-8", - "list_format": null - }, - "vertices": [ - { - "label": "user", - "skip": false, - "id": "userId", - "unfold": false, - "field_mapping": { - "userId": "id" - }, - "value_mapping": {}, - "selected": [ - "userId" - ], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ], - "edges": [] - }, - { - "id": "2", - "skip": false, - "input": { - "type": "FILE", - "path": "../computer-dist/src/assembly/dataset/ml-latest-small/movies.csv", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "movieId", - "title", - "genres" - ], - "charset": "UTF-8", - "list_format": { - "start_symbol": "", - "elem_delimiter": "|", - "end_symbol": "" - } - }, - "vertices": [ - { - "label": "movie", - "skip": false, - "id": null, - "unfold": false, - "field_mapping": { - "movieId": "id" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ], - "edges": [] - }, - { - "id": "3", - "skip": false, - "input": { - "type": "HDFS", - "path": "hdfs://127.0.0.1:9000/dataset/ml-latest-small/ratings.csv", - "core_site_path": "src/main/resources/hdfs_input_test/core-site.xml", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "userId", - "movieId", - "rating", - "timestamp" - ], - "charset": "UTF-8", - "list_format": null - }, - "vertices": [], - "edges": [ - { - "label": "rating", - "skip": false, - "source": [ - "userId" - ], - "unfold_source": false, - "target": [ - "movieId" - ], - "unfold_target": false, - "field_mapping": { - "userId": "id", - "movieId": "id", - "rating": "rate", - "timestamp": "timestamp" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ] - }, - { - "id": "4", - "skip": false, - "input": { - "type": "HDFS", - "path": "hdfs://127.0.0.1:9000/dataset/ml-latest-small/tags.csv", - "core_site_path": "src/main/resources/hdfs_input_test/core-site.xml", - "file_filter": { - "extensions": [ - "*" - ] - }, - "format": "CSV", - "delimiter": ",", - "date_format": "yyyy-MM-dd HH:mm:ss", - "time_zone": "GMT+8", - "skipped_line": { - "regex": "(^#|^//).*|" - }, - "compression": "NONE", - "batch_size": 500, - "header": [ - "userId", - "movieId", - "tag", - "timestamp" - ], - "charset": "UTF-8", - "list_format": null - }, - "vertices": [], - "edges": [ - { - "label": "taged", - "skip": false, - "source": [ - "userId" - ], - "unfold_source": false, - "target": [ - "movieId" - ], - "unfold_target": false, - "field_mapping": { - "userId": "id", - "movieId": "id", - "tag": "tag", - "timestamp": "timestamp" - }, - "value_mapping": {}, - "selected": [], - "ignored": [], - "null_values": [ - "" - ], - "update_strategies": {} - } - ] - } - ] -} diff --git a/computer-test/src/main/resources/log4j2.xml b/computer-test/src/main/resources/log4j2.xml deleted file mode 100644 index 71a6c27f6..000000000 --- a/computer-test/src/main/resources/log4j2.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - logs - hugegraph-computer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/computer-yarn/pom.xml b/computer-yarn/pom.xml deleted file mode 100644 index 90d9ce9e1..000000000 --- a/computer-yarn/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - hugegraph-computer - org.apache.hugegraph - ${revision} - - 4.0.0 - - computer-yarn - - - - - diff --git a/computer/README.md b/computer/README.md new file mode 100644 index 000000000..f168e3be9 --- /dev/null +++ b/computer/README.md @@ -0,0 +1,44 @@ +# Apache HugeGraph-Computer + +[![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) +[![Build Status](https://github.com/apache/hugegraph-computer/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/hugegraph-computer/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/apache/incubator-hugegraph-computer/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/incubator-hugegraph-computer) + +The hugegraph-computer is a distributed graph processing system for hugegraph. + +## Learn More + +The [project homepage](https://hugegraph.apache.org/docs/) contains more information about hugegraph-computer. + +And here are links of other repositories: +1. [hugegraph-server](https://github.com/apache/hugegraph) (graph's core component - OLTP server) +2. [hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain) (include loader/dashboard/tool/client) +3. [hugegraph-commons](https://github.com/apache/hugegraph-commons) (include common & rpc module) +4. [hugegraph-website](https://github.com/apache/hugegraph-doc) (include doc & website code) + +## Note + +- If some classes under computer-k8s cannot be found, you need to execute `mvn clean install` in advance to generate corresponding classes. + +## Contributing + +- Welcome to contribute to HugeGraph, please see [How to Contribute](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/) for more information. +- Note: It's recommended to use [GitHub Desktop](https://desktop.github.com/) to greatly simplify the PR and commit process. +- Thank you to all the people who already contributed to HugeGraph! + +[![contributors graph](https://contrib.rocks/image?repo=apache/hugegraph-computer)](https://github.com/apache/incubator-hugegraph-computer/graphs/contributors) + +## License + +hugegraph-computer is licensed under [Apache 2.0](https://github.com/apache/incubator-hugegraph-computer/blob/master/LICENSE) License. + +### Contact Us + +--- + + - [GitHub Issues](https://github.com/apache/incubator-hugegraph-computer/issues): Feedback on usage issues and functional requirements (quick response) + - Feedback Email: [dev@hugegraph.apache.org](mailto:dev@hugegraph.apache.org) ([subscriber](https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/) only) + - WeChat public account: Apache HugeGraph, welcome to scan this QR code to follow us. + + QR png + diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficient.java b/computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficient.java similarity index 100% rename from computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficient.java rename to computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/cc/ClusteringCoefficient.java diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java b/computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java similarity index 100% rename from computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java rename to computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/trianglecount/TriangleCountValue.java diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java b/computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java similarity index 100% rename from computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java rename to computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/community/wcc/Wcc.java diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java b/computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java similarity index 100% rename from computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java rename to computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/rings/RingsDetectionParams.java diff --git a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathParams.java b/computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathParams.java similarity index 100% rename from computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathParams.java rename to computer/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/path/shortest/SingleSourceShortestPathParams.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/combiner/PropertiesCombiner.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/ComputerContext.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/ComputerContext.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/common/ComputerContext.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/common/ComputerContext.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdType.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdType.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdType.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/id/IdType.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValue.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValue.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValue.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValue.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListList.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListList.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListList.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/graph/value/IdListList.java diff --git a/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/Computation.java b/computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/Computation.java similarity index 100% rename from computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/Computation.java rename to computer/computer-api/src/main/java/org/apache/hugegraph/computer/core/worker/Computation.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/WorkerAggrManager.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/WorkerAggrManager.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/WorkerAggrManager.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/aggregator/WorkerAggrManager.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombiner.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombiner.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombiner.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/PointerCombiner.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/VertexValueCombiner.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/VertexValueCombiner.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/VertexValueCombiner.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/combiner/VertexValueCombiner.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/ReadException.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/ReadException.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/ReadException.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/common/exception/ReadException.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInput.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInput.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInput.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInput.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplit.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplit.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplit.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/InputSplit.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileVertxFetcher.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileVertxFetcher.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileVertxFetcher.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/input/loader/FileVertxFetcher.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientFactory.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientFactory.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientFactory.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientFactory.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/FileRegionBuffer.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/FileRegionBuffer.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/FileRegionBuffer.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/buffer/FileRegionBuffer.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSession.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSession.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSession.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/session/TransportSession.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueue.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueue.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueue.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/sender/MultiQueue.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvOuterSortFlusher.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvOuterSortFlusher.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvOuterSortFlusher.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/sort/flusher/CombineSubKvOuterSortFlusher.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileManager.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileManager.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileManager.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/FileManager.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/StoreManager.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/StoreManager.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/StoreManager.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/StoreManager.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java similarity index 96% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java index 48197c164..8663da8ed 100644 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java +++ b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/EntryInput.java @@ -19,8 +19,6 @@ import java.io.IOException; -import org.apache.hugegraph.computer.core.io.Readable; - public interface EntryInput { /** diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java similarity index 94% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java index d03b22521..ccb2ec620 100644 --- a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java +++ b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryReader.java @@ -19,8 +19,6 @@ import java.io.IOException; -import org.apache.hugegraph.computer.core.io.Readable; - public interface KvEntryReader { void readSubKv(Readable subKey, Readable subValue) throws IOException; diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriterImpl.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriterImpl.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriterImpl.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriterImpl.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFileImpl.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFileImpl.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFileImpl.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/file/hgkvfile/HgkvFileImpl.java diff --git a/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ShutdownHook.java b/computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ShutdownHook.java similarity index 100% rename from computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ShutdownHook.java rename to computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/util/ShutdownHook.java diff --git a/computer-dist/release-docs/licenses/LICENSE-annotations.txt b/computer/computer-dist/release-docs/licenses/LICENSE-annotations.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-annotations.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-annotations.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-asm.txt b/computer/computer-dist/release-docs/licenses/LICENSE-asm.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-asm.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-asm.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-commons-net.txt b/computer/computer-dist/release-docs/licenses/LICENSE-commons-net.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-commons-net.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-commons-net.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-curator-framework.txt b/computer/computer-dist/release-docs/licenses/LICENSE-curator-framework.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-curator-framework.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-curator-framework.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-grpc-core.txt b/computer/computer-dist/release-docs/licenses/LICENSE-grpc-core.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-grpc-core.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-grpc-core.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-hadoop-auth.txt b/computer/computer-dist/release-docs/licenses/LICENSE-hadoop-auth.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-hadoop-auth.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-hadoop-auth.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-mapreduce.txt b/computer/computer-dist/release-docs/licenses/LICENSE-hbase-mapreduce.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-hbase-mapreduce.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-hbase-mapreduce.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-procedure.txt b/computer/computer-dist/release-docs/licenses/LICENSE-hbase-procedure.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-hbase-procedure.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-hbase-procedure.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-hbase-protocol.txt b/computer/computer-dist/release-docs/licenses/LICENSE-hbase-protocol.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-hbase-protocol.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-hbase-protocol.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-annotations.txt b/computer/computer-dist/release-docs/licenses/LICENSE-jackson-annotations.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-jackson-annotations.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-jackson-annotations.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-jackson-databind.txt b/computer/computer-dist/release-docs/licenses/LICENSE-jackson-databind.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-jackson-databind.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-jackson-databind.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-jersey-container-servlet-core.txt b/computer/computer-dist/release-docs/licenses/LICENSE-jersey-container-servlet-core.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-jersey-container-servlet-core.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-jersey-container-servlet-core.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-kerby-config.txt b/computer/computer-dist/release-docs/licenses/LICENSE-kerby-config.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-kerby-config.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-kerby-config.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt b/computer/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apiextensions.txt b/computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apiextensions.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apiextensions.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-apiextensions.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-autoscaling.txt b/computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-autoscaling.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-kubernetes-model-autoscaling.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-autoscaling.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-metrics.txt b/computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-metrics.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-kubernetes-model-metrics.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-kubernetes-model-metrics.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-metrics-core.txt b/computer/computer-dist/release-docs/licenses/LICENSE-metrics-core.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-metrics-core.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-metrics-core.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-opentracing-api.txt b/computer/computer-dist/release-docs/licenses/LICENSE-opentracing-api.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-opentracing-api.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-opentracing-api.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-sfm-csv.txt b/computer/computer-dist/release-docs/licenses/LICENSE-sfm-csv.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-sfm-csv.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-sfm-csv.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-slf4j-log4j12.txt b/computer/computer-dist/release-docs/licenses/LICENSE-slf4j-log4j12.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-slf4j-log4j12.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-slf4j-log4j12.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-sofa-rpc-all.txt b/computer/computer-dist/release-docs/licenses/LICENSE-sofa-rpc-all.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-sofa-rpc-all.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-sofa-rpc-all.txt diff --git a/computer-dist/release-docs/licenses/LICENSE-swagger-models.txt b/computer/computer-dist/release-docs/licenses/LICENSE-swagger-models.txt similarity index 100% rename from computer-dist/release-docs/licenses/LICENSE-swagger-models.txt rename to computer/computer-dist/release-docs/licenses/LICENSE-swagger-models.txt diff --git a/computer-dist/src/assembly/dataset/load-movie-data.groovy b/computer/computer-dist/src/assembly/dataset/load-movie-data.groovy similarity index 100% rename from computer-dist/src/assembly/dataset/load-movie-data.groovy rename to computer/computer-dist/src/assembly/dataset/load-movie-data.groovy diff --git a/computer-dist/src/assembly/travis/install-k8s.sh b/computer/computer-dist/src/assembly/travis/install-k8s.sh similarity index 100% rename from computer-dist/src/assembly/travis/install-k8s.sh rename to computer/computer-dist/src/assembly/travis/install-k8s.sh diff --git a/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriver.java b/computer/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriver.java similarity index 100% rename from computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriver.java rename to computer/computer-driver/src/main/java/org/apache/hugegraph/computer/driver/ComputerDriver.java diff --git a/computer-k8s-operator/crd-generate/config/default/manager_auth_proxy_patch.yaml b/computer/computer-k8s-operator/crd-generate/config/default/manager_auth_proxy_patch.yaml similarity index 100% rename from computer-k8s-operator/crd-generate/config/default/manager_auth_proxy_patch.yaml rename to computer/computer-k8s-operator/crd-generate/config/default/manager_auth_proxy_patch.yaml diff --git a/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_editor_role.yaml b/computer/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_editor_role.yaml similarity index 100% rename from computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_editor_role.yaml rename to computer/computer-k8s-operator/crd-generate/config/rbac/hugegraphcomputerjob_editor_role.yaml diff --git a/computer-k8s-operator/crd-generate/config/webhook/manifests.yaml b/computer/computer-k8s-operator/crd-generate/config/webhook/manifests.yaml similarity index 100% rename from computer-k8s-operator/crd-generate/config/webhook/manifests.yaml rename to computer/computer-k8s-operator/crd-generate/config/webhook/manifests.yaml diff --git a/computer-k8s-operator/crd-generate/go.sum b/computer/computer-k8s-operator/crd-generate/go.sum similarity index 100% rename from computer-k8s-operator/crd-generate/go.sum rename to computer/computer-k8s-operator/crd-generate/go.sum diff --git a/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml b/computer/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml similarity index 100% rename from computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml rename to computer/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml diff --git a/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorResult.java b/computer/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorResult.java similarity index 100% rename from computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorResult.java rename to computer/computer-k8s-operator/src/main/java/org/apache/hugegraph/computer/k8s/operator/common/OperatorResult.java diff --git a/computer-k8s/pom.xml b/computer/computer-k8s/pom.xml similarity index 100% rename from computer-k8s/pom.xml rename to computer/computer-k8s/pom.xml diff --git a/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeSpecOptions.java b/computer/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeSpecOptions.java similarity index 100% rename from computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeSpecOptions.java rename to computer/computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/config/KubeSpecOptions.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java index 50e12981a..f4331a9d7 100644 --- a/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java +++ b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/algorithm/community/lpa/LpaTest.java @@ -17,6 +17,8 @@ package org.apache.hugegraph.computer.algorithm.community.lpa; +import java.util.HashSet; + import org.apache.hugegraph.computer.algorithm.AlgorithmTestBase; import org.apache.hugegraph.computer.core.config.ComputerOptions; import org.apache.hugegraph.computer.core.output.hg.HugeGraphStringOutput; @@ -29,8 +31,6 @@ import org.junit.BeforeClass; import org.junit.Test; -import java.util.HashSet; - public class LpaTest extends AlgorithmTestBase { private static final String VERTX_LABEL = "tc_user"; diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValueTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValueTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValueTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/BooleanValueTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValueTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValueTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValueTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/FloatValueTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueTypeTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueTypeTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueTypeTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/graph/value/ValueTypeTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutputTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutputTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutputTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/io/StructRandomAccessOutputTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManagerTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManagerTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManagerTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/DataServerManagerTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandlerTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandlerTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandlerTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/HeartbeatHandlerTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEncodeDecodeHandlerTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEncodeDecodeHandlerTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEncodeDecodeHandlerTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/network/netty/NettyEncodeDecodeHandlerTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitionTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitionTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitionTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/receiver/message/ComputeMessageRecvPartitionTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/FlusherTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/FlusherTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/FlusherTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorter/FlusherTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvFileTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvFileTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvFileTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/HgkvFileTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/PointerTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/PointerTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/core/store/PointerTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/store/PointerTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/OperatorTest.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/OperatorTest.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/k8s/OperatorTest.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/k8s/OperatorTest.java diff --git a/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/MockComputation.java b/computer/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/MockComputation.java similarity index 100% rename from computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/MockComputation.java rename to computer/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/MockComputation.java diff --git a/computer-test/src/main/resources/hdfs_input_test/schema.json b/computer/computer-test/src/main/resources/hdfs_input_test/schema.json similarity index 100% rename from computer-test/src/main/resources/hdfs_input_test/schema.json rename to computer/computer-test/src/main/resources/hdfs_input_test/schema.json diff --git a/pom.xml b/computer/pom.xml similarity index 100% rename from pom.xml rename to computer/pom.xml