From d12f5734e64a56fd45c9fe09c1f277acf83af2e2 Mon Sep 17 00:00:00 2001 From: DanGuge <77946882+DanGuge@users.noreply.github.com> Date: Sat, 19 Aug 2023 13:41:08 +0800 Subject: [PATCH 01/51] feat(api&core): in oltp apis, add statistics info and support full info about vertices and edges (#2262) * chore: improve gitignore file * feat: add ApiMeasure to collect runtime data ApiMeasure will count the number of vertices and edges traversed at runtime, and the time the api takes to execute * feat: Add ApiMeasure to JsonSerializer and Modify the Serializer interface * JsonSerializer: return measure information in api response * Serializer: fit the feature that returns complete information about vertices and edges * refactor: format code based on hugegraph-style.xml * feat: Add statistics information in all oltp restful apis response and Support full information about vertices and edges Statistics information: * add vertexIterCounter and edgeIterCounter in HugeTraverser.java to track traversed vertices and edges at run time * modify all oltp restful apis to add statistics information in response Full information about vertices and edges: * add 'with_vertex' and 'with_edge' parameter option in apis * modify oltp apis to support vertex and edge information in api response * add EdgeRecord in HugeTraverser.java to record edges at run time and generate the edge information returned in api response * modify Path and PathSet in HugeTraverser.java to support full edge information storage * modify all traversers to support track of edge information at run time * fix: numeric cast * fix: Jaccard Similarity api test * fix: adjust the code style and naming convention * Empty commit * Empty commit * fix: 1. change System.currentTimeMillis() to System.nanoTime(); 2. modify addCount() * fix: rollback change in .gitignore * fix: rollback ServerOptions.java code style * fix: rollback API.java code style and add exception in else branch * fix: fix code style * fix: name style & code style * rename edgeRecord to edgeResults * fix Request class code style in SameNeighborsAPI.java --- .../java/org/apache/hugegraph/api/API.java | 89 ++- .../api/traversers/AllShortestPathsAPI.java | 73 ++- .../api/traversers/CrosspointsAPI.java | 30 +- .../traversers/CustomizedCrosspointsAPI.java | 125 ++-- .../api/traversers/CustomizedPathsAPI.java | 103 ++-- .../hugegraph/api/traversers/EdgesAPI.java | 28 +- .../api/traversers/FusiformSimilarityAPI.java | 66 ++- .../api/traversers/JaccardSimilarityAPI.java | 55 +- .../api/traversers/KneighborAPI.java | 78 ++- .../hugegraph/api/traversers/KoutAPI.java | 89 ++- .../traversers/MultiNodeShortestPathAPI.java | 82 +-- .../hugegraph/api/traversers/PathsAPI.java | 102 ++-- .../hugegraph/api/traversers/RaysAPI.java | 67 ++- .../hugegraph/api/traversers/RingsAPI.java | 74 ++- .../api/traversers/SameNeighborsAPI.java | 108 +++- .../api/traversers/ShortestPathAPI.java | 67 ++- .../SingleSourceShortestPathAPI.java | 79 ++- .../api/traversers/TemplatePathsAPI.java | 104 ++-- .../hugegraph/api/traversers/VerticesAPI.java | 28 +- .../traversers/WeightedShortestPathAPI.java | 84 ++- .../hugegraph/config/ServerOptions.java | 2 +- .../apache/hugegraph/core/GraphManager.java | 4 + .../hugegraph/serializer/JsonSerializer.java | 153 +++-- .../hugegraph/serializer/Serializer.java | 24 +- .../comm/TriangleCountAlgorithm.java | 38 +- .../algorithm/CollectionPathsTraverser.java | 58 +- .../algorithm/CustomizePathsTraverser.java | 82 +-- .../CustomizedCrosspointsTraverser.java | 133 +++-- .../FusiformSimilarityTraverser.java | 67 ++- .../traversal/algorithm/HugeTraverser.java | 541 +++++++++++------- .../algorithm/JaccardSimilarTraverser.java | 49 +- .../algorithm/KneighborTraverser.java | 16 +- .../traversal/algorithm/KoutTraverser.java | 24 +- .../MultiNodeShortestPathTraverser.java | 117 ++-- .../traversal/algorithm/PathTraverser.java | 25 +- .../traversal/algorithm/PathsTraverser.java | 23 +- .../algorithm/SameNeighborTraverser.java | 57 +- .../algorithm/ShortestPathTraverser.java | 73 ++- .../SingleSourceShortestPathTraverser.java | 206 ++++--- .../algorithm/SubGraphTraverser.java | 175 +++--- .../algorithm/TemplatePathsTraverser.java | 58 +- .../records/ShortestPathRecords.java | 4 +- .../records/SingleWayMultiPathsRecords.java | 18 +- .../traversers/JaccardSimilarityApiTest.java | 12 +- 44 files changed, 2268 insertions(+), 1222 deletions(-) diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java index afaba499b3..99fe67e5ba 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java @@ -22,41 +22,39 @@ import java.util.concurrent.Callable; import java.util.function.Consumer; -import jakarta.ws.rs.ForbiddenException; -import jakarta.ws.rs.NotFoundException; -import jakarta.ws.rs.NotSupportedException; -import jakarta.ws.rs.core.MediaType; - +import org.apache.commons.lang.mutable.MutableLong; +import org.apache.hugegraph.HugeException; +import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.define.Checkable; import org.apache.hugegraph.metrics.MetricsUtil; -import org.slf4j.Logger; - -import org.apache.hugegraph.HugeException; -import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.JsonUtil; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + import com.codahale.metrics.Meter; import com.google.common.collect.ImmutableMap; -public class API { +import jakarta.ws.rs.ForbiddenException; +import jakarta.ws.rs.NotFoundException; +import jakarta.ws.rs.NotSupportedException; +import jakarta.ws.rs.core.MediaType; - protected static final Logger LOG = Log.logger(API.class); +public class API { public static final String CHARSET = "UTF-8"; - public static final String TEXT_PLAIN = MediaType.TEXT_PLAIN; public static final String APPLICATION_JSON = MediaType.APPLICATION_JSON; public static final String APPLICATION_JSON_WITH_CHARSET = APPLICATION_JSON + ";charset=" + CHARSET; public static final String JSON = MediaType.APPLICATION_JSON_TYPE .getSubtype(); - public static final String ACTION_APPEND = "append"; public static final String ACTION_ELIMINATE = "eliminate"; public static final String ACTION_CLEAR = "clear"; - + protected static final Logger LOG = Log.logger(API.class); private static final Meter SUCCEED_METER = MetricsUtil.registerMeter(API.class, "commit-succeed"); private static final Meter ILLEGAL_ARG_ERROR_METER = @@ -69,8 +67,7 @@ public class API { public static HugeGraph graph(GraphManager manager, String graph) { HugeGraph g = manager.graph(graph); if (g == null) { - throw new NotFoundException(String.format( - "Graph '%s' does not exist", graph)); + throw new NotFoundException(String.format("Graph '%s' does not exist", graph)); } return g; } @@ -140,8 +137,7 @@ protected static void checkUpdatingBody(Checkable body) { body.checkUpdate(); } - protected static void checkCreatingBody( - Collection bodies) { + protected static void checkCreatingBody(Collection bodies) { E.checkArgumentNotNull(bodies, "The request body can't be empty"); for (Checkable body : bodies) { E.checkArgument(body != null, @@ -150,8 +146,7 @@ protected static void checkCreatingBody( } } - protected static void checkUpdatingBody( - Collection bodies) { + protected static void checkUpdatingBody(Collection bodies) { E.checkArgumentNotNull(bodies, "The request body can't be empty"); for (Checkable body : bodies) { E.checkArgumentNotNull(body, @@ -186,8 +181,58 @@ public static boolean checkAndParseAction(String action) { } else if (action.equals(ACTION_ELIMINATE)) { return false; } else { - throw new NotSupportedException( - String.format("Not support action '%s'", action)); + throw new NotSupportedException(String.format("Not support action '%s'", action)); + } + } + + public static class ApiMeasurer { + + public static final String EDGE_ITER = "edge_iterations"; + public static final String VERTICE_ITER = "vertice_iterations"; + public static final String COST = "cost(ns)"; + private final long timeStart; + private final Map measures; + + public ApiMeasurer() { + this.timeStart = System.nanoTime(); + this.measures = InsertionOrderUtil.newMap(); + } + + public Map measures() { + measures.put(COST, System.nanoTime() - timeStart); + return measures; + } + + public void put(String key, String value) { + this.measures.put(key, value); + } + + public void put(String key, long value) { + this.measures.put(key, value); + } + + public void put(String key, int value) { + this.measures.put(key, value); + } + + protected void addCount(String key, long value) { + Object current = measures.get(key); + if (current == null) { + measures.put(key, new MutableLong(value)); + } else if (current instanceof MutableLong) { + ((MutableLong) measures.computeIfAbsent(key, MutableLong::new)).add(value); + } else if (current instanceof Long) { + Long currentLong = (Long) current; + measures.put(key, new MutableLong(currentLong + value)); + } else { + throw new NotSupportedException("addCount() method's 'value' datatype must be " + + "Long or MutableLong"); + } + } + + public void addIterCount(long verticeIters, long edgeIters) { + this.addCount(EDGE_ITER, edgeIters); + this.addCount(VERTICE_ITER, verticeIters); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java index 030c4e8cc1..e432f81ea7 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java @@ -20,19 +20,10 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; +import java.util.HashSet; +import java.util.Iterator; import java.util.List; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.slf4j.Logger; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; @@ -44,9 +35,22 @@ import org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.google.common.collect.ImmutableList; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/allshortestpaths") @Singleton @Tag(name = "AllShortestPathsAPI") @@ -68,13 +72,20 @@ public String get(@Context GraphManager manager, @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("skip_degree") @DefaultValue("0") long skipDegree, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge, @QueryParam("capacity") @DefaultValue(DEFAULT_CAPACITY) long capacity) { LOG.debug("Graph [{}] get shortest path from '{}', to '{}' with " + "direction {}, edge label {}, max depth '{}', " + - "max degree '{}', skipped degree '{}' and capacity '{}'", + "max degree '{}', skipped degree '{}', capacity '{}', " + + "with_vertex '{}' and with_edge '{}'", graph, source, target, direction, edgeLabel, depth, - maxDegree, skipDegree, capacity); + maxDegree, skipDegree, capacity, withVertex, withEdge); + + ApiMeasurer measure = new ApiMeasurer(); Id sourceId = VertexAPI.checkAndParseVertexId(source); Id targetId = VertexAPI.checkAndParseVertexId(target); @@ -85,9 +96,35 @@ public String get(@Context GraphManager manager, ShortestPathTraverser traverser = new ShortestPathTraverser(g); List edgeLabels = edgeLabel == null ? ImmutableList.of() : ImmutableList.of(edgeLabel); - HugeTraverser.PathSet paths = traverser.allShortestPaths( - sourceId, targetId, dir, edgeLabels, - depth, maxDegree, skipDegree, capacity); - return manager.serializer(g).writePaths("paths", paths, false); + HugeTraverser.PathSet paths = traverser.allShortestPaths(sourceId, targetId, dir, + edgeLabels, depth, maxDegree, + skipDegree, capacity); + + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); + } + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge; + Set edges = paths.getEdges(); + if (withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); + } + + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, false, + iterVertex, iterEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java index 39de473b8f..eda042511c 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java @@ -21,18 +21,6 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; @@ -43,8 +31,20 @@ import org.apache.hugegraph.traversal.algorithm.PathsTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/crosspoints") @Singleton @Tag(name = "CrosspointsAPI") @@ -74,6 +74,7 @@ public String get(@Context GraphManager manager, graph, source, target, direction, edgeLabel, depth, maxDegree, capacity, limit); + ApiMeasurer measure = new ApiMeasurer(); Id sourceId = VertexAPI.checkAndParseVertexId(source); Id targetId = VertexAPI.checkAndParseVertexId(target); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -84,6 +85,9 @@ public String get(@Context GraphManager manager, dir, edgeLabel, depth, maxDegree, capacity, limit); - return manager.serializer(g).writePaths("crosspoints", paths, true); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + return manager.serializer(g, measure.measures()) + .writePaths("crosspoints", paths, true); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java index da35f7325f..cadbd2ce00 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java @@ -22,38 +22,39 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/customizedcrosspoints") @Singleton @Tag(name = "CustomizedCrosspointsAPI") @@ -61,6 +62,21 @@ public class CustomizedCrosspointsAPI extends API { private static final Logger LOG = Log.logger(CustomizedCrosspointsAPI.class); + private static List pathPatterns( + HugeGraph graph, CrosspointsRequest request) { + int stepSize = request.pathPatterns.size(); + List pathPatterns = new ArrayList<>(stepSize); + for (PathPattern pattern : request.pathPatterns) { + CustomizedCrosspointsTraverser.PathPattern pathPattern = + new CustomizedCrosspointsTraverser.PathPattern(); + for (Step step : pattern.steps) { + pathPattern.add(step.jsonToStep(graph)); + } + pathPatterns.add(pathPattern); + } + return pathPatterns; + } + @POST @Timed @Consumes(APPLICATION_JSON) @@ -78,55 +94,56 @@ public String post(@Context GraphManager manager, "The steps of crosspoints request can't be empty"); LOG.debug("Graph [{}] get customized crosspoints from source vertex " + - "'{}', with path_pattern '{}', with_path '{}', with_vertex " + - "'{}', capacity '{}' and limit '{}'", graph, request.sources, - request.pathPatterns, request.withPath, request.withVertex, - request.capacity, request.limit); + "'{}', with path_pattern '{}', with path '{}', with_vertex " + + "'{}', capacity '{}', limit '{}' and with_edge '{}'", + graph, request.sources, request.pathPatterns, request.withPath, + request.withVertex, request.capacity, request.limit, request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Iterator sources = request.sources.vertices(g); - List patterns; - patterns = pathPatterns(g, request); CustomizedCrosspointsTraverser traverser = - new CustomizedCrosspointsTraverser(g); - CustomizedCrosspointsTraverser.CrosspointsPaths paths; - paths = traverser.crosspointsPaths(sources, patterns, request.capacity, - request.limit); - Iterator iter = QueryResults.emptyIterator(); - if (!request.withVertex) { - return manager.serializer(g).writeCrosspoints(paths, iter, - request.withPath); - } - Set ids = new HashSet<>(); + new CustomizedCrosspointsTraverser(g); + + List patterns = pathPatterns(g, request); + CustomizedCrosspointsTraverser.CrosspointsPaths paths = + traverser.crosspointsPaths(sources, patterns, request.capacity, request.limit); + + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + + Iterator iterVertex; + Set vertexIds = new HashSet<>(); if (request.withPath) { - for (HugeTraverser.Path p : paths.paths()) { - ids.addAll(p.vertices()); + for (HugeTraverser.Path path : paths.paths()) { + vertexIds.addAll(path.vertices()); } } else { - ids = paths.crosspoints(); + vertexIds = paths.crosspoints(); } - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - return manager.serializer(g).writeCrosspoints(paths, iter, - request.withPath); - } - private static List - pathPatterns(HugeGraph graph, CrosspointsRequest request) { - int stepSize = request.pathPatterns.size(); - List pathPatterns; - pathPatterns = new ArrayList<>(stepSize); - for (PathPattern pattern : request.pathPatterns) { - CustomizedCrosspointsTraverser.PathPattern pathPattern; - pathPattern = new CustomizedCrosspointsTraverser.PathPattern(); - for (Step step : pattern.steps) { - pathPattern.add(step.jsonToStep(graph)); + Iterator iterEdge = Collections.emptyIterator(); + if (request.withPath) { + Set edges = traverser.edgeResults().getEdges(paths.paths()); + if (request.withEdge) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - pathPatterns.add(pathPattern); } - return pathPatterns; + + return manager.serializer(g, measure.measures()) + .writeCrosspoints(paths, iterVertex, + iterEdge, request.withPath); } private static class CrosspointsRequest { @@ -143,14 +160,16 @@ private static class CrosspointsRequest { public boolean withPath = false; @JsonProperty("with_vertex") public boolean withVertex = false; + @JsonProperty("with_edge") + public boolean withEdge = false; @Override public String toString() { return String.format("CrosspointsRequest{sourceVertex=%s," + "pathPatterns=%s,withPath=%s,withVertex=%s," + - "capacity=%s,limit=%s}", this.sources, - this.pathPatterns, this.withPath, - this.withVertex, this.capacity, this.limit); + "capacity=%s,limit=%s,withEdge=%s}", this.sources, + this.pathPatterns, this.withPath, this.withVertex, + this.capacity, this.limit, this.withEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java index 272009ea24..5641e31193 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java @@ -30,33 +30,33 @@ import java.util.Map; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/customizedpaths") @Singleton @Tag(name = "CustomizedPathsAPI") @@ -64,6 +64,16 @@ public class CustomizedPathsAPI extends API { private static final Logger LOG = Log.logger(CustomizedPathsAPI.class); + private static List step(HugeGraph graph, + PathRequest request) { + int stepSize = request.steps.size(); + List steps = new ArrayList<>(stepSize); + for (Step step : request.steps) { + steps.add(step.jsonToStep(graph)); + } + return steps; + } + @POST @Timed @Consumes(APPLICATION_JSON) @@ -81,10 +91,12 @@ public String post(@Context GraphManager manager, } LOG.debug("Graph [{}] get customized paths from source vertex '{}', " + - "with steps '{}', sort by '{}', capacity '{}', limit '{}' " + - "and with_vertex '{}'", graph, request.sources, request.steps, + "with steps '{}', sort by '{}', capacity '{}', limit '{}', " + + "with_vertex '{}' and with_edge '{}'", graph, request.sources, request.steps, request.sortBy, request.capacity, request.limit, - request.withVertex); + request.withVertex, request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Iterator sources = request.sources.vertices(g); @@ -95,6 +107,8 @@ public String post(@Context GraphManager manager, List paths; paths = traverser.customizedPaths(sources, steps, sorted, request.capacity, request.limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); if (sorted) { boolean incr = request.sortBy == SortBy.INCR; @@ -102,29 +116,35 @@ public String post(@Context GraphManager manager, request.limit); } - if (!request.withVertex) { - return manager.serializer(g).writePaths("paths", paths, false); + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); } - - Set ids = new HashSet<>(); - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - Iterator iter = QueryResults.emptyIterator(); - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + + Iterator iterEdge; + Set edges = traverser.edgeResults().getEdges(paths); + if (request.withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - return manager.serializer(g).writePaths("paths", paths, false, iter); + + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, false, + iterVertex, iterEdge); } - private static List step(HugeGraph graph, - PathRequest req) { - int stepSize = req.steps.size(); - List steps = new ArrayList<>(stepSize); - for (Step step : req.steps) { - steps.add(step.jsonToStep(graph)); - } - return steps; + private enum SortBy { + INCR, + DECR, + NONE } private static class PathRequest { @@ -142,13 +162,16 @@ private static class PathRequest { @JsonProperty("with_vertex") public boolean withVertex = false; + @JsonProperty("with_edge") + public boolean withEdge = false; + @Override public String toString() { return String.format("PathRequest{sourceVertex=%s,steps=%s," + "sortBy=%s,capacity=%s,limit=%s," + - "withVertex=%s}", this.sources, this.steps, + "withVertex=%s,withEdge=%s}", this.sources, this.steps, this.sortBy, this.capacity, this.limit, - this.withVertex); + this.withVertex, this.withEdge); } } @@ -190,10 +213,4 @@ private WeightedEdgeStep jsonToStep(HugeGraph g) { this.defaultWeight, this.sample); } } - - private enum SortBy { - INCR, - DECR, - NONE - } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java index ca4909a552..da9dfe1779 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java @@ -22,32 +22,32 @@ import java.util.Iterator; import java.util.List; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.filter.CompressInterceptor.Compress; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.query.ConditionQuery; import org.apache.hugegraph.backend.store.Shard; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/edges") @Singleton @Tag(name = "EdgesAPI") diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java index fbb330ae12..1b2273dc4a 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java @@ -23,32 +23,33 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; import java.util.Iterator; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser; import org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser.SimilarsMap; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/fusiformsimilarity") @Singleton @Tag(name = "FusiformSimilarityAPI") @@ -64,7 +65,7 @@ public String post(@Context GraphManager manager, @PathParam("graph") String graph, FusiformSimilarityRequest request) { E.checkArgumentNotNull(request, "The fusiform similarity " + - "request body can't be null"); + "request body can't be null"); E.checkArgumentNotNull(request.sources, "The sources of fusiform similarity " + "request can't be null"); @@ -94,28 +95,37 @@ public String post(@Context GraphManager manager, request.minNeighbors, request.alpha, request.minSimilars, request.groupProperty, request.minGroups); + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Iterator sources = request.sources.vertices(g); E.checkArgument(sources != null && sources.hasNext(), "The source vertices can't be empty"); - FusiformSimilarityTraverser traverser = - new FusiformSimilarityTraverser(g); + FusiformSimilarityTraverser traverser = new FusiformSimilarityTraverser(g); SimilarsMap result = traverser.fusiformSimilarity( - sources, request.direction, request.label, - request.minNeighbors, request.alpha, - request.minSimilars, request.top, - request.groupProperty, request.minGroups, - request.maxDegree, request.capacity, - request.limit, request.withIntermediary); + sources, request.direction, request.label, + request.minNeighbors, request.alpha, + request.minSimilars, request.top, + request.groupProperty, request.minGroups, + request.maxDegree, request.capacity, + request.limit, request.withIntermediary); CloseableIterator.closeIterator(sources); - Iterator iterator = QueryResults.emptyIterator(); - if (request.withVertex && !result.isEmpty()) { - iterator = g.vertices(result.vertices().toArray()); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = result.vertices(); + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0); + } else { + iterVertex = vertexIds.iterator(); } - return manager.serializer(g).writeSimilars(result, iterator); + + return manager.serializer(g, measure.measures()) + .writeSimilars(result, iterVertex); } private static class FusiformSimilarityRequest { diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java index ff187a5918..d5de80351f 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java @@ -18,41 +18,40 @@ package org.apache.hugegraph.api.traversers; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY; -import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT; +import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import java.util.Map; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.structure.HugeVertex; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser; +import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.JsonUtil; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/jaccardsimilarity") @Singleton @Tag(name = "JaccardSimilarityAPI") @@ -75,6 +74,8 @@ public String get(@Context GraphManager manager, "with direction {}, edge label {} and max degree '{}'", graph, vertex, other, direction, edgeLabel, maxDegree); + ApiMeasurer measure = new ApiMeasurer(); + Id sourceId = VertexAPI.checkAndParseVertexId(vertex); Id targetId = VertexAPI.checkAndParseVertexId(other); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -82,12 +83,15 @@ public String get(@Context GraphManager manager, HugeGraph g = graph(manager, graph); double similarity; try (JaccardSimilarTraverser traverser = - new JaccardSimilarTraverser(g)) { + new JaccardSimilarTraverser(g)) { similarity = traverser.jaccardSimilarity(sourceId, targetId, dir, edgeLabel, maxDegree); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); } - return JsonUtil.toJson(ImmutableMap.of("jaccard_similarity", - similarity)); + + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("jaccard_similarity", similarity)); } @POST @@ -110,6 +114,8 @@ public String post(@Context GraphManager manager, graph, request.vertex, request.step, request.top, request.capacity); + ApiMeasurer measure = new ApiMeasurer(); + HugeGraph g = graph(manager, graph); Id sourceId = HugeVertex.getIdValue(request.vertex); @@ -117,11 +123,14 @@ public String post(@Context GraphManager manager, Map results; try (JaccardSimilarTraverser traverser = - new JaccardSimilarTraverser(g)) { + new JaccardSimilarTraverser(g)) { results = traverser.jaccardSimilars(sourceId, step, request.top, request.capacity); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); } - return manager.serializer(g).writeMap(results); + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("jaccard_similarity", results)); } private static class Request { diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java index 4a7c0a9515..a0e7d0c4ee 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java @@ -21,6 +21,7 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; +import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -40,12 +41,13 @@ import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; -import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.slf4j.Logger; import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.inject.Singleton; @@ -75,6 +77,8 @@ public String get(@Context GraphManager manager, @QueryParam("direction") String direction, @QueryParam("label") String edgeLabel, @QueryParam("max_depth") int depth, + @QueryParam("count_only") + @DefaultValue("false") boolean countOnly, @QueryParam("max_degree") @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("limit") @@ -85,6 +89,8 @@ public String get(@Context GraphManager manager, graph, sourceV, direction, edgeLabel, depth, maxDegree, limit); + ApiMeasurer measure = new ApiMeasurer(); + Id source = VertexAPI.checkAndParseVertexId(sourceV); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -94,8 +100,14 @@ public String get(@Context GraphManager manager, try (KneighborTraverser traverser = new KneighborTraverser(g)) { ids = traverser.kneighbor(source, dir, edgeLabel, depth, maxDegree, limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + } + if (countOnly) { + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("vertices_size", ids.size())); } - return manager.serializer(g).writeList("vertices", ids); + return manager.serializer(g, measure.measures()).writeList("vertices", ids); } @POST @@ -111,15 +123,18 @@ public String post(@Context GraphManager manager, E.checkArgument(request.step != null, "The steps of request can't be null"); if (request.countOnly) { - E.checkArgument(!request.withVertex && !request.withPath, - "Can't return vertex or path when count only"); + E.checkArgument(!request.withVertex && !request.withPath && !request.withEdge, + "Can't return vertex, edge or path when count only"); } LOG.debug("Graph [{}] get customized kneighbor from source vertex " + "'{}', with step '{}', limit '{}', count_only '{}', " + - "with_vertex '{}' and with_path '{}'", + "with_vertex '{}', with_path '{}' and with_edge '{}'", graph, request.source, request.step, request.limit, - request.countOnly, request.withVertex, request.withPath); + request.countOnly, request.withVertex, request.withPath, + request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Id sourceId = HugeVertex.getIdValue(request.source); @@ -131,6 +146,8 @@ public String post(@Context GraphManager manager, results = traverser.customizedKneighbor(sourceId, step, request.maxDepth, request.limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); } long size = results.size(); @@ -144,20 +161,41 @@ public String post(@Context GraphManager manager, if (request.withPath) { paths.addAll(results.paths(request.limit)); } - Iterator iter = QueryResults.emptyIterator(); - if (request.withVertex && !request.countOnly) { - Set ids = new HashSet<>(neighbors); - if (request.withPath) { - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); - } + + if (request.countOnly) { + return manager.serializer(g, measure.measures()) + .writeNodesWithPath("kneighbor", neighbors, size, paths, + QueryResults.emptyIterator(), + QueryResults.emptyIterator()); + } + + Iterator iterVertex; + Set vertexIds = new HashSet<>(neighbors); + if (request.withPath) { + for (HugeTraverser.Path p : paths) { + vertexIds.addAll(p.vertices()); } - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + } + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge = Collections.emptyIterator(); + if (request.withPath) { + Set edges = results.edgeResults().getEdges(paths); + if (request.withEdge) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } } - return manager.serializer(g).writeNodesWithPath("kneighbor", neighbors, - size, paths, iter); + + return manager.serializer(g, measure.measures()) + .writeNodesWithPath("kneighbor", neighbors, + size, paths, iterVertex, iterEdge); } private static class Request { @@ -176,14 +214,16 @@ private static class Request { public boolean withVertex = false; @JsonProperty("with_path") public boolean withPath = false; + @JsonProperty("with_edge") + public boolean withEdge = false; @Override public String toString() { return String.format("PathRequest{source=%s,step=%s,maxDepth=%s" + "limit=%s,countOnly=%s,withVertex=%s," + - "withPath=%s}", this.source, this.step, + "withPath=%s,withEdge=%s}", this.source, this.step, this.maxDepth, this.limit, this.countOnly, - this.withVertex, this.withPath); + this.withVertex, this.withPath, this.withEdge); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java index 30282be9d6..1adf2be5eb 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java @@ -22,6 +22,7 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; +import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -41,12 +42,13 @@ import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; -import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.slf4j.Logger; import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.inject.Singleton; @@ -78,6 +80,8 @@ public String get(@Context GraphManager manager, @QueryParam("max_depth") int depth, @QueryParam("nearest") @DefaultValue("true") boolean nearest, + @QueryParam("count_only") + @DefaultValue("false") boolean count_only, @QueryParam("max_degree") @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("capacity") @@ -87,8 +91,10 @@ public String get(@Context GraphManager manager, LOG.debug("Graph [{}] get k-out from '{}' with " + "direction '{}', edge label '{}', max depth '{}', nearest " + "'{}', max degree '{}', capacity '{}' and limit '{}'", - graph, source, direction, edgeLabel, depth, nearest, - maxDegree, capacity, limit); + graph, source, direction, edgeLabel, depth, + nearest, maxDegree, capacity, limit); + + ApiMeasurer measure = new ApiMeasurer(); Id sourceId = VertexAPI.checkAndParseVertexId(source); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -99,8 +105,15 @@ public String get(@Context GraphManager manager, try (KoutTraverser traverser = new KoutTraverser(g)) { ids = traverser.kout(sourceId, dir, edgeLabel, depth, nearest, maxDegree, capacity, limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + } + + if (count_only) { + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("vertices_size", ids.size())); } - return manager.serializer(g).writeList("vertices", ids); + return manager.serializer(g, measure.measures()).writeList("vertices", ids); } @POST @@ -116,23 +129,25 @@ public String post(@Context GraphManager manager, E.checkArgument(request.step != null, "The steps of request can't be null"); if (request.countOnly) { - E.checkArgument(!request.withVertex && !request.withPath, - "Can't return vertex or path when count only"); + E.checkArgument(!request.withVertex && !request.withPath && !request.withEdge, + "Can't return vertex, edge or path when count only"); } LOG.debug("Graph [{}] get customized kout from source vertex '{}', " + "with step '{}', max_depth '{}', nearest '{}', " + "count_only '{}', capacity '{}', limit '{}', " + - "with_vertex '{}' and with_path '{}'", + "with_vertex '{}', with_path '{}' and with_edge '{}'", graph, request.source, request.step, request.maxDepth, request.nearest, request.countOnly, request.capacity, - request.limit, request.withVertex, request.withPath); + request.limit, request.withVertex, request.withPath, + request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Id sourceId = HugeVertex.getIdValue(request.source); EdgeStep step = step(g, request.step); - KoutRecords results; try (KoutTraverser traverser = new KoutTraverser(g)) { results = traverser.customizedKout(sourceId, step, @@ -140,8 +155,9 @@ public String post(@Context GraphManager manager, request.nearest, request.capacity, request.limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); } - long size = results.size(); if (request.limit != NO_LIMIT && size > request.limit) { size = request.limit; @@ -154,20 +170,40 @@ public String post(@Context GraphManager manager, paths.addAll(results.paths(request.limit)); } - Iterator iter = QueryResults.emptyIterator(); - if (request.withVertex && !request.countOnly) { - Set ids = new HashSet<>(neighbors); - if (request.withPath) { - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); - } + if (request.countOnly) { + return manager.serializer(g, measure.measures()) + .writeNodesWithPath("kneighbor", neighbors, size, paths, + QueryResults.emptyIterator(), + QueryResults.emptyIterator()); + } + + Iterator iterVertex; + Set vertexIds = new HashSet<>(neighbors); + if (request.withPath) { + for (HugeTraverser.Path p : results.paths(request.limit)) { + vertexIds.addAll(p.vertices()); } - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + } + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge = Collections.emptyIterator(); + if (request.withPath) { + Set edges = results.edgeResults().getEdges(paths); + if (request.withEdge) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } } - return manager.serializer(g).writeNodesWithPath("kout", neighbors, - size, paths, iter); + + return manager.serializer(g, measure.measures()) + .writeNodesWithPath("kout", neighbors, size, paths, + iterVertex, iterEdge); } private static class Request { @@ -190,15 +226,18 @@ private static class Request { public boolean withVertex = false; @JsonProperty("with_path") public boolean withPath = false; + @JsonProperty("with_edge") + public boolean withEdge = false; @Override public String toString() { return String.format("KoutRequest{source=%s,step=%s,maxDepth=%s" + "nearest=%s,countOnly=%s,capacity=%s," + - "limit=%s,withVertex=%s,withPath=%s}", - this.source, this.step, this.maxDepth, - this.nearest, this.countOnly, this.capacity, - this.limit, this.withVertex, this.withPath); + "limit=%s,withVertex=%s,withPath=%s," + + "withEdge=%s}", this.source, this.step, + this.maxDepth, this.nearest, this.countOnly, + this.capacity, this.limit, this.withVertex, + this.withPath, this.withEdge); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java index 81c38e65c9..588940abb7 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java @@ -24,30 +24,30 @@ import java.util.List; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser; +import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/multinodeshortestpath") @Singleton @Tag(name = "MultiNodeShortestPathAPI") @@ -74,32 +74,48 @@ public String post(@Context GraphManager manager, graph, request.vertices, request.step, request.maxDepth, request.capacity, request.withVertex); + ApiMeasurer measure = new ApiMeasurer(); + HugeGraph g = graph(manager, graph); Iterator vertices = request.vertices.vertices(g); EdgeStep step = step(g, request.step); - List paths; + MultiNodeShortestPathTraverser.WrappedListPath wrappedListPath; try (MultiNodeShortestPathTraverser traverser = - new MultiNodeShortestPathTraverser(g)) { - paths = traverser.multiNodeShortestPath(vertices, step, - request.maxDepth, - request.capacity); + new MultiNodeShortestPathTraverser(g)) { + wrappedListPath = traverser.multiNodeShortestPath(vertices, step, + request.maxDepth, + request.capacity); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); } - if (!request.withVertex) { - return manager.serializer(g).writePaths("paths", paths, false); - } + List paths = wrappedListPath.paths(); - Set ids = new HashSet<>(); - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); + } + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - Iterator iter = QueryResults.emptyIterator(); - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + + Iterator iterEdge; + Set edges = wrappedListPath.edges(); + if (request.withEdge && !edges.isEmpty()) { + iterEdge = wrappedListPath.edges().iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - return manager.serializer(g).writePaths("paths", paths, false, iter); + + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, + false, iterVertex, iterEdge); } private static class Request { @@ -114,13 +130,15 @@ private static class Request { public long capacity = Long.parseLong(DEFAULT_CAPACITY); @JsonProperty("with_vertex") public boolean withVertex = false; + @JsonProperty("with_edge") + public boolean withEdge = false; @Override public String toString() { return String.format("Request{vertices=%s,step=%s,maxDepth=%s" + - "capacity=%s,withVertex=%s}", + "capacity=%s,withVertex=%s,withEdge=%s}", this.vertices, this.step, this.maxDepth, - this.capacity, this.withVertex); + this.capacity, this.withVertex, this.withEdge); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java index 6e18c9a1c2..50bca7f75b 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java @@ -27,27 +27,11 @@ import java.util.Iterator; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.PathsTraverser; @@ -55,9 +39,25 @@ import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/paths") @Singleton @Tag(name = "PathsAPI") @@ -87,6 +87,8 @@ public String get(@Context GraphManager manager, graph, source, target, direction, edgeLabel, depth, maxDegree, capacity, limit); + ApiMeasurer measure = new ApiMeasurer(); + Id sourceId = VertexAPI.checkAndParseVertexId(source); Id targetId = VertexAPI.checkAndParseVertexId(target); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -97,7 +99,10 @@ public String get(@Context GraphManager manager, dir.opposite(), edgeLabel, depth, maxDegree, capacity, limit); - return manager.serializer(g).writePaths("paths", paths, false); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, false); } @POST @@ -120,10 +125,12 @@ public String post(@Context GraphManager manager, LOG.debug("Graph [{}] get paths from source vertices '{}', target " + "vertices '{}', with step '{}', max depth '{}', " + - "capacity '{}', limit '{}' and with_vertex '{}'", + "capacity '{}', limit '{}', with_vertex '{}' and with_edge '{}'", graph, request.sources, request.targets, request.step, request.depth, request.capacity, request.limit, - request.withVertex); + request.withVertex, request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Iterator sources = request.sources.vertices(g); @@ -131,24 +138,38 @@ public String post(@Context GraphManager manager, EdgeStep step = step(g, request.step); CollectionPathsTraverser traverser = new CollectionPathsTraverser(g); - Collection paths; - paths = traverser.paths(sources, targets, step, request.depth, - request.nearest, request.capacity, - request.limit); - - if (!request.withVertex) { - return manager.serializer(g).writePaths("paths", paths, false); + CollectionPathsTraverser.WrappedPathCollection + wrappedPathCollection = traverser.paths(sources, targets, + step, request.depth, + request.nearest, request.capacity, + request.limit); + Collection paths = wrappedPathCollection.paths(); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); } - - Set ids = new HashSet<>(); - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - Iterator iter = QueryResults.emptyIterator(); - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + + Iterator iterEdge; + Set edges = wrappedPathCollection.edges(); + if (request.withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - return manager.serializer(g).writePaths("paths", paths, false, iter); + + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, false, + iterVertex, iterEdge); } private static class Request { @@ -170,14 +191,17 @@ private static class Request { @JsonProperty("with_vertex") public boolean withVertex = false; + @JsonProperty("with_edge") + public boolean withEdge = false; + @Override public String toString() { return String.format("PathRequest{sources=%s,targets=%s,step=%s," + "maxDepth=%s,nearest=%s,capacity=%s," + - "limit=%s,withVertex=%s}", this.sources, - this.targets, this.step, this.depth, - this.nearest, this.capacity, - this.limit, this.withVertex); + "limit=%s,withVertex=%s,withEdge=%s}", + this.sources, this.targets, this.step, + this.depth, this.nearest, this.capacity, + this.limit, this.withVertex, this.withEdge); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java index c841412cae..28ded20e60 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java @@ -21,30 +21,35 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.SubGraphTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/rays") @Singleton @Tag(name = "RaysAPI") @@ -66,12 +71,17 @@ public String get(@Context GraphManager manager, @QueryParam("capacity") @DefaultValue(DEFAULT_CAPACITY) long capacity, @QueryParam("limit") - @DefaultValue(DEFAULT_PATHS_LIMIT) int limit) { + @DefaultValue(DEFAULT_PATHS_LIMIT) int limit, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge) { LOG.debug("Graph [{}] get rays paths from '{}' with " + "direction '{}', edge label '{}', max depth '{}', " + "max degree '{}', capacity '{}' and limit '{}'", graph, sourceV, direction, edgeLabel, depth, maxDegree, capacity, limit); + ApiMeasurer measure = new ApiMeasurer(); Id source = VertexAPI.checkAndParseVertexId(sourceV); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -80,8 +90,33 @@ public String get(@Context GraphManager manager, SubGraphTraverser traverser = new SubGraphTraverser(g); HugeTraverser.PathSet paths = traverser.rays(source, dir, edgeLabel, - depth, maxDegree, - capacity, limit); - return manager.serializer(g).writePaths("rays", paths, false); + depth, maxDegree, capacity, + limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); + } + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge; + Set edges = paths.getEdges(); + if (withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); + } + + return manager.serializer(g, measure.measures()) + .writePaths("rays", paths, false, + iterVertex, iterEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java index 67dfe7ab72..3a44fd85a1 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java @@ -21,30 +21,35 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.SubGraphTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/rings") @Singleton @Tag(name = "RingsAPI") @@ -68,14 +73,19 @@ public String get(@Context GraphManager manager, @QueryParam("capacity") @DefaultValue(DEFAULT_CAPACITY) long capacity, @QueryParam("limit") - @DefaultValue(DEFAULT_PATHS_LIMIT) int limit) { + @DefaultValue(DEFAULT_PATHS_LIMIT) int limit, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge) { LOG.debug("Graph [{}] get rings paths reachable from '{}' with " + "direction '{}', edge label '{}', max depth '{}', " + - "source in ring '{}', max degree '{}', capacity '{}' " + - "and limit '{}'", + "source in ring '{}', max degree '{}', capacity '{}', " + + "limit '{}', with_vertex '{}' and with_edge '{}'", graph, sourceV, direction, edgeLabel, depth, sourceInRing, - maxDegree, capacity, limit); + maxDegree, capacity, limit, withVertex, withEdge); + ApiMeasurer measure = new ApiMeasurer(); Id source = VertexAPI.checkAndParseVertexId(sourceV); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -83,8 +93,34 @@ public String get(@Context GraphManager manager, SubGraphTraverser traverser = new SubGraphTraverser(g); HugeTraverser.PathSet paths = traverser.rings(source, dir, edgeLabel, - depth, sourceInRing, - maxDegree, capacity, limit); - return manager.serializer(g).writePaths("rings", paths, false); + depth, sourceInRing, maxDegree, + capacity, limit); + + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); + } + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge; + Set edges = paths.getEdges(); + if (withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); + } + + return manager.serializer(g, measure.measures()) + .writePaths("rings", paths, false, + iterVertex, iterEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java index a7a1770fd0..489ca08054 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java @@ -20,30 +20,39 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_ELEMENTS_LIMIT; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser; import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableMap; + +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; @Path("graphs/{graph}/traversers/sameneighbors") @Singleton @@ -69,6 +78,8 @@ public String get(@Context GraphManager manager, "direction {}, edge label {}, max degree '{}' and limit '{}'", graph, vertex, other, direction, edgeLabel, maxDegree, limit); + ApiMeasurer measure = new ApiMeasurer(); + Id sourceId = VertexAPI.checkAndParseVertexId(vertex); Id targetId = VertexAPI.checkAndParseVertexId(other); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -77,6 +88,77 @@ public String get(@Context GraphManager manager, SameNeighborTraverser traverser = new SameNeighborTraverser(g); Set neighbors = traverser.sameNeighbors(sourceId, targetId, dir, edgeLabel, maxDegree, limit); - return manager.serializer(g).writeList("same_neighbors", neighbors); + + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + return manager.serializer(g, measure.measures()) + .writeList("same_neighbors", neighbors); + } + + @POST + @Timed + @Produces(APPLICATION_JSON_WITH_CHARSET) + public String sameNeighbors(@Context GraphManager manager, + @PathParam("graph") String graph, + Request request) { + LOG.debug("Graph [{}] get same neighbors among batch, '{}'", graph, request.toString()); + + ApiMeasurer measure = new ApiMeasurer(); + + Directions dir = Directions.convert(EdgeAPI.parseDirection(request.direction)); + HugeGraph g = graph(manager, graph); + SameNeighborTraverser traverser = new SameNeighborTraverser(g); + + List vertexList = request.vertexList; + E.checkArgument(vertexList.size() >= 2, "vertex_list size can't " + + "be less than 2"); + + List vertexIds = new ArrayList<>(); + for (Object obj : vertexList) { + vertexIds.add(HugeVertex.getIdValue(obj)); + } + + Set neighbors = traverser.sameNeighbors(vertexIds, dir, request.labels, + request.maxDegree, request.limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set ids = new HashSet<>(neighbors); + ids.addAll(vertexIds); + if (request.withVertex && !ids.isEmpty()) { + iterVertex = g.vertices(ids.toArray()); + } else { + iterVertex = ids.iterator(); + } + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("same_neighbors", neighbors, + "vertices", iterVertex)); + } + + private static class Request { + + @JsonProperty("max_degree") + public long maxDegree = Long.parseLong(DEFAULT_MAX_DEGREE); + @JsonProperty("limit") + public int limit = Integer.parseInt(DEFAULT_ELEMENTS_LIMIT); + @JsonProperty("vertex_list") + private List vertexList; + @JsonProperty("direction") + private String direction; + @JsonProperty("labels") + private List labels; + @JsonProperty("with_vertex") + private boolean withVertex = false; + + @Override + public String toString() { + return String.format("SameNeighborsBatchRequest{vertex_list=%s," + + "direction=%s,label=%s,max_degree=%d," + + "limit=%d,with_vertex=%s", + this.vertexList, this.direction, this.labels, + this.maxDegree, this.limit, this.withVertex); + } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java index 08cbdf74cb..dcc8489ae1 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java @@ -20,32 +20,36 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_CAPACITY; import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; +import java.util.Iterator; import java.util.List; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; + +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; @Path("graphs/{graph}/traversers/shortestpath") @Singleton @@ -68,13 +72,21 @@ public String get(@Context GraphManager manager, @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("skip_degree") @DefaultValue("0") long skipDegree, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge, @QueryParam("capacity") @DefaultValue(DEFAULT_CAPACITY) long capacity) { LOG.debug("Graph [{}] get shortest path from '{}', to '{}' with " + "direction {}, edge label {}, max depth '{}', " + - "max degree '{}', skipped maxDegree '{}' and capacity '{}'", + "max degree '{}', skipped maxDegree '{}', capacity '{}', " + + "with_vertex '{}' and with_edge '{}'", graph, source, target, direction, edgeLabel, depth, - maxDegree, skipDegree, capacity); + maxDegree, skipDegree, capacity, withVertex, withEdge); + + ApiMeasurer measure = new ApiMeasurer(); + Id sourceId = VertexAPI.checkAndParseVertexId(source); Id targetId = VertexAPI.checkAndParseVertexId(target); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -89,6 +101,29 @@ public String get(@Context GraphManager manager, dir, edgeLabels, depth, maxDegree, skipDegree, capacity); - return manager.serializer(g).writeList("path", path.vertices()); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + List vertexIds = path.vertices(); + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(path.vertices().size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge; + Set edges = path.getEdges(); + if (withEdge) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); + } + + return manager.serializer(g, measure.measures()) + .writeMap(ImmutableMap.of("path", path.vertices(), + "vertices", iterVertex, + "edges", iterEdge)); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java index 8813399ca7..eab339d958 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java @@ -22,33 +22,33 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_PATHS_LIMIT; import java.util.Iterator; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.graph.EdgeAPI; import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser; -import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/singlesourceshortestpath") @Singleton @Tag(name = "SingleSourceShortestPathAPI") @@ -69,16 +69,22 @@ public String get(@Context GraphManager manager, @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("skip_degree") @DefaultValue("0") long skipDegree, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge, @QueryParam("capacity") @DefaultValue(DEFAULT_CAPACITY) long capacity, @QueryParam("limit") - @DefaultValue(DEFAULT_PATHS_LIMIT) int limit, - @QueryParam("with_vertex") boolean withVertex) { + @DefaultValue(DEFAULT_PATHS_LIMIT) int limit) { LOG.debug("Graph [{}] get single source shortest path from '{}' " + "with direction {}, edge label {}, weight property {}, " + - "max degree '{}', limit '{}' and with vertex '{}'", + "max degree '{}', capacity '{}', limit '{}', " + + "with_vertex '{}' and with_edge '{}'", graph, source, direction, edgeLabel, - weight, maxDegree, withVertex); + weight, maxDegree, capacity, limit, withVertex, withEdge); + + ApiMeasurer measure = new ApiMeasurer(); Id sourceId = VertexAPI.checkAndParseVertexId(source); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -86,14 +92,31 @@ public String get(@Context GraphManager manager, HugeGraph g = graph(manager, graph); SingleSourceShortestPathTraverser traverser = new SingleSourceShortestPathTraverser(g); - WeightedPaths paths = traverser.singleSourceShortestPaths( - sourceId, dir, edgeLabel, weight, - maxDegree, skipDegree, capacity, limit); - Iterator iterator = QueryResults.emptyIterator(); - assert paths != null; - if (!paths.isEmpty() && withVertex) { - iterator = g.vertices(paths.vertices().toArray()); + SingleSourceShortestPathTraverser.WeightedPaths paths = + traverser.singleSourceShortestPaths( + sourceId, dir, edgeLabel, weight, + maxDegree, skipDegree, capacity, limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + Iterator iterVertex; + Set vertexIds = paths.vertices(); + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - return manager.serializer(g).writeWeightedPaths(paths, iterator); + + Iterator iterEdge; + Set edges = paths.getEdges(); + if (withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); + } + + return manager.serializer(g, measure.measures()) + .writeWeightedPaths(paths, iterVertex, iterEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java index d566fae90d..9b3739acb2 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java @@ -26,30 +26,30 @@ import java.util.List; import java.util.Set; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser; import org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/templatepaths") @Singleton @Tag(name = "TemplatePathsAPI") @@ -57,6 +57,22 @@ public class TemplatePathsAPI extends TraverserAPI { private static final Logger LOG = Log.logger(TemplatePathsAPI.class); + private static List steps(HugeGraph g, + List steps) { + List edgeSteps = new ArrayList<>(steps.size()); + for (TemplatePathStep step : steps) { + edgeSteps.add(repeatEdgeStep(g, step)); + } + return edgeSteps; + } + + private static RepeatEdgeStep repeatEdgeStep(HugeGraph graph, + TemplatePathStep step) { + return new RepeatEdgeStep(graph, step.direction, step.labels, + step.properties, step.maxDegree, + step.skipDegree, step.maxTimes); + } + @POST @Timed @Consumes(APPLICATION_JSON) @@ -74,9 +90,11 @@ public String post(@Context GraphManager manager, LOG.debug("Graph [{}] get template paths from source vertices '{}', " + "target vertices '{}', with steps '{}', " + - "capacity '{}', limit '{}' and with_vertex '{}'", + "capacity '{}', limit '{}', with_vertex '{}' and with_edge '{}'", graph, request.sources, request.targets, request.steps, - request.capacity, request.limit, request.withVertex); + request.capacity, request.limit, request.withVertex, request.withEdge); + + ApiMeasurer measure = new ApiMeasurer(); HugeGraph g = graph(manager, graph); Iterator sources = request.sources.vertices(g); @@ -84,40 +102,38 @@ public String post(@Context GraphManager manager, List steps = steps(g, request.steps); TemplatePathsTraverser traverser = new TemplatePathsTraverser(g); - Set paths; - paths = traverser.templatePaths(sources, targets, steps, + TemplatePathsTraverser.WrappedPathSet wrappedPathSet = + traverser.templatePaths(sources, targets, steps, request.withRing, request.capacity, request.limit); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); - if (!request.withVertex) { - return manager.serializer(g).writePaths("paths", paths, false); - } + Set paths = wrappedPathSet.paths(); - Set ids = new HashSet<>(); - for (HugeTraverser.Path p : paths) { - ids.addAll(p.vertices()); + Iterator iterVertex; + Set vertexIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + vertexIds.addAll(path.vertices()); } - Iterator iter = QueryResults.emptyIterator(); - if (!ids.isEmpty()) { - iter = g.vertices(ids.toArray()); + if (request.withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); } - return manager.serializer(g).writePaths("paths", paths, false, iter); - } - private static List steps(HugeGraph g, - List steps) { - List edgeSteps = new ArrayList<>(steps.size()); - for (TemplatePathStep step : steps) { - edgeSteps.add(repeatEdgeStep(g, step)); + Iterator iterEdge; + Set edges = wrappedPathSet.edges(); + if (request.withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - return edgeSteps; - } - private static RepeatEdgeStep repeatEdgeStep(HugeGraph graph, - TemplatePathStep step) { - return new RepeatEdgeStep(graph, step.direction, step.labels, - step.properties, step.maxDegree, - step.skipDegree, step.maxTimes); + return manager.serializer(g, measure.measures()) + .writePaths("paths", paths, false, + iterVertex, iterEdge); } private static class Request { @@ -136,15 +152,17 @@ private static class Request { public int limit = Integer.parseInt(DEFAULT_PATHS_LIMIT); @JsonProperty("with_vertex") public boolean withVertex = false; + @JsonProperty("with_edge") + public boolean withEdge = false; @Override public String toString() { return String.format("TemplatePathsRequest{sources=%s,targets=%s," + "steps=%s,withRing=%s,capacity=%s,limit=%s," + - "withVertex=%s}", + "withVertex=%s,withEdge=%s}", this.sources, this.targets, this.steps, this.withRing, this.capacity, this.limit, - this.withVertex); + this.withVertex, this.withEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java index 56c4889f81..86364a23bf 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java @@ -22,20 +22,6 @@ import java.util.Iterator; import java.util.List; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.filter.CompressInterceptor.Compress; @@ -43,11 +29,25 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.query.ConditionQuery; import org.apache.hugegraph.backend.store.Shard; +import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/vertices") @Singleton @Tag(name = "VerticesAPI") diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java index b675f618bc..1c25661f15 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java @@ -21,20 +21,8 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; import java.util.Iterator; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Context; - -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.core.GraphManager; -import org.slf4j.Logger; +import java.util.List; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; @@ -42,13 +30,27 @@ import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.query.QueryResults; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser; -import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Path("graphs/{graph}/traversers/weightedshortestpath") @Singleton @Tag(name = "WeightedShortestPathAPI") @@ -70,16 +72,20 @@ public String get(@Context GraphManager manager, @DefaultValue(DEFAULT_MAX_DEGREE) long maxDegree, @QueryParam("skip_degree") @DefaultValue("0") long skipDegree, + @QueryParam("with_vertex") + @DefaultValue("false") boolean withVertex, + @QueryParam("with_edge") + @DefaultValue("false") boolean withEdge, @QueryParam("capacity") - @DefaultValue(DEFAULT_CAPACITY) long capacity, - @QueryParam("with_vertex") boolean withVertex) { + @DefaultValue(DEFAULT_CAPACITY) long capacity) { LOG.debug("Graph [{}] get weighted shortest path between '{}' and " + "'{}' with direction {}, edge label {}, weight property {}, " + "max degree '{}', skip degree '{}', capacity '{}', " + - "and with vertex '{}'", + "with_vertex '{}' and with_edge '{}'", graph, source, target, direction, edgeLabel, weight, - maxDegree, skipDegree, capacity, withVertex); + maxDegree, skipDegree, capacity, withVertex, withEdge); + ApiMeasurer measure = new ApiMeasurer(); Id sourceId = VertexAPI.checkAndParseVertexId(source); Id targetId = VertexAPI.checkAndParseVertexId(target); Directions dir = Directions.convert(EdgeAPI.parseDirection(direction)); @@ -89,14 +95,38 @@ public String get(@Context GraphManager manager, SingleSourceShortestPathTraverser traverser = new SingleSourceShortestPathTraverser(g); - NodeWithWeight path = traverser.weightedShortestPath( - sourceId, targetId, dir, edgeLabel, weight, - maxDegree, skipDegree, capacity); - Iterator iterator = QueryResults.emptyIterator(); - if (path != null && withVertex) { - assert !path.node().path().isEmpty(); - iterator = g.vertices(path.node().path().toArray()); + SingleSourceShortestPathTraverser.NodeWithWeight node = + traverser.weightedShortestPath(sourceId, targetId, + dir, edgeLabel, weight, + maxDegree, skipDegree, capacity); + measure.addIterCount(traverser.vertexIterCounter.get(), + traverser.edgeIterCounter.get()); + + if (node == null) { + return manager.serializer(g, measure.measures()) + .writeWeightedPath(null, + QueryResults.emptyIterator(), + QueryResults.emptyIterator()); + } + + Iterator iterVertex; + List vertexIds = node.node().path(); + if (withVertex && !vertexIds.isEmpty()) { + iterVertex = g.vertices(vertexIds.toArray()); + measure.addIterCount(vertexIds.size(), 0L); + } else { + iterVertex = vertexIds.iterator(); + } + + Iterator iterEdge; + Set edges = node.getEdges(); + if (withEdge && !edges.isEmpty()) { + iterEdge = edges.iterator(); + } else { + iterEdge = HugeTraverser.EdgeRecord.getEdgeIds(edges).iterator(); } - return manager.serializer(g).writeWeightedPath(path, iterator); + + return manager.serializer(g, measure.measures()) + .writeWeightedPath(node, iterVertex, iterEdge); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java index 95a53faa39..e66b593568 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java @@ -264,4 +264,4 @@ public static synchronized ServerOptions instance() { disallowEmpty(), true ); -} +} \ No newline at end of file diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java b/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java index b203c10470..2c73b5ee93 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java @@ -224,6 +224,10 @@ public Serializer serializer(Graph g) { return JsonSerializer.instance(); } + public Serializer serializer(Graph g, Map apiMeasure) { + return JsonSerializer.instance(apiMeasure); + } + public void rollbackAll() { for (Graph graph : this.graphs.values()) { if (graph.features().graph().supportsTransactions() && diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java index 8103602234..035499c598 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java @@ -24,11 +24,6 @@ import java.util.List; import java.util.Map; -import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; - import org.apache.hugegraph.HugeException; import org.apache.hugegraph.api.API; import org.apache.hugegraph.auth.SchemaDefine.AuthElement; @@ -47,25 +42,44 @@ import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths; import org.apache.hugegraph.traversal.optimize.TraversalUtil; import org.apache.hugegraph.util.JsonUtil; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; public class JsonSerializer implements Serializer { private static final int LBUF_SIZE = 1024; - - private static JsonSerializer INSTANCE = new JsonSerializer(); + private static final String MEASURE_KEY = "measure"; + private static final JsonSerializer INSTANCE = new JsonSerializer(); + private Map apiMeasure = null; private JsonSerializer() { } + private JsonSerializer(Map apiMeasure) { + this.apiMeasure = apiMeasure; + } + public static JsonSerializer instance() { return INSTANCE; } + public static JsonSerializer instance(Map apiMeasure) { + return new JsonSerializer(apiMeasure); + } + @Override public String writeMap(Map map) { - return JsonUtil.toJson(map); + ImmutableMap.Builder builder = ImmutableMap.builder(); + builder.putAll(map); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + return JsonUtil.toJson(builder.build()); } @Override @@ -73,6 +87,10 @@ public String writeList(String label, Collection list) { try (ByteArrayOutputStream out = new ByteArrayOutputStream(LBUF_SIZE)) { out.write(String.format("{\"%s\": ", label).getBytes(API.CHARSET)); out.write(JsonUtil.toJson(list).getBytes(API.CHARSET)); + if (this.apiMeasure != null) { + out.write(String.format(",\"%s\": ", MEASURE_KEY).getBytes(API.CHARSET)); + out.write(JsonUtil.toJson(this.apiMeasure).getBytes(API.CHARSET)); + } out.write("}".getBytes(API.CHARSET)); return out.toString(API.CHARSET); } catch (Exception e) { @@ -122,6 +140,11 @@ private String writeIterator(String label, Iterator iter, out.write(page.getBytes(API.CHARSET)); } + if (this.apiMeasure != null) { + out.write(String.format(",\"%s\":[", MEASURE_KEY).getBytes(API.CHARSET)); + out.write(JsonUtil.toJson(this.apiMeasure).getBytes(API.CHARSET)); + } + out.write("}".getBytes(API.CHARSET)); return out.toString(API.CHARSET); } catch (HugeException e) { @@ -144,7 +167,7 @@ public String writePropertyKey(PropertyKey propertyKey) { @Override public String writeTaskWithSchema( - SchemaElement.TaskWithSchema taskWithSchema) { + SchemaElement.TaskWithSchema taskWithSchema) { StringBuilder builder = new StringBuilder(); long id = taskWithSchema.task() == null ? 0L : taskWithSchema.task().asLong(); @@ -162,10 +185,14 @@ public String writeTaskWithSchema( "TaskWithSchema, only support " + "[PropertyKey, IndexLabel]", schemaElement); } - return builder.append("{\"").append(type).append("\": ") - .append(schema) - .append(", \"task_id\": ").append(id).append("}") - .toString(); + builder.append("{\"").append(type).append("\": ") + .append(schema).append(", \"task_id\": ") + .append(id); + if (this.apiMeasure != null) { + builder.append(String.format(",\"%s\":[", MEASURE_KEY)); + builder.append(JsonUtil.toJson(this.apiMeasure)); + } + return builder.append("}").toString(); } @Override @@ -245,27 +272,36 @@ public String writeAuthElements(String label, @Override public String writePaths(String name, Collection paths, - boolean withCrossPoint, - Iterator vertices) { + boolean withCrossPoint, Iterator vertices, + Iterator edges) { List> pathList = new ArrayList<>(paths.size()); for (HugeTraverser.Path path : paths) { pathList.add(path.toMap(withCrossPoint)); } - Map results; - if (vertices == null) { - results = ImmutableMap.of(name, pathList); - } else { - results = ImmutableMap.of(name, pathList, "vertices", vertices); + ImmutableMap.Builder builder = ImmutableMap.builder(); + builder.put(name, pathList); + + if (vertices != null) { + builder.put("vertices", vertices); + } + + if (edges != null) { + builder.put("edges", edges); + } + + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); } - return JsonUtil.toJson(results); + + return JsonUtil.toJson(builder.build()); } @Override public String writeCrosspoints(CrosspointsPaths paths, - Iterator iterator, + Iterator vertices, + Iterator edges, boolean withPath) { - Map results; List> pathList; if (withPath) { pathList = new ArrayList<>(); @@ -275,50 +311,81 @@ public String writeCrosspoints(CrosspointsPaths paths, } else { pathList = ImmutableList.of(); } - results = ImmutableMap.of("crosspoints", paths.crosspoints(), - "paths", pathList, - "vertices", iterator); - return JsonUtil.toJson(results); + ImmutableMap.Builder builder = ImmutableMap.builder() + .put("crosspoints", + paths.crosspoints()) + .put("paths", pathList) + .put("vertices", vertices) + .put("edges", edges); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + return JsonUtil.toJson(builder.build()); } @Override public String writeSimilars(SimilarsMap similars, - Iterator vertices) { - return JsonUtil.toJson(ImmutableMap.of("similars", similars.toMap(), - "vertices", vertices)); + Iterator vertices) { + ImmutableMap.Builder builder = ImmutableMap.builder() + .put("similars", + similars.toMap()) + .put("vertices", vertices); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + return JsonUtil.toJson(builder.build()); } @Override - public String writeWeightedPath(NodeWithWeight path, - Iterator vertices) { + public String writeWeightedPath(NodeWithWeight path, Iterator vertices, + Iterator edges) { Map pathMap = path == null ? ImmutableMap.of() : path.toMap(); - return JsonUtil.toJson(ImmutableMap.of("path", pathMap, - "vertices", vertices)); + ImmutableMap.Builder builder = ImmutableMap.builder() + .put("path", pathMap) + .put("vertices", vertices) + .put("edges", edges); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + return JsonUtil.toJson(builder.build()); } @Override - public String writeWeightedPaths(WeightedPaths paths, - Iterator vertices) { + public String writeWeightedPaths(WeightedPaths paths, Iterator vertices, + Iterator edges) { Map> pathMap = paths == null ? ImmutableMap.of() : paths.toMap(); - return JsonUtil.toJson(ImmutableMap.of("paths", pathMap, - "vertices", vertices)); + ImmutableMap.Builder builder = ImmutableMap.builder() + .put("paths", pathMap) + .put("vertices", vertices) + .put("edges", edges); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + return JsonUtil.toJson(builder.build()); } @Override public String writeNodesWithPath(String name, List nodes, long size, Collection paths, - Iterator vertices) { + Iterator vertices, Iterator edges) { List> pathList = new ArrayList<>(); for (HugeTraverser.Path path : paths) { pathList.add(path.toMap(false)); } - Map results; - results = ImmutableMap.of(name, nodes, "size", size, - "paths", pathList, "vertices", vertices); - return JsonUtil.toJson(results); + ImmutableMap.Builder builder = ImmutableMap.builder() + .put(name, nodes) + .put("size", size) + .put("paths", pathList) + .put("vertices", vertices) + .put("edges", edges); + if (this.apiMeasure != null) { + builder.put(MEASURE_KEY, this.apiMeasure); + } + + return JsonUtil.toJson(builder.build()); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java index f3b0cdcace..96fa634202 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java @@ -22,9 +22,6 @@ import java.util.List; import java.util.Map; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Vertex; - import org.apache.hugegraph.auth.SchemaDefine.AuthElement; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.schema.EdgeLabel; @@ -37,6 +34,8 @@ import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.NodeWithWeight; import org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser.WeightedPaths; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; public interface Serializer { @@ -77,23 +76,26 @@ public interface Serializer { String writeAuthElements(String label, List users); String writePaths(String name, Collection paths, - boolean withCrossPoint, Iterator vertices); + boolean withCrossPoint, Iterator vertices, + Iterator edges); default String writePaths(String name, Collection paths, boolean withCrossPoint) { - return this.writePaths(name, paths, withCrossPoint, null); + return this.writePaths(name, paths, withCrossPoint, null, null); } - String writeCrosspoints(CrosspointsPaths paths, Iterator iterator, - boolean withPath); + String writeCrosspoints(CrosspointsPaths paths, Iterator vertices, + Iterator edges, boolean withPath); - String writeSimilars(SimilarsMap similars, Iterator vertices); + String writeSimilars(SimilarsMap similars, Iterator vertices); - String writeWeightedPath(NodeWithWeight path, Iterator vertices); + String writeWeightedPath(NodeWithWeight path, Iterator vertices, + Iterator edges); - String writeWeightedPaths(WeightedPaths paths, Iterator vertices); + String writeWeightedPaths(WeightedPaths paths, Iterator vertices, + Iterator edges); String writeNodesWithPath(String name, List nodes, long size, Collection paths, - Iterator vertices); + Iterator vertices, Iterator edges); } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java b/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java index 2f512f7169..0fba245966 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java @@ -26,19 +26,29 @@ import org.apache.commons.lang.mutable.MutableLong; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.id.IdGenerator; -import org.apache.tinkerpop.gremlin.structure.Edge; - import org.apache.hugegraph.job.UserJob; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.InsertionOrderUtil; +import org.apache.tinkerpop.gremlin.structure.Edge; + import com.google.common.collect.ImmutableMap; public class TriangleCountAlgorithm extends AbstractCommAlgorithm { public static final String ALGO_NAME = "triangle_count"; + protected static int workersWhenBoth(Map parameters) { + Directions direction = direction4Out(parameters); + int workers = workers(parameters); + E.checkArgument(direction == Directions.BOTH || workers <= 0, + "The workers must be not set when direction!=BOTH, " + + "but got workers=%s and direction=%s", + workers, direction); + return workers; + } + @Override public String name() { return ALGO_NAME; @@ -60,16 +70,6 @@ public Object call(UserJob job, Map parameters) { } } - protected static int workersWhenBoth(Map parameters) { - Directions direction = direction4Out(parameters); - int workers = workers(parameters); - E.checkArgument(direction == Directions.BOTH || workers <= 0, - "The workers must be not set when direction!=BOTH, " + - "but got workers=%s and direction=%s", - workers, direction); - return workers; - } - protected static class Traverser extends AlgoTraverser { protected static final String KEY_TRIANGLES = "triangles"; @@ -83,8 +83,12 @@ protected Traverser(UserJob job, String name, int workers) { super(job, name, workers); } + protected static Set newOrderedSet() { + return new TreeSet<>(); + } + public Object triangleCount(Directions direction, long degree) { - Map results = triangles( direction, degree); + Map results = triangles(direction, degree); results = InsertionOrderUtil.newMap(results); results.remove(KEY_TRIADS); return results; @@ -191,7 +195,7 @@ private Set adjacentVertices(Id source, long degree, MutableLong edgesCount) { Iterator adjVertices = this.adjacentVertices(source, Directions.BOTH, - null, degree); + (Id) null, degree); Set set = newOrderedSet(); while (adjVertices.hasNext()) { edgesCount.increment(); @@ -206,7 +210,7 @@ protected long intersect(long degree, Set adjVertices) { Id empty = IdGenerator.ZERO; Iterator vertices; for (Id v : adjVertices) { - vertices = this.adjacentVertices(v, dir, null, degree); + vertices = this.adjacentVertices(v, dir, (Id) null, degree); Id lastVertex = empty; while (vertices.hasNext()) { Id vertex = vertices.next(); @@ -231,9 +235,5 @@ protected long intersect(long degree, Set adjVertices) { protected long localTriads(int size) { return size * (size - 1L) / 2L; } - - protected static Set newOrderedSet() { - return new TreeSet<>(); - } } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java index 76db199498..51e919dff8 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java @@ -21,15 +21,17 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.traversal.algorithm.strategy.TraverseStrategy; +import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.structure.HugeVertex; -import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableList; public class CollectionPathsTraverser extends HugeTraverser { @@ -38,10 +40,10 @@ public CollectionPathsTraverser(HugeGraph graph) { super(graph); } - public Collection paths(Iterator sources, - Iterator targets, - EdgeStep step, int depth, boolean nearest, - long capacity, long limit) { + public WrappedPathCollection paths(Iterator sources, + Iterator targets, + EdgeStep step, int depth, boolean nearest, + long capacity, long limit) { checkCapacity(capacity); checkLimit(limit); @@ -63,31 +65,33 @@ public Collection paths(Iterator sources, "but got: %s", MAX_VERTICES, sourceList.size()); checkPositive(depth, "max depth"); + boolean concurrent = depth >= this.concurrentDepth(); TraverseStrategy strategy = TraverseStrategy.create( - depth >= this.concurrentDepth(), - this.graph()); + concurrent, this.graph()); Traverser traverser; if (nearest) { traverser = new NearestTraverser(this, strategy, sourceList, targetList, step, - depth, capacity, limit); + depth, capacity, limit, concurrent); } else { traverser = new Traverser(this, strategy, sourceList, targetList, step, - depth, capacity, limit); + depth, capacity, limit, concurrent); } do { // Forward traverser.forward(); if (traverser.finished()) { - return traverser.paths(); + Collection paths = traverser.paths(); + return new WrappedPathCollection(paths, traverser.edgeResults.getEdges(paths)); } // Backward traverser.backward(); if (traverser.finished()) { - return traverser.paths(); + Collection paths = traverser.paths(); + return new WrappedPathCollection(paths, traverser.edgeResults.getEdges(paths)); } } while (true); } @@ -98,8 +102,9 @@ private static class Traverser extends PathTraverser { public Traverser(HugeTraverser traverser, TraverseStrategy strategy, Collection sources, Collection targets, - EdgeStep step, int depth, long capacity, long limit) { - super(traverser, strategy, sources, targets, capacity, limit); + EdgeStep step, int depth, long capacity, long limit, + boolean concurrent) { + super(traverser, strategy, sources, targets, capacity, limit, concurrent); this.step = step; this.totalSteps = depth; } @@ -180,15 +185,15 @@ protected void reInitCurrentStepIfNeeded(EdgeStep step, } } - private class NearestTraverser extends Traverser { + private static class NearestTraverser extends Traverser { public NearestTraverser(HugeTraverser traverser, TraverseStrategy strategy, Collection sources, Collection targets, EdgeStep step, int depth, long capacity, - long limit) { + long limit, boolean concurrent) { super(traverser, strategy, sources, targets, step, - depth, capacity, limit); + depth, capacity, limit, concurrent); } @Override @@ -274,4 +279,23 @@ protected int accessedNodes() { return this.sourcesAll.size() + this.targetsAll.size(); } } + + public static class WrappedPathCollection { + + private final Collection paths; + private final Set edges; + + public WrappedPathCollection(Collection paths, Set edges) { + this.paths = paths; + this.edges = edges; + } + + public Collection paths() { + return paths; + } + + public Set edges() { + return edges; + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java index 3d3559b05a..28e30367d6 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java @@ -22,25 +22,55 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.MultivaluedMap; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Vertex; - import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep; import org.apache.hugegraph.util.CollectionUtil; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.MultivaluedMap; + public class CustomizePathsTraverser extends HugeTraverser { + private final EdgeRecord edgeResults; + public CustomizePathsTraverser(HugeGraph graph) { super(graph); + this.edgeResults = new EdgeRecord(false); + } + + public static List topNPath(List paths, + boolean incr, long limit) { + paths.sort((p1, p2) -> { + WeightPath wp1 = (WeightPath) p1; + WeightPath wp2 = (WeightPath) p2; + int result = Double.compare(wp1.totalWeight(), wp2.totalWeight()); + return incr ? result : -result; + }); + + if (limit == NO_LIMIT || paths.size() <= limit) { + return paths; + } + return paths.subList(0, (int) limit); + } + + private static List sample(List nodes, long sample) { + if (nodes.size() <= sample) { + return nodes; + } + List result = newList((int) sample); + int size = nodes.size(); + for (int random : CollectionUtil.randomSet(0, size, (int) sample)) { + result.add(nodes.get(random)); + } + return result; } public List customizedPaths(Iterator vertices, @@ -64,7 +94,8 @@ public List customizedPaths(Iterator vertices, int pathCount = 0; long access = 0; MultivaluedMap newVertices = null; - root : for (WeightedEdgeStep step : steps) { + root: + for (WeightedEdgeStep step : steps) { stepNum--; newVertices = newMultivalueMap(); Iterator edges; @@ -75,7 +106,11 @@ public List customizedPaths(Iterator vertices, edges = this.edgesOfVertex(entry.getKey(), step.step()); while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); + this.edgeIterCounter.addAndGet(1L); Id target = edge.id().otherVertexId(); + + this.edgeResults.addEdge(entry.getKey(), target, edge); + for (Node n : entry.getValue()) { // If have loop, skip target if (n.contains(target)) { @@ -113,6 +148,7 @@ public List customizedPaths(Iterator vertices, } } } + this.vertexIterCounter.addAndGet(sources.size()); // Re-init sources sources = newVertices; } @@ -120,6 +156,9 @@ public List customizedPaths(Iterator vertices, return ImmutableList.of(); } List paths = newList(); + if (newVertices == null) { + return ImmutableList.of(); + } for (List nodes : newVertices.values()) { for (Node n : nodes) { if (sorted) { @@ -133,36 +172,13 @@ public List customizedPaths(Iterator vertices, return paths; } - public static List topNPath(List paths, - boolean incr, long limit) { - paths.sort((p1, p2) -> { - WeightPath wp1 = (WeightPath) p1; - WeightPath wp2 = (WeightPath) p2; - int result = Double.compare(wp1.totalWeight(), wp2.totalWeight()); - return incr ? result : -result; - }); - - if (limit == NO_LIMIT || paths.size() <= limit) { - return paths; - } - return paths.subList(0, (int) limit); - } - - private static List sample(List nodes, long sample) { - if (nodes.size() <= sample) { - return nodes; - } - List result = newList((int) sample); - int size = nodes.size(); - for (int random : CollectionUtil.randomSet(0, size, (int) sample)) { - result.add(nodes.get(random)); - } - return result; + public EdgeRecord edgeResults() { + return edgeResults; } public static class WeightNode extends Node { - private double weight; + private final double weight; public WeightNode(Id id, Node parent, double weight) { super(id, parent); @@ -183,7 +199,7 @@ public List weights() { public static class WeightPath extends Path { - private List weights; + private final List weights; private double totalWeight; public WeightPath(List vertices, diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java index f097711e04..7b6bf8f76f 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java @@ -24,26 +24,82 @@ import java.util.Set; import java.util.stream.Collectors; -import jakarta.ws.rs.core.MultivaluedMap; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.CollectionUtil; +import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.hugegraph.structure.HugeEdge; -import org.apache.hugegraph.structure.HugeVertex; -import org.apache.hugegraph.util.CollectionUtil; -import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; +import jakarta.ws.rs.core.MultivaluedMap; + public class CustomizedCrosspointsTraverser extends HugeTraverser { + private final EdgeRecord edgeResults; + public CustomizedCrosspointsTraverser(HugeGraph graph) { super(graph); + this.edgeResults = new EdgeRecord(false); + } + + private static CrosspointsPaths intersectionPaths(List sources, + List paths, + long limit) { + // Split paths by end vertices + MultivaluedMap endVertices = newMultivalueMap(); + for (Path path : paths) { + List vertices = path.vertices(); + int length = vertices.size(); + endVertices.add(vertices.get(0), vertices.get(length - 1)); + } + + Set sourceIds = sources.stream().map(HugeVertex::id) + .collect(Collectors.toSet()); + Set ids = endVertices.keySet(); + if (sourceIds.size() != ids.size() || !sourceIds.containsAll(ids)) { + return CrosspointsPaths.EMPTY; + } + + // Get intersection of end vertices + Collection intersection = null; + for (List ends : endVertices.values()) { + if (intersection == null) { + intersection = ends; + } else { + intersection = CollectionUtil.intersect(intersection, ends); + } + if (intersection == null || intersection.isEmpty()) { + return CrosspointsPaths.EMPTY; + } + } + assert intersection != null; + // Limit intersection number to limit crosspoints vertices in result + int size = intersection.size(); + if (limit != NO_LIMIT && size > limit) { + intersection = newList(intersection).subList(0, size - 1); + } + + // Filter intersection paths + List results = newList(); + for (Path path : paths) { + List vertices = path.vertices(); + int length = vertices.size(); + if (intersection.contains(vertices.get(length - 1))) { + results.add(path); + } + } + return new CrosspointsPaths(newSet(intersection), results); + } + + public EdgeRecord edgeResults() { + return edgeResults; } public CrosspointsPaths crosspointsPaths(Iterator vertices, @@ -64,6 +120,8 @@ public CrosspointsPaths crosspointsPaths(Iterator vertices, initialSources.add(vertex.id(), node); } List paths = newList(); + long edgeCount = 0L; + long vertexCount = 0L; for (PathPattern pathPattern : pathPatterns) { MultivaluedMap sources = initialSources; @@ -79,9 +137,14 @@ public CrosspointsPaths crosspointsPaths(Iterator vertices, for (Map.Entry> entry : sources.entrySet()) { List adjacency = newList(); edges = this.edgesOfVertex(entry.getKey(), step.edgeStep); + vertexCount += 1; while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); + edgeCount += 1; Id target = edge.id().otherVertexId(); + + this.edgeResults.addEdge(entry.getKey(), target, edge); + for (Node n : entry.getValue()) { // If have loop, skip target if (n.contains(target)) { @@ -104,67 +167,21 @@ public CrosspointsPaths crosspointsPaths(Iterator vertices, sources = newVertices; } assert stepNum == 0; + assert newVertices != null; for (List nodes : newVertices.values()) { for (Node n : nodes) { paths.add(new Path(n.path())); } } } + this.vertexIterCounter.addAndGet(vertexCount); + this.edgeIterCounter.addAndGet(edgeCount); return intersectionPaths(verticesList, paths, limit); } - private static CrosspointsPaths intersectionPaths(List sources, - List paths, - long limit) { - // Split paths by end vertices - MultivaluedMap endVertices = newMultivalueMap(); - for (Path path : paths) { - List vertices = path.vertices(); - int length = vertices.size(); - endVertices.add(vertices.get(0), vertices.get(length - 1)); - } - - Set sourceIds = sources.stream().map(HugeVertex::id) - .collect(Collectors.toSet()); - Set ids = endVertices.keySet(); - if (sourceIds.size() != ids.size() || !sourceIds.containsAll(ids)) { - return CrosspointsPaths.EMPTY; - } - - // Get intersection of end vertices - Collection intersection = null; - for (List ends : endVertices.values()) { - if (intersection == null) { - intersection = ends; - } else { - intersection = CollectionUtil.intersect(intersection, ends); - } - if (intersection == null || intersection.isEmpty()) { - return CrosspointsPaths.EMPTY; - } - } - assert intersection != null; - // Limit intersection number to limit crosspoints vertices in result - int size = intersection.size(); - if (limit != NO_LIMIT && size > limit) { - intersection = newList(intersection).subList(0, size - 1); - } - - // Filter intersection paths - List results = newList(); - for (Path path : paths) { - List vertices = path.vertices(); - int length = vertices.size(); - if (intersection.contains(vertices.get(length - 1))) { - results.add(path); - } - } - return new CrosspointsPaths(newSet(intersection), results); - } - public static class PathPattern { - private List steps; + private final List steps; public PathPattern() { this.steps = newList(); @@ -201,8 +218,8 @@ public static class CrosspointsPaths { ImmutableSet.of(), ImmutableList.of() ); - private Set crosspoints; - private List paths; + private final Set crosspoints; + private final List paths; public CrosspointsPaths(Set crosspoints, List paths) { this.crosspoints = crosspoints; diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java index b39ea009ff..b322167c28 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java @@ -22,27 +22,27 @@ import java.util.Map; import java.util.Set; -import jakarta.ws.rs.core.MultivaluedHashMap; -import jakarta.ws.rs.core.MultivaluedMap; - import org.apache.commons.lang3.mutable.MutableInt; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.schema.EdgeLabel; +import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.type.define.Frequency; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.apache.hugegraph.structure.HugeEdge; -import org.apache.hugegraph.structure.HugeVertex; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.InsertionOrderUtil; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; + public class FusiformSimilarityTraverser extends HugeTraverser { private long accessed = 0L; @@ -51,6 +51,20 @@ public FusiformSimilarityTraverser(HugeGraph graph) { super(graph); } + private static void checkGroupArgs(String groupProperty, int minGroups) { + if (groupProperty == null) { + E.checkArgument(minGroups == 0, + "Can't set min group count when " + + "group property not set"); + } else { + E.checkArgument(!groupProperty.isEmpty(), + "The group property can't be empty"); + E.checkArgument(minGroups > 0, + "Must set min group count when " + + "group property set"); + } + } + public SimilarsMap fusiformSimilarity(Iterator vertices, Directions direction, String label, int minNeighbors, double alpha, @@ -69,10 +83,10 @@ public SimilarsMap fusiformSimilarity(Iterator vertices, HugeVertex vertex = (HugeVertex) vertices.next(); // Find fusiform similarity for current vertex Set result = this.fusiformSimilarityForVertex( - vertex, direction, label, - minNeighbors, alpha, minSimilars, top, - groupProperty, minGroups, degree, capacity, - withIntermediary); + vertex, direction, label, + minNeighbors, alpha, minSimilars, top, + groupProperty, minGroups, degree, capacity, + withIntermediary); if (result.isEmpty()) { continue; } @@ -87,11 +101,11 @@ public SimilarsMap fusiformSimilarity(Iterator vertices, } private Set fusiformSimilarityForVertex( - HugeVertex vertex, Directions direction, - String label, int minNeighbors, double alpha, - int minSimilars, int top, String groupProperty, - int minGroups, long degree, long capacity, - boolean withIntermediary) { + HugeVertex vertex, Directions direction, + String label, int minNeighbors, double alpha, + int minSimilars, int top, String groupProperty, + int minGroups, long degree, long capacity, + boolean withIntermediary) { boolean matched = this.matchMinNeighborCount(vertex, direction, label, minNeighbors, degree); if (!matched) { @@ -105,6 +119,7 @@ private Set fusiformSimilarityForVertex( Map similars = newMap(); MultivaluedMap intermediaries = new MultivaluedHashMap<>(); Set neighbors = newIdSet(); + long vertexCount = 1L; while (edges.hasNext()) { Id target = ((HugeEdge) edges.next()).id().otherVertexId(); if (neighbors.contains(target)) { @@ -116,6 +131,7 @@ private Set fusiformSimilarityForVertex( Directions backDir = direction.opposite(); Iterator backEdges = this.edgesOfVertex(target, backDir, labelId, degree); + vertexCount += 1L; Set currentSimilars = newIdSet(); while (backEdges.hasNext()) { Id node = ((HugeEdge) backEdges.next()).id().otherVertexId(); @@ -137,6 +153,9 @@ private Set fusiformSimilarityForVertex( count.increment(); } } + this.edgeIterCounter.addAndGet(this.accessed); + this.vertexIterCounter.addAndGet(vertexCount); + // Delete source vertex assert similars.containsKey(vertex.id()); similars.remove(vertex.id()); @@ -189,20 +208,6 @@ private Set fusiformSimilarityForVertex( return result; } - private static void checkGroupArgs(String groupProperty, int minGroups) { - if (groupProperty == null) { - E.checkArgument(minGroups == 0, - "Can't set min group count when " + - "group property not set"); - } else { - E.checkArgument(!groupProperty.isEmpty(), - "The group property can't be empty"); - E.checkArgument(minGroups > 0, - "Must set min group count when " + - "group property set"); - } - } - private boolean matchMinNeighborCount(HugeVertex vertex, Directions direction, String label, @@ -249,7 +254,7 @@ public Similar(Id id, double score, List intermediaries) { this.id = id; this.score = score; assert newSet(intermediaries).size() == intermediaries.size() : - "Invalid intermediaries"; + "Invalid intermediaries"; this.intermediaries = intermediaries; } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java index 21344e6b2a..c0d36f31bd 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java @@ -19,15 +19,16 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; - -import jakarta.ws.rs.core.MultivaluedHashMap; -import jakarta.ws.rs.core.MultivaluedMap; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; import org.apache.hugegraph.HugeException; @@ -39,39 +40,38 @@ import org.apache.hugegraph.backend.query.QueryResults; import org.apache.hugegraph.backend.tx.GraphTransaction; import org.apache.hugegraph.config.CoreOptions; -import org.apache.hugegraph.schema.SchemaLabel; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; -import org.apache.hugegraph.type.HugeType; -import org.apache.hugegraph.type.define.CollectionType; -import org.apache.hugegraph.type.define.Directions; -import org.apache.hugegraph.type.define.HugeKeys; -import org.apache.hugegraph.util.collection.CollectionFactory; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.slf4j.Logger; - import org.apache.hugegraph.exception.NotFoundException; import org.apache.hugegraph.iterator.ExtendableIterator; import org.apache.hugegraph.iterator.FilterIterator; import org.apache.hugegraph.iterator.LimitIterator; import org.apache.hugegraph.iterator.MapperIterator; import org.apache.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.schema.SchemaLabel; import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.traversal.optimize.TraversalUtil; +import org.apache.hugegraph.type.HugeType; +import org.apache.hugegraph.type.define.CollectionType; +import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.type.define.HugeKeys; import org.apache.hugegraph.util.CollectionUtil; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.util.collection.CollectionFactory; +import org.apache.hugegraph.util.collection.ObjectIntMapping; +import org.apache.hugegraph.util.collection.ObjectIntMappingFactory; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -public class HugeTraverser { - - protected static final Logger LOG = Log.logger(HugeTraverser.class); - - private HugeGraph graph; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; - private static CollectionFactory collectionFactory; +public class HugeTraverser { public static final String DEFAULT_CAPACITY = "10000000"; public static final String DEFAULT_ELEMENTS_LIMIT = "10000000"; @@ -82,13 +82,16 @@ public class HugeTraverser { public static final String DEFAULT_SAMPLE = "100"; public static final String DEFAULT_WEIGHT = "0"; public static final int DEFAULT_MAX_DEPTH = 5000; - - protected static final int MAX_VERTICES = 10; - // Empirical value of scan limit, with which results can be returned in 3s public static final String DEFAULT_PAGE_LIMIT = "100000"; - public static final long NO_LIMIT = -1L; + protected static final Logger LOG = Log.logger(HugeTraverser.class); + protected static final int MAX_VERTICES = 10; + private static CollectionFactory collectionFactory; + private final HugeGraph graph; + // for apimeasure + public AtomicLong edgeIterCounter = new AtomicLong(0); + public AtomicLong vertexIterCounter = new AtomicLong(0); public HugeTraverser(HugeGraph graph) { this.graph = graph; @@ -97,6 +100,178 @@ public HugeTraverser(HugeGraph graph) { } } + public static void checkDegree(long degree) { + checkPositiveOrNoLimit(degree, "max degree"); + } + + public static void checkCapacity(long capacity) { + checkPositiveOrNoLimit(capacity, "capacity"); + } + + public static void checkLimit(long limit) { + checkPositiveOrNoLimit(limit, "limit"); + } + + public static void checkPositive(long value, String name) { + E.checkArgument(value > 0, + "The %s parameter must be > 0, but got %s", + name, value); + } + + public static void checkPositiveOrNoLimit(long value, String name) { + E.checkArgument(value > 0L || value == NO_LIMIT, + "The %s parameter must be > 0 or == %s, but got: %s", + name, NO_LIMIT, value); + } + + public static void checkNonNegative(long value, String name) { + E.checkArgument(value >= 0L, + "The %s parameter must be >= 0, but got: %s", + name, value); + } + + public static void checkNonNegativeOrNoLimit(long value, String name) { + E.checkArgument(value >= 0L || value == NO_LIMIT, + "The %s parameter must be >= 0 or == %s, but got: %s", + name, NO_LIMIT, value); + } + + public static void checkCapacity(long capacity, long access, + String traverse) { + if (capacity != NO_LIMIT && access > capacity) { + throw new HugeException("Exceed capacity '%s' while finding %s", + capacity, traverse); + } + } + + public static void checkSkipDegree(long skipDegree, long degree, + long capacity) { + E.checkArgument(skipDegree >= 0L && + skipDegree <= Query.DEFAULT_CAPACITY, + "The skipped degree must be in [0, %s], but got '%s'", + Query.DEFAULT_CAPACITY, skipDegree); + if (capacity != NO_LIMIT) { + E.checkArgument(degree != NO_LIMIT && degree < capacity, + "The max degree must be < capacity"); + E.checkArgument(skipDegree < capacity, + "The skipped degree must be < capacity"); + } + if (skipDegree > 0L) { + E.checkArgument(degree != NO_LIMIT && skipDegree >= degree, + "The skipped degree must be >= max degree, " + + "but got skipped degree '%s' and max degree '%s'", + skipDegree, degree); + } + } + + public static > Map topN( + Map map, + boolean sorted, + long limit) { + if (sorted) { + map = CollectionUtil.sortByValue(map, false); + } + if (limit == NO_LIMIT || map.size() <= limit) { + return map; + } + Map results = InsertionOrderUtil.newMap(); + long count = 0L; + for (Map.Entry entry : map.entrySet()) { + results.put(entry.getKey(), entry.getValue()); + if (++count >= limit) { + break; + } + } + return results; + } + + public static Iterator skipSuperNodeIfNeeded(Iterator edges, + long degree, + long skipDegree) { + if (skipDegree <= 0L) { + return edges; + } + List edgeList = newList(); + for (int i = 1; edges.hasNext(); i++) { + Edge edge = edges.next(); + if (i <= degree) { + edgeList.add(edge); + } + if (i >= skipDegree) { + return QueryResults.emptyIterator(); + } + } + return edgeList.iterator(); + } + + protected static Set newIdSet() { + return collectionFactory.newIdSet(); + } + + protected static Set newSet() { + return newSet(false); + } + + protected static Set newSet(boolean concurrent) { + if (concurrent) { + return ConcurrentHashMap.newKeySet(); + } else { + return collectionFactory.newSet(); + } + } + + protected static Set newSet(int initialCapacity) { + return collectionFactory.newSet(initialCapacity); + } + + protected static Set newSet(Collection collection) { + return collectionFactory.newSet(collection); + } + + protected static List newList() { + return collectionFactory.newList(); + } + + protected static List newList(int initialCapacity) { + return collectionFactory.newList(initialCapacity); + } + + protected static List newList(Collection collection) { + return collectionFactory.newList(collection); + } + + protected static Map newMap() { + return collectionFactory.newMap(); + } + + protected static Map newMap(int initialCapacity) { + return collectionFactory.newMap(initialCapacity); + } + + protected static MultivaluedMap newMultivalueMap() { + return new MultivaluedHashMap<>(); + } + + protected static List joinPath(Node prev, Node back, boolean ring) { + // Get self path + List path = prev.path(); + + // Get reversed other path + List backPath = back.path(); + Collections.reverse(backPath); + + if (!ring) { + // Avoid loop in path + if (CollectionUtils.containsAny(path, backPath)) { + return ImmutableList.of(); + } + } + + // Append other path behind self path + path.addAll(backPath); + return path; + } + public HugeGraph graph() { return this.graph; } @@ -157,6 +332,15 @@ protected Set adjacentVertices(Id source, EdgeStep step) { return neighbors; } + protected Iterator adjacentVertices(Id source, Directions dir, + List labels, long limit) { + Iterator edges = this.edgesOfVertex(source, dir, labels, limit); + return new MapperIterator<>(edges, e -> { + HugeEdge edge = (HugeEdge) e; + return edge.id().otherVertexId(); + }); + } + @Watched protected Iterator edgesOfVertex(Id source, Directions dir, Id label, long limit) { @@ -189,9 +373,26 @@ protected Iterator edgesOfVertex(Id source, Directions dir, } long[] count = new long[1]; - return new LimitIterator<>(results, e -> { - return count[0]++ >= limit; - }); + return new LimitIterator<>(results, e -> count[0]++ >= limit); + } + + protected Iterator edgesOfVertex(Id source, Directions dir, + List labels, long limit) { + if (labels == null || labels.isEmpty()) { + return this.edgesOfVertex(source, dir, (Id) null, limit); + } + ExtendableIterator results = new ExtendableIterator<>(); + for (Id label : labels) { + E.checkNotNull(label, "edge label"); + results.extend(this.edgesOfVertex(source, dir, label, limit)); + } + + if (limit == NO_LIMIT) { + return results; + } + + long[] count = new long[1]; + return new LimitIterator<>(results, e -> count[0]++ >= limit); } protected Iterator edgesOfVertex(Id source, EdgeStep edgeStep) { @@ -253,7 +454,7 @@ private void fillFilterBySortKeys(Query query, Id[] edgeLabels, if (!GraphTransaction.matchFullEdgeSortKeys(condQuery, this.graph())) { Id label = condQuery.condition(HugeKeys.LABEL); E.checkArgument(false, "The properties %s does not match " + - "sort keys of edge label '%s'", + "sort keys of edge label '%s'", this.graph().mapPkId2Name(properties.keySet()), this.graph().edgeLabel(label).name()); } @@ -308,182 +509,10 @@ protected void checkVertexExist(Id vertexId, String name) { this.graph.vertex(vertexId); } catch (NotFoundException e) { throw new IllegalArgumentException(String.format( - "The %s with id '%s' does not exist", name, vertexId), e); - } - } - - public static void checkDegree(long degree) { - checkPositiveOrNoLimit(degree, "max degree"); - } - - public static void checkCapacity(long capacity) { - checkPositiveOrNoLimit(capacity, "capacity"); - } - - public static void checkLimit(long limit) { - checkPositiveOrNoLimit(limit, "limit"); - } - - public static void checkPositive(long value, String name) { - E.checkArgument(value > 0, - "The %s parameter must be > 0, but got %s", - name, value); - } - - public static void checkPositiveOrNoLimit(long value, String name) { - E.checkArgument(value > 0L || value == NO_LIMIT, - "The %s parameter must be > 0 or == %s, but got: %s", - name, NO_LIMIT, value); - } - - public static void checkNonNegative(long value, String name) { - E.checkArgument(value >= 0L, - "The %s parameter must be >= 0, but got: %s", - name, value); - } - - public static void checkNonNegativeOrNoLimit(long value, String name) { - E.checkArgument(value >= 0L || value == NO_LIMIT, - "The %s parameter must be >= 0 or == %s, but got: %s", - name, NO_LIMIT, value); - } - - public static void checkCapacity(long capacity, long access, - String traverse) { - if (capacity != NO_LIMIT && access > capacity) { - throw new HugeException("Exceed capacity '%s' while finding %s", - capacity, traverse); - } - } - - public static void checkSkipDegree(long skipDegree, long degree, - long capacity) { - E.checkArgument(skipDegree >= 0L && - skipDegree <= Query.DEFAULT_CAPACITY, - "The skipped degree must be in [0, %s], but got '%s'", - Query.DEFAULT_CAPACITY, skipDegree); - if (capacity != NO_LIMIT) { - E.checkArgument(degree != NO_LIMIT && degree < capacity, - "The max degree must be < capacity"); - E.checkArgument(skipDegree < capacity, - "The skipped degree must be < capacity"); - } - if (skipDegree > 0L) { - E.checkArgument(degree != NO_LIMIT && skipDegree >= degree, - "The skipped degree must be >= max degree, " + - "but got skipped degree '%s' and max degree '%s'", - skipDegree, degree); - } - } - - public static > Map topN( - Map map, - boolean sorted, - long limit) { - if (sorted) { - map = CollectionUtil.sortByValue(map, false); - } - if (limit == NO_LIMIT || map.size() <= limit) { - return map; - } - Map results = InsertionOrderUtil.newMap(); - long count = 0L; - for (Map.Entry entry : map.entrySet()) { - results.put(entry.getKey(), entry.getValue()); - if (++count >= limit) { - break; - } - } - return results; - } - - public static Iterator skipSuperNodeIfNeeded(Iterator edges, - long degree, - long skipDegree) { - if (skipDegree <= 0L) { - return edges; - } - List edgeList = newList(); - for (int i = 1; edges.hasNext(); i++) { - Edge edge = edges.next(); - if (i <= degree) { - edgeList.add(edge); - } - if (i >= skipDegree) { - return QueryResults.emptyIterator(); - } - } - return edgeList.iterator(); - } - - protected static Set newIdSet() { - return collectionFactory.newIdSet(); - } - - protected static Set newSet() { - return newSet(false); - } - - protected static Set newSet(boolean concurrent) { - if (concurrent) { - return ConcurrentHashMap.newKeySet(); - } else { - return collectionFactory.newSet(); + "The %s with id '%s' does not exist", name, vertexId), e); } } - protected static Set newSet(int initialCapacity) { - return collectionFactory.newSet(initialCapacity); - } - - protected static Set newSet(Collection collection) { - return collectionFactory.newSet(collection); - } - - protected static List newList() { - return collectionFactory.newList(); - } - - protected static List newList(int initialCapacity) { - return collectionFactory.newList(initialCapacity); - } - - protected static List newList(Collection collection) { - return collectionFactory.newList(collection); - } - - protected static Map newMap() { - return collectionFactory.newMap(); - } - - protected static Map newMap(int initialCapacity) { - return collectionFactory.newMap(initialCapacity); - } - - protected static MultivaluedMap newMultivalueMap() { - return new MultivaluedHashMap<>(); - } - - protected static List joinPath(Node prev, Node back, boolean ring) { - // Get self path - List path = prev.path(); - - // Get reversed other path - List backPath = back.path(); - Collections.reverse(backPath); - - if (!ring) { - // Avoid loop in path - if (CollectionUtils.containsAny(path, backPath)) { - return ImmutableList.of(); - } - } - - // Append other path behind self path - path.addAll(backPath); - return path; - } - public static class Node { private final Id id; @@ -560,6 +589,7 @@ public static class Path { private final Id crosspoint; private final List vertices; + private Set edges = Collections.emptySet(); public Path(List vertices) { this(null, vertices); @@ -570,6 +600,19 @@ public Path(Id crosspoint, List vertices) { this.vertices = vertices; } + public Path(List vertices, Set edges) { + this(null, vertices); + this.edges = edges; + } + + public Set getEdges() { + return edges; + } + + public void setEdges(Set edges) { + this.edges = edges; + } + public Id crosspoint() { return this.crosspoint; } @@ -615,6 +658,7 @@ public int hashCode() { * Compares the specified object with this path for equality. * Returns true if and only if both have same vertices list * without regard of crosspoint. + * * @param other the object to be compared for equality with this path * @return true if the specified object is equal to this path */ @@ -638,6 +682,13 @@ public static class PathSet implements Set { private final Set paths; + private Set edges = Collections.emptySet(); + + public PathSet(Set paths, Set edges) { + this(paths); + this.edges = edges; + } + public PathSet() { this(newSet()); } @@ -646,6 +697,18 @@ private PathSet(Set paths) { this.paths = paths; } + public Set getPaths() { + return this.paths; + } + + public Set getEdges() { + return edges; + } + + public void setEdges(Set edges) { + this.edges = edges; + } + @Override public boolean add(Path path) { return this.paths.add(path); @@ -729,7 +792,7 @@ public String toString() { } public void append(Id current) { - for (Iterator iter = paths.iterator(); iter.hasNext();) { + for (Iterator iter = paths.iterator(); iter.hasNext(); ) { Path path = iter.next(); if (path.vertices().contains(current)) { iter.remove(); @@ -739,4 +802,80 @@ public void append(Id current) { } } } + + public static class EdgeRecord { + private final Map edgeMap; + private final ObjectIntMapping idMapping; + + public EdgeRecord(boolean concurrent) { + this.edgeMap = new HashMap<>(); + this.idMapping = ObjectIntMappingFactory.newObjectIntMapping(concurrent); + } + + private static Long makeVertexPairIndex(int source, int target) { + return ((long) source & 0xFFFFFFFFL) | + (((long) target << 32) & 0xFFFFFFFF00000000L); + } + + public static Set getEdgeIds(Set edges) { + return edges.stream().map(edge -> ((HugeEdge) edge).id()).collect(Collectors.toSet()); + } + + private int code(Id id) { + if (id.number()) { + long l = id.asLong(); + if (0 <= l && l <= Integer.MAX_VALUE) { + return (int) l; + } + } + int code = this.idMapping.object2Code(id); + assert code > 0; + return -code; + } + + public void addEdge(Id source, Id target, Edge edge) { + Long index = makeVertexPairIndex(this.code(source), this.code(target)); + this.edgeMap.put(index, edge); + } + + private Edge getEdge(Id source, Id target) { + Long index = makeVertexPairIndex(this.code(source), this.code(target)); + return this.edgeMap.get(index); + } + + public Set getEdges(HugeTraverser.Path path) { + if (path == null || path.vertices().isEmpty()) { + return new HashSet<>(); + } + Iterator vertexIter = path.vertices().iterator(); + return getEdges(vertexIter); + } + + public Set getEdges(Collection paths) { + Set edgeIds = new HashSet<>(); + for (HugeTraverser.Path path : paths) { + edgeIds.addAll(getEdges(path)); + } + return edgeIds; + } + + public Set getEdges(Iterator vertexIter) { + Set edges = new HashSet<>(); + Id first = vertexIter.next(); + Id second; + while (vertexIter.hasNext()) { + second = vertexIter.next(); + Edge edge = getEdge(first, second); + if (edge == null) { + edge = getEdge(second, first); + } + if (edge != null) { + edges.add(edge); + } + first = second; + } + return edges; + } + + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java index 240792abe2..a5539cd0f6 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java @@ -27,10 +27,10 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; - import org.apache.hugegraph.util.CollectionUtil; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; + import com.google.common.collect.ImmutableMap; public class JaccardSimilarTraverser extends OltpTraverser { @@ -39,6 +39,12 @@ public JaccardSimilarTraverser(HugeGraph graph) { super(graph); } + private static void reachCapacity(long count, long capacity) { + if (capacity != NO_LIMIT && count > capacity) { + throw new HugeException("Reach capacity '%s'", capacity); + } + } + public double jaccardSimilarity(Id vertex, Id other, Directions dir, String label, long degree) { E.checkNotNull(vertex, "vertex id"); @@ -51,9 +57,14 @@ public double jaccardSimilarity(Id vertex, Id other, Directions dir, Id labelId = this.getEdgeLabelId(label); Set sourceNeighbors = IteratorUtils.set(this.adjacentVertices( - vertex, dir, labelId, degree)); + vertex, dir, labelId, degree)); Set targetNeighbors = IteratorUtils.set(this.adjacentVertices( - other, dir, labelId, degree)); + other, dir, labelId, degree)); + + this.vertexIterCounter.addAndGet(2L); + this.edgeIterCounter.addAndGet(sourceNeighbors.size()); + this.edgeIterCounter.addAndGet(targetNeighbors.size()); + return jaccardSimilarity(sourceNeighbors, targetNeighbors); } @@ -96,6 +107,10 @@ public Map jaccardSimilarsConcurrent(Id source, EdgeStep step, // Query neighbors Set layer1s = this.adjacentVertices(source, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer1s.size()); + reachCapacity(count.get() + layer1s.size(), capacity); count.addAndGet(layer1s.size()); if (layer1s.isEmpty()) { @@ -111,6 +126,10 @@ public Map jaccardSimilarsConcurrent(Id source, EdgeStep step, return; } Set layer2s = this.adjacentVertices(id, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer2s.size()); + if (layer2s.isEmpty()) { results.put(id, 0.0D); } @@ -130,6 +149,10 @@ public Map jaccardSimilarsConcurrent(Id source, EdgeStep step, return; } Set layer3s = this.adjacentVertices(id, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer3s.size()); + reachCapacity(count.get() + layer3s.size(), capacity); if (layer3s.isEmpty()) { results.put(id, 0.0D); @@ -152,6 +175,10 @@ public Map jaccardSimilarsSingle(Id source, EdgeStep step, // Query neighbors Set layer1s = this.adjacentVertices(source, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer1s.size()); + reachCapacity(count + layer1s.size(), capacity); count += layer1s.size(); if (layer1s.isEmpty()) { @@ -168,6 +195,10 @@ public Map jaccardSimilarsSingle(Id source, EdgeStep step, continue; } layer2s = this.adjacentVertices(neighbor, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer2s.size()); + if (layer2s.isEmpty()) { results.put(neighbor, 0.0D); continue; @@ -188,6 +219,10 @@ public Map jaccardSimilarsSingle(Id source, EdgeStep step, continue; } layer3s = this.adjacentVertices(neighbor, step); + + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(layer3s.size()); + reachCapacity(count + layer3s.size(), capacity); if (layer3s.isEmpty()) { results.put(neighbor, 0.0D); @@ -201,10 +236,4 @@ public Map jaccardSimilarsSingle(Id source, EdgeStep step, return results; } - - private static void reachCapacity(long count, long capacity) { - if (capacity != NO_LIMIT && count > capacity) { - throw new HugeException("Reach capacity '%s'", capacity); - } - } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java index c9381cd423..b3ae29ac8f 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java @@ -23,13 +23,12 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KneighborRecords; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.structure.Edge; - -import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; public class KneighborTraverser extends OltpTraverser { @@ -53,12 +52,15 @@ public Set kneighbor(Id sourceV, Directions dir, Set all = newSet(); latest.add(sourceV); + this.vertexIterCounter.addAndGet(1L); while (depth-- > 0) { long remaining = limit == NO_LIMIT ? NO_LIMIT : limit - all.size(); latest = this.adjacentVertices(sourceV, latest, dir, labelId, all, degree, remaining); all.addAll(latest); + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(latest.size()); if (reachLimit(limit, all.size())) { break; } @@ -84,9 +86,15 @@ public KneighborRecords customizedKneighbor(Id source, EdgeStep step, return; } Iterator edges = edgesOfVertex(v, step); + this.vertexIterCounter.addAndGet(1L); while (!this.reachLimit(limit, records.size()) && edges.hasNext()) { - Id target = ((HugeEdge) edges.next()).id().otherVertexId(); + HugeEdge edge = (HugeEdge) edges.next(); + Id target = edge.id().otherVertexId(); records.addPath(v, target); + + records.edgeResults().addEdge(v, target, edge); + + this.edgeIterCounter.addAndGet(1L); } }; diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java index 2c268c94b4..9f40be8fbd 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java @@ -24,13 +24,12 @@ import org.apache.hugegraph.HugeException; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KoutRecords; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.structure.Edge; - -import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; public class KoutTraverser extends OltpTraverser { @@ -66,6 +65,7 @@ public Set kout(Id sourceV, Directions dir, String label, long remaining = capacity == NO_LIMIT ? NO_LIMIT : capacity - latest.size(); + this.vertexIterCounter.addAndGet(1L); while (depth-- > 0) { // Just get limit nodes in last layer if limit < remaining capacity if (depth == 0 && limit != NO_LIMIT && @@ -80,14 +80,16 @@ public Set kout(Id sourceV, Directions dir, String label, latest = this.adjacentVertices(sourceV, latest, dir, labelId, null, degree, remaining); } + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(latest.size()); if (capacity != NO_LIMIT) { // Update 'remaining' value to record remaining capacity remaining -= latest.size(); if (remaining <= 0 && depth > 0) { throw new HugeException( - "Reach capacity '%s' while remaining depth '%s'", - capacity, depth); + "Reach capacity '%s' while remaining depth '%s'", + capacity, depth); } } } @@ -114,11 +116,17 @@ public KoutRecords customizedKout(Id source, EdgeStep step, return; } Iterator edges = edgesOfVertex(v, step); + this.vertexIterCounter.addAndGet(1L); while (!this.reachLimit(limit, depth[0], records.size()) && edges.hasNext()) { - Id target = ((HugeEdge) edges.next()).id().otherVertexId(); + HugeEdge edge = (HugeEdge) edges.next(); + Id target = edge.id().otherVertexId(); records.addPath(v, target); this.checkCapacity(capacity, records.accessed(), depth[0]); + + records.edgeResults().addEdge(v, target, edge); + + this.edgeIterCounter.addAndGet(1L); } }; @@ -136,8 +144,8 @@ private void checkCapacity(long capacity, long accessed, long depth) { } if (accessed >= capacity && depth > 0) { throw new HugeException( - "Reach capacity '%s' while remaining depth '%s'", - capacity, depth); + "Reach capacity '%s' while remaining depth '%s'", + capacity, depth); } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java index 493b97286d..aa498fa956 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java @@ -19,28 +19,55 @@ import java.util.Iterator; import java.util.List; +import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.CopyOnWriteArraySet; import java.util.function.Consumer; import org.apache.commons.lang3.tuple.Pair; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.apache.hugegraph.structure.HugeVertex; -import org.apache.hugegraph.util.E; - public class MultiNodeShortestPathTraverser extends OltpTraverser { public MultiNodeShortestPathTraverser(HugeGraph graph) { super(graph); } - public List multiNodeShortestPath(Iterator vertices, - EdgeStep step, int maxDepth, - long capacity) { + private static void cmn(List all, int m, int n, int current, + List result, Consumer> consumer) { + assert m <= all.size(); + assert current <= all.size(); + if (result == null) { + result = newList(n); + } + if (n == 0) { + // All n items are selected + consumer.accept(result); + return; + } + if (m < n || current >= all.size()) { + return; + } + + // Select current item, continue to select C(m-1, n-1) + int index = result.size(); + result.add(all.get(current)); + cmn(all, m - 1, n - 1, ++current, result, consumer); + // Not select current item, continue to select C(m-1, n) + result.remove(index); + cmn(all, m - 1, n, current, result, consumer); + } + + public WrappedListPath multiNodeShortestPath(Iterator vertices, + EdgeStep step, int maxDepth, + long capacity) { List vertexList = IteratorUtils.list(vertices); int vertexCount = vertexList.size(); E.checkState(vertexCount >= 2 && vertexCount <= MAX_VERTICES, @@ -56,70 +83,70 @@ public List multiNodeShortestPath(Iterator vertices, }); if (maxDepth >= this.concurrentDepth() && vertexCount > 10) { - return this.multiNodeShortestPathConcurrent(pairs, step, - maxDepth, capacity); + return this.multiNodeShortestPathConcurrent(pairs, step, maxDepth, capacity); } else { - return this.multiNodeShortestPathSingle(pairs, step, - maxDepth, capacity); + return this.multiNodeShortestPathSingle(pairs, step, maxDepth, capacity); } } - public List multiNodeShortestPathConcurrent(List> pairs, - EdgeStep step, - int maxDepth, - long capacity) { - List results = new CopyOnWriteArrayList<>(); + public WrappedListPath multiNodeShortestPathConcurrent(List> pairs, + EdgeStep step, int maxDepth, + long capacity) { + List paths = new CopyOnWriteArrayList<>(); + Set edges = new CopyOnWriteArraySet<>(); ShortestPathTraverser traverser = - new ShortestPathTraverser(this.graph()); + new ShortestPathTraverser(this.graph()); this.traversePairs(pairs.iterator(), pair -> { Path path = traverser.shortestPath(pair.getLeft(), pair.getRight(), step, maxDepth, capacity); if (!Path.EMPTY.equals(path)) { - results.add(path); + paths.add(path); } + edges.addAll(path.getEdges()); }); + this.vertexIterCounter.addAndGet(traverser.vertexIterCounter.get()); + this.edgeIterCounter.addAndGet(traverser.edgeIterCounter.get()); - return results; + return new WrappedListPath(paths, edges); } - public List multiNodeShortestPathSingle(List> pairs, - EdgeStep step, int maxDepth, - long capacity) { - List results = newList(); + public WrappedListPath multiNodeShortestPathSingle(List> pairs, + EdgeStep step, int maxDepth, + long capacity) { + List paths = newList(); + Set edges = newSet(); ShortestPathTraverser traverser = - new ShortestPathTraverser(this.graph()); + new ShortestPathTraverser(this.graph()); for (Pair pair : pairs) { Path path = traverser.shortestPath(pair.getLeft(), pair.getRight(), step, maxDepth, capacity); if (!Path.EMPTY.equals(path)) { - results.add(path); + paths.add(path); } + edges.addAll(path.getEdges()); } - return results; + this.vertexIterCounter.addAndGet(traverser.vertexIterCounter.get()); + this.edgeIterCounter.addAndGet(traverser.edgeIterCounter.get()); + + return new WrappedListPath(paths, edges); } - private static void cmn(List all, int m, int n, int current, - List result, Consumer> consumer) { - assert m <= all.size(); - assert current <= all.size(); - if (result == null) { - result = newList(n); - } - if (n == 0) { - // All n items are selected - consumer.accept(result); - return; + public static class WrappedListPath { + + private final List paths; + private final Set edges; + + public WrappedListPath(List paths, Set edges) { + this.paths = paths; + this.edges = edges; } - if (m < n || current >= all.size()) { - return; + + public List paths() { + return paths; } - // Select current item, continue to select C(m-1, n-1) - int index = result.size(); - result.add(all.get(current)); - cmn(all, m - 1, n - 1, ++current, result, consumer); - // Not select current item, continue to select C(m-1, n) - result.remove(index); - cmn(all, m - 1, n, current, result, consumer); + public Set edges() { + return edges; + } } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java index 7ae281640d..ac98872c41 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java @@ -17,6 +17,8 @@ package org.apache.hugegraph.traversal.algorithm; +import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; + import java.util.Collection; import java.util.Iterator; import java.util.List; @@ -25,21 +27,18 @@ import java.util.function.BiConsumer; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser.EdgeRecord; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.traversal.algorithm.strategy.TraverseStrategy; import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.hugegraph.structure.HugeEdge; - -import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; - public abstract class PathTraverser { protected final HugeTraverser traverser; - - protected int stepCount; protected final long capacity; protected final long limit; + protected int stepCount; protected int totalSteps; // TODO: delete or implement abstract method protected Map> sources; @@ -52,10 +51,11 @@ public abstract class PathTraverser { protected Set paths; protected TraverseStrategy traverseStrategy; + protected EdgeRecord edgeResults; public PathTraverser(HugeTraverser traverser, TraverseStrategy strategy, Collection sources, Collection targets, - long capacity, long limit) { + long capacity, long limit, boolean concurrent) { this.traverser = traverser; this.traverseStrategy = strategy; @@ -79,6 +79,8 @@ public PathTraverser(HugeTraverser traverser, TraverseStrategy strategy, this.targetsAll.putAll(this.targets); this.paths = this.newPathSet(); + + this.edgeResults = new EdgeRecord(concurrent); } public void forward() { @@ -145,9 +147,13 @@ private void traverseOne(Id v, EdgeStep step, boolean forward) { while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); + this.traverser.edgeIterCounter.addAndGet(1L); + + this.edgeResults.addEdge(v, target, edge); this.processOne(v, target, forward); } + this.traverser.vertexIterCounter.addAndGet(1L); } private void processOne(Id source, Id target, boolean forward) { @@ -205,10 +211,7 @@ protected boolean finished() { protected boolean reachLimit() { HugeTraverser.checkCapacity(this.capacity, this.accessedNodes(), "template paths"); - if (this.limit == NO_LIMIT || this.pathCount() < this.limit) { - return false; - } - return true; + return this.limit != NO_LIMIT && this.pathCount() >= this.limit; } protected int accessedNodes() { diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java index bdc9712c53..d8b256082d 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java @@ -21,13 +21,12 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.traversal.algorithm.records.PathsRecords; -import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.structure.Edge; - import org.apache.hugegraph.perf.PerfUtil.Watched; import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.traversal.algorithm.records.PathsRecords; +import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; public class PathsTraverser extends HugeTraverser { @@ -75,6 +74,8 @@ public PathSet paths(Id sourceV, Directions sourceDir, } traverser.backward(sourceV, targetDir); } + vertexIterCounter.addAndGet(traverser.vertexCounter); + edgeIterCounter.addAndGet(traverser.edgeCounter); return traverser.paths(); } @@ -88,6 +89,8 @@ private class Traverser { private final long limit; private final PathSet paths; + private long vertexCounter; + private long edgeCounter; public Traverser(Id sourceV, Id targetV, Id label, long degree, long capacity, long limit) { @@ -96,6 +99,8 @@ public Traverser(Id sourceV, Id targetV, Id label, this.degree = degree; this.capacity = capacity; this.limit = limit; + this.vertexCounter = 0L; + this.edgeCounter = 0L; this.paths = new PathSet(); } @@ -115,10 +120,11 @@ public void forward(Id targetV, Directions direction) { } edges = edgesOfVertex(vid, direction, this.label, this.degree); - + this.vertexCounter += 1L; while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); + this.edgeCounter += 1L; PathSet results = this.record.findPath(target, null, true, false); @@ -148,10 +154,11 @@ public void backward(Id sourceV, Directions direction) { } edges = edgesOfVertex(vid, direction, this.label, this.degree); - + this.vertexCounter += 1L; while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); + this.edgeCounter += 1L; PathSet results = this.record.findPath(target, null, true, false); @@ -175,5 +182,9 @@ private boolean reachLimit() { checkCapacity(this.capacity, this.record.accessed(), "paths"); return this.limit != NO_LIMIT && this.paths.size() >= this.limit; } + + public long accessed() { + return this.record.accessed(); + } } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java index a551eb7cc2..06c5bec275 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java @@ -17,15 +17,17 @@ package org.apache.hugegraph.traversal.algorithm; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; - import org.apache.hugegraph.util.CollectionUtil; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; public class SameNeighborTraverser extends HugeTraverser { @@ -46,11 +48,56 @@ public Set sameNeighbors(Id vertex, Id other, Directions direction, Id labelId = this.getEdgeLabelId(label); Set sourceNeighbors = IteratorUtils.set(this.adjacentVertices( - vertex, direction, labelId, degree)); + vertex, direction, labelId, degree)); Set targetNeighbors = IteratorUtils.set(this.adjacentVertices( - other, direction, labelId, degree)); + other, direction, labelId, degree)); Set sameNeighbors = (Set) CollectionUtil.intersect( - sourceNeighbors, targetNeighbors); + sourceNeighbors, targetNeighbors); + + this.vertexIterCounter.addAndGet(2L); + this.edgeIterCounter.addAndGet(sourceNeighbors.size()); + this.edgeIterCounter.addAndGet(targetNeighbors.size()); + + if (limit != NO_LIMIT) { + int end = Math.min(sameNeighbors.size(), limit); + sameNeighbors = CollectionUtil.subSet(sameNeighbors, 0, end); + } + return sameNeighbors; + } + + public Set sameNeighbors(List vertexIds, Directions direction, + List labels, long degree, int limit) { + E.checkNotNull(vertexIds, "vertex ids"); + E.checkArgument(vertexIds.size() >= 2, "vertex_list size can't " + + "be less than 2"); + for (Id id : vertexIds) { + this.checkVertexExist(id, "vertex"); + } + E.checkNotNull(direction, "direction"); + checkDegree(degree); + checkLimit(limit); + + List labelsId = new ArrayList<>(); + if (labels != null) { + for (String label : labels) { + labelsId.add(this.getEdgeLabelId(label)); + } + } + + Set sameNeighbors = new HashSet<>(); + for (int i = 0; i < vertexIds.size(); i++) { + Set vertexNeighbors = IteratorUtils.set(this.adjacentVertices( + vertexIds.get(i), direction, labelsId, degree)); + if (i == 0) { + sameNeighbors = vertexNeighbors; + } else { + sameNeighbors = (Set) CollectionUtil.intersect( + sameNeighbors, vertexNeighbors); + } + this.vertexIterCounter.addAndGet(1L); + this.edgeIterCounter.addAndGet(vertexNeighbors.size()); + } + if (limit != NO_LIMIT) { int end = Math.min(sameNeighbors.size(), limit); sameNeighbors = CollectionUtil.subSet(sameNeighbors, 0, end); diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java index e9584191f0..45ccdc6345 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java @@ -20,18 +20,19 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.ShortestPathRecords; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.apache.hugegraph.perf.PerfUtil.Watched; -import org.apache.hugegraph.structure.HugeEdge; -import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableList; public class ShortestPathTraverser extends HugeTraverser { @@ -81,7 +82,15 @@ public Path shortestPath(Id sourceV, Id targetV, Directions dir, checkCapacity(traverser.capacity, traverser.accessed(), "shortest path"); } - return paths.isEmpty() ? Path.EMPTY : paths.iterator().next(); + + this.vertexIterCounter.addAndGet(traverser.vertexCount); + this.edgeIterCounter.addAndGet(traverser.pathResults.accessed()); + + Path path = paths.isEmpty() ? Path.EMPTY : paths.iterator().next(); + + Set edges = traverser.edgeResults.getEdges(path); + path.setEdges(edges); + return path; } public Path shortestPath(Id sourceV, Id targetV, EdgeStep step, @@ -126,31 +135,40 @@ public PathSet allShortestPaths(Id sourceV, Id targetV, Directions dir, checkCapacity(traverser.capacity, traverser.accessed(), "shortest path"); } + + this.vertexIterCounter.addAndGet(traverser.vertexCount); + this.edgeIterCounter.addAndGet(traverser.pathResults.accessed()); + + paths.setEdges(traverser.edgeResults.getEdges(paths)); return paths; } private class Traverser { - private final ShortestPathRecords record; + private final ShortestPathRecords pathResults; + private final EdgeRecord edgeResults; private final Directions direction; private final Map labels; private final long degree; private final long skipDegree; private final long capacity; + private long vertexCount; public Traverser(Id sourceV, Id targetV, Directions dir, Map labels, long degree, long skipDegree, long capacity) { - this.record = new ShortestPathRecords(sourceV, targetV); + this.pathResults = new ShortestPathRecords(sourceV, targetV); + this.edgeResults = new EdgeRecord(false); this.direction = dir; this.labels = labels; this.degree = degree; this.skipDegree = skipDegree; this.capacity = capacity; + this.vertexCount = 0L; } public PathSet traverse(boolean all) { - return this.record.sourcesLessThanTargets() ? + return this.pathResults.sourcesLessThanTargets() ? this.forward(all) : this.backward(all); } @@ -162,21 +180,26 @@ public PathSet forward(boolean all) { PathSet results = new PathSet(); long degree = this.skipDegree > 0L ? this.skipDegree : this.degree; - this.record.startOneLayer(true); - while (this.record.hasNextKey()) { - Id source = this.record.nextKey(); + this.pathResults.startOneLayer(true); + while (this.pathResults.hasNextKey()) { + Id source = this.pathResults.nextKey(); Iterator edges = edgesOfVertex(source, this.direction, this.labels, degree); edges = skipSuperNodeIfNeeded(edges, this.degree, this.skipDegree); + + this.vertexCount += 1L; + while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); - PathSet paths = this.record.findPath(target, - t -> !this.superNode(t, this.direction), - all, false); + this.edgeResults.addEdge(source, target, edge); + + PathSet paths = this.pathResults.findPath(target, + t -> !this.superNode(t, this.direction), + all, false); if (paths.isEmpty()) { continue; @@ -186,9 +209,10 @@ public PathSet forward(boolean all) { return paths; } } + } - this.record.finishOneLayer(); + this.pathResults.finishOneLayer(); return results; } @@ -202,21 +226,26 @@ public PathSet backward(boolean all) { long degree = this.skipDegree > 0L ? this.skipDegree : this.degree; Directions opposite = this.direction.opposite(); - this.record.startOneLayer(false); - while (this.record.hasNextKey()) { - Id source = this.record.nextKey(); + this.pathResults.startOneLayer(false); + while (this.pathResults.hasNextKey()) { + Id source = this.pathResults.nextKey(); Iterator edges = edgesOfVertex(source, opposite, this.labels, degree); edges = skipSuperNodeIfNeeded(edges, this.degree, this.skipDegree); + + this.vertexCount += 1L; + while (edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); - PathSet paths = this.record.findPath(target, - t -> !this.superNode(t, opposite), - all, false); + this.edgeResults.addEdge(source, target, edge); + + PathSet paths = this.pathResults.findPath(target, + t -> !this.superNode(t, opposite), + all, false); if (paths.isEmpty()) { continue; @@ -229,7 +258,7 @@ public PathSet backward(boolean all) { } // Re-init targets - this.record.finishOneLayer(); + this.pathResults.finishOneLayer(); return results; } @@ -244,7 +273,7 @@ private boolean superNode(Id vertex, Directions direction) { } private long accessed() { - return this.record.accessed(); + return this.pathResults.accessed(); } } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java index 0929711402..12d90600ec 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java @@ -17,6 +17,9 @@ package org.apache.hugegraph.traversal.algorithm; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; @@ -26,14 +29,14 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.query.QueryResults; -import org.apache.hugegraph.type.define.Directions; -import org.apache.tinkerpop.gremlin.structure.Edge; - import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.CollectionUtil; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.NumericUtil; +import org.apache.tinkerpop.gremlin.structure.Edge; + import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -57,13 +60,21 @@ public WeightedPaths singleSourceShortestPaths(Id sourceV, Directions dir, Id labelId = this.getEdgeLabelId(label); Traverser traverser = new Traverser(sourceV, dir, labelId, weight, - degree, skipDegree, capacity, - limit); + degree, skipDegree, capacity, limit); while (true) { // Found, reach max depth or reach capacity, stop searching traverser.forward(); if (traverser.done()) { - return traverser.shortestPaths(); + this.vertexIterCounter.addAndGet(traverser.vertexCount); + this.edgeIterCounter.addAndGet(traverser.edgeCount); + WeightedPaths paths = traverser.shortestPaths(); + List> pathList = paths.pathList(); + Set edges = new HashSet<>(); + for (List path : pathList) { + edges.addAll(traverser.edgeRecord.getEdges(path.iterator())); + } + paths.setEdges(edges); + return paths; } checkCapacity(traverser.capacity, traverser.size, "shortest path"); } @@ -91,18 +102,107 @@ public NodeWithWeight weightedShortestPath(Id sourceV, Id targetV, traverser.forward(); Map results = traverser.shortestPaths(); if (results.containsKey(targetV) || traverser.done()) { - return results.get(targetV); + this.vertexIterCounter.addAndGet(traverser.vertexCount); + this.edgeIterCounter.addAndGet(traverser.edgeCount); + NodeWithWeight nodeWithWeight = results.get(targetV); + if (nodeWithWeight != null) { + Iterator vertexIter = nodeWithWeight.node.path().iterator(); + Set edges = traverser.edgeRecord.getEdges(vertexIter); + nodeWithWeight.setEdges(edges); + } + return nodeWithWeight; } checkCapacity(traverser.capacity, traverser.size, "shortest path"); } } + public static class NodeWithWeight implements Comparable { + + private final double weight; + private final Node node; + + private Set edges = Collections.emptySet(); + + public NodeWithWeight(double weight, Node node) { + this.weight = weight; + this.node = node; + } + + public NodeWithWeight(double weight, Id id, NodeWithWeight prio) { + this(weight, new Node(id, prio.node())); + } + + public Set getEdges() { + return edges; + } + + public void setEdges(Set edges) { + this.edges = edges; + } + + public double weight() { + return weight; + } + + public Node node() { + return this.node; + } + + public Map toMap() { + return ImmutableMap.of("weight", this.weight, + "vertices", this.node().path()); + } + + @Override + public int compareTo(NodeWithWeight other) { + return Double.compare(this.weight, other.weight); + } + } + + public static class WeightedPaths extends LinkedHashMap { + + private static final long serialVersionUID = -313873642177730993L; + private Set edges = Collections.emptySet(); + + public Set getEdges() { + return edges; + } + + public void setEdges(Set edges) { + this.edges = edges; + } + + public Set vertices() { + Set vertices = newIdSet(); + vertices.addAll(this.keySet()); + for (NodeWithWeight nw : this.values()) { + vertices.addAll(nw.node().path()); + } + return vertices; + } + + public List> pathList() { + List> pathList = new ArrayList<>(); + for (NodeWithWeight nw : this.values()) { + pathList.add(nw.node.path()); + } + return pathList; + } + + public Map> toMap() { + Map> results = newMap(); + for (Map.Entry entry : this.entrySet()) { + Id source = entry.getKey(); + NodeWithWeight nw = entry.getValue(); + Map result = nw.toMap(); + results.put(source, result); + } + return results; + } + } + private class Traverser { - private WeightedPaths findingNodes = new WeightedPaths(); - private WeightedPaths foundNodes = new WeightedPaths(); - private Set sources; - private Id source; private final Directions direction; private final Id label; private final String weight; @@ -110,15 +210,21 @@ private class Traverser { private final long skipDegree; private final long capacity; private final long limit; - private long size; + private final WeightedPaths findingNodes = new WeightedPaths(); + private final WeightedPaths foundNodes = new WeightedPaths(); + private final EdgeRecord edgeRecord; + private final Id source; + private final long size; + private Set sources; + private long vertexCount; + private long edgeCount; private boolean done = false; public Traverser(Id sourceV, Directions dir, Id label, String weight, - long degree, long skipDegree, long capacity, - long limit) { + long degree, long skipDegree, long capacity, long limit) { this.source = sourceV; this.sources = ImmutableSet.of(new NodeWithWeight( - 0D, new Node(sourceV, null))); + 0D, new Node(sourceV, null))); this.direction = dir; this.label = label; this.weight = weight; @@ -127,6 +233,9 @@ public Traverser(Id sourceV, Directions dir, Id label, String weight, this.capacity = capacity; this.limit = limit; this.size = 0L; + this.vertexCount = 0L; + this.edgeCount = 0L; + this.edgeRecord = new EdgeRecord(false); } /** @@ -143,12 +252,16 @@ public void forward() { HugeEdge edge = (HugeEdge) edges.next(); Id target = edge.id().otherVertexId(); + this.edgeCount += 1L; + if (this.foundNodes.containsKey(target) || this.source.equals(target)) { // Already find shortest path for target, skip continue; } + this.edgeRecord.addEdge(node.node().id(), target, edge); + double currentWeight = this.edgeWeight(edge); double weight = currentWeight + node.weight(); NodeWithWeight nw = new NodeWithWeight(weight, target, node); @@ -164,9 +277,10 @@ public void forward() { } } } + this.vertexCount += sources.size(); Map sorted = CollectionUtil.sortByValue( - this.findingNodes, true); + this.findingNodes, true); double minWeight = 0; Set newSources = InsertionOrderUtil.newSet(); for (Map.Entry entry : sorted.entrySet()) { @@ -209,7 +323,7 @@ private double edgeWeight(HugeEdge edge) { edgeWeight = 1.0; } else { edgeWeight = NumericUtil.convertToNumber( - edge.value(this.weight)).doubleValue(); + edge.value(this.weight)).doubleValue(); } return edgeWeight; } @@ -232,62 +346,4 @@ private Iterator skipSuperNodeIfNeeded(Iterator edges) { return edgeList.iterator(); } } - - public static class NodeWithWeight implements Comparable { - - private final double weight; - private final Node node; - - public NodeWithWeight(double weight, Node node) { - this.weight = weight; - this.node = node; - } - - public NodeWithWeight(double weight, Id id, NodeWithWeight prio) { - this(weight, new Node(id, prio.node())); - } - - public double weight() { - return weight; - } - - public Node node() { - return this.node; - } - - public Map toMap() { - return ImmutableMap.of("weight", this.weight, - "vertices", this.node().path()); - } - - @Override - public int compareTo(NodeWithWeight other) { - return Double.compare(this.weight, other.weight); - } - } - - public static class WeightedPaths extends LinkedHashMap { - - private static final long serialVersionUID = -313873642177730993L; - - public Set vertices() { - Set vertices = newIdSet(); - vertices.addAll(this.keySet()); - for (NodeWithWeight nw : this.values()) { - vertices.addAll(nw.node().path()); - } - return vertices; - } - - public Map> toMap() { - Map> results = newMap(); - for (Map.Entry entry : this.entrySet()) { - Id source = entry.getKey(); - NodeWithWeight nw = entry.getValue(); - Map result = nw.toMap(); - results.put(source, result); - } - return results; - } - } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java index b1e2405c28..25e03996eb 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java @@ -22,16 +22,15 @@ import java.util.Map; import java.util.Set; -import jakarta.ws.rs.core.MultivaluedMap; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.apache.hugegraph.structure.HugeEdge; -import org.apache.hugegraph.util.E; +import jakarta.ws.rs.core.MultivaluedMap; public class SubGraphTraverser extends HugeTraverser { @@ -39,17 +38,35 @@ public SubGraphTraverser(HugeGraph graph) { super(graph); } - public PathSet rays(Id sourceV, Directions dir, String label, - int depth, long degree, long capacity, long limit) { - return this.subGraphPaths(sourceV, dir, label, depth, degree, - capacity, limit, false, false); + private static boolean hasMultiEdges(List edges, Id target) { + boolean hasOutEdge = false; + boolean hasInEdge = false; + for (Edge edge : edges) { + if (((HugeEdge) edge).id().otherVertexId().equals(target)) { + if (((HugeEdge) edge).direction() == Directions.OUT) { + hasOutEdge = true; + } else { + hasInEdge = true; + } + if (hasOutEdge && hasInEdge) { + return true; + } + } + } + return false; + } + + public PathSet rays(Id sourceV, Directions dir, String label, int depth, + long degree, long capacity, long limit) { + return this.subGraphPaths(sourceV, dir, label, depth, degree, capacity, + limit, false, false); } public PathSet rings(Id sourceV, Directions dir, String label, int depth, boolean sourceInRing, long degree, long capacity, long limit) { - return this.subGraphPaths(sourceV, dir, label, depth, degree, - capacity, limit, true, sourceInRing); + return this.subGraphPaths(sourceV, dir, label, depth, degree, capacity, + limit, true, sourceInRing); } private PathSet subGraphPaths(Id sourceV, Directions dir, String label, @@ -69,48 +86,79 @@ private PathSet subGraphPaths(Id sourceV, Directions dir, String label, capacity, limit, rings, sourceInRing); PathSet paths = new PathSet(); - while (true) { + do { paths.addAll(traverser.forward(dir)); - if (--depth <= 0 || traverser.reachLimit() || - traverser.finished()) { - break; - } - } + } while (--depth > 0 && !traverser.reachLimit() && + !traverser.finished()); + this.vertexIterCounter.addAndGet(traverser.accessedVertices.size()); + this.edgeIterCounter.addAndGet(traverser.edgeCount); + paths.setEdges(traverser.edgeRecord.getEdges(paths)); return paths; } - private static boolean hasMultiEdges(List edges, Id target) { - boolean hasOutEdge = false; - boolean hasInEdge = false; - for (Edge edge : edges) { - if (((HugeEdge) edge).id().otherVertexId().equals(target)) { - if (((HugeEdge) edge).direction() == Directions.OUT) { - hasOutEdge = true; - } else { - hasInEdge = true; - } - if (hasOutEdge && hasInEdge) { - return true; + private static class RingPath extends Path { + + public RingPath(Id crosspoint, List vertices) { + super(crosspoint, vertices); + } + + @Override + public int hashCode() { + int hashCode = 0; + for (Id id : this.vertices()) { + hashCode ^= id.hashCode(); + } + return hashCode; + } + + /** + * Compares the specified object with this path for equality. + * Returns true if other path is equal to or + * reversed of this path. + * + * @param other the object to be compared + * @return true if the specified object is equal to or + * reversed of this path + */ + @Override + public boolean equals(Object other) { + if (!(other instanceof RingPath)) { + return false; + } + List vertices = this.vertices(); + List otherVertices = ((Path) other).vertices(); + + if (vertices.equals(otherVertices)) { + return true; + } + if (vertices.size() != otherVertices.size()) { + return false; + } + for (int i = 0, size = vertices.size(); i < size; i++) { + int j = size - i - 1; + if (!vertices.get(i).equals(otherVertices.get(j))) { + return false; } } + return true; } - return false; } private class Traverser { private final Id source; - private MultivaluedMap sources = newMultivalueMap(); - private Set accessedVertices = newIdSet(); - private final Id label; - private int depth; private final long degree; private final long capacity; private final long limit; private final boolean rings; private final boolean sourceInRing; + private final Set accessedVertices = newIdSet(); + private final EdgeRecord edgeRecord; + private MultivaluedMap sources = newMultivalueMap(); + private int depth; private long pathCount; + private long edgeCount; public Traverser(Id sourceV, Id label, int depth, long degree, long capacity, long limit, boolean rings, @@ -126,6 +174,8 @@ public Traverser(Id sourceV, Id label, int depth, long degree, this.rings = rings; this.sourceInRing = sourceInRing; this.pathCount = 0L; + this.edgeCount = 0L; + this.edgeRecord = new EdgeRecord(false); } /** @@ -140,7 +190,7 @@ public PathSet forward(Directions direction) { Id vid = entry.getKey(); // Record edgeList to determine if multiple edges exist List edgeList = IteratorUtils.list(edgesOfVertex( - vid, direction, this.label, this.degree)); + vid, direction, this.label, this.degree)); edges = edgeList.iterator(); if (!edges.hasNext()) { @@ -163,7 +213,11 @@ public PathSet forward(Directions direction) { while (edges.hasNext()) { neighborCount++; HugeEdge edge = (HugeEdge) edges.next(); + this.edgeCount += 1L; Id target = edge.id().otherVertexId(); + + this.edgeRecord.addEdge(vid, target, edge); + // Avoid deduplicate path if (currentNeighbors.contains(target)) { continue; @@ -241,62 +295,11 @@ public PathSet forward(Directions direction) { private boolean reachLimit() { checkCapacity(this.capacity, this.accessedVertices.size(), this.rings ? "rings" : "rays"); - if (this.limit == NO_LIMIT || this.pathCount < this.limit) { - return false; - } - return true; + return this.limit != NO_LIMIT && this.pathCount >= this.limit; } private boolean finished() { return this.sources.isEmpty(); } } - - private static class RingPath extends Path { - - public RingPath(Id crosspoint, List vertices) { - super(crosspoint, vertices); - } - - @Override - public int hashCode() { - int hashCode = 0; - for (Id id : this.vertices()) { - hashCode ^= id.hashCode(); - } - return hashCode; - } - - /** - * Compares the specified object with this path for equality. - * Returns true if other path is equal to or - * reversed of this path. - * @param other the object to be compared - * @return true if the specified object is equal to or - * reversed of this path - */ - @Override - public boolean equals(Object other) { - if (!(other instanceof RingPath)) { - return false; - } - List vertices = this.vertices(); - List otherVertices = ((Path) other).vertices(); - - if (vertices.equals(otherVertices)) { - return true; - } - if (vertices.size() != otherVertices.size()) { - return false; - } - assert vertices.size() == otherVertices.size(); - for (int i = 0, size = vertices.size(); i < size; i++) { - int j = size - i - 1; - if (!vertices.get(i).equals(otherVertices.get(j))) { - return false; - } - } - return true; - } - } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java index 85ce74651d..949014e192 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java @@ -25,13 +25,13 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; import org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep; import org.apache.hugegraph.traversal.algorithm.strategy.TraverseStrategy; -import org.apache.tinkerpop.gremlin.structure.Vertex; - -import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Vertex; public class TemplatePathsTraverser extends HugeTraverser { @@ -39,11 +39,11 @@ public TemplatePathsTraverser(HugeGraph graph) { super(graph); } - public Set templatePaths(Iterator sources, - Iterator targets, - List steps, - boolean withRing, - long capacity, long limit) { + public WrappedPathSet templatePaths(Iterator sources, + Iterator targets, + List steps, + boolean withRing, long capacity, + long limit) { checkCapacity(capacity); checkLimit(limit); @@ -68,23 +68,26 @@ public Set templatePaths(Iterator sources, for (RepeatEdgeStep step : steps) { totalSteps += step.maxTimes(); } + + boolean concurrent = totalSteps >= this.concurrentDepth(); TraverseStrategy strategy = TraverseStrategy.create( - totalSteps >= this.concurrentDepth(), - this.graph()); + concurrent, this.graph()); Traverser traverser = new Traverser(this, strategy, sourceList, targetList, steps, - withRing, capacity, limit); + withRing, capacity, limit, concurrent); do { // Forward traverser.forward(); if (traverser.finished()) { - return traverser.paths(); + Set paths = traverser.paths(); + return new WrappedPathSet(paths, traverser.edgeResults.getEdges(paths)); } // Backward traverser.backward(); if (traverser.finished()) { - return traverser.paths(); + Set paths = traverser.paths(); + return new WrappedPathSet(paths, traverser.edgeResults.getEdges(paths)); } } while (true); } @@ -98,14 +101,14 @@ private static class Traverser extends PathTraverser { protected int sourceIndex; protected int targetIndex; - protected boolean sourceFinishOneStep = false; - protected boolean targetFinishOneStep = false; + protected boolean sourceFinishOneStep; + protected boolean targetFinishOneStep; public Traverser(HugeTraverser traverser, TraverseStrategy strategy, Collection sources, Collection targets, List steps, boolean withRing, - long capacity, long limit) { - super(traverser, strategy, sources, targets, capacity, limit); + long capacity, long limit, boolean concurrent) { + super(traverser, strategy, sources, targets, capacity, limit, concurrent); this.steps = steps; this.withRing = withRing; @@ -135,7 +138,7 @@ public void beforeTraverse(boolean forward) { public void afterTraverse(EdgeStep step, boolean forward) { Map> all = forward ? this.sourcesAll : - this.targetsAll; + this.targetsAll; this.addNewVerticesToAll(all); this.reInitCurrentStepIfNeeded(step, forward); this.stepCount++; @@ -276,4 +279,23 @@ public boolean lastSuperStep() { this.targetIndex == this.sourceIndex + 1; } } + + public static class WrappedPathSet { + + private final Set paths; + private final Set edges; + + public WrappedPathSet(Set paths, Set edges) { + this.paths = paths; + this.edges = edges; + } + + public Set paths() { + return paths; + } + + public Set edges() { + return edges; + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java index ce3647de2e..fe05d00824 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java @@ -23,14 +23,14 @@ import java.util.function.Function; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser.Path; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser.PathSet; import org.apache.hugegraph.traversal.algorithm.records.record.Int2IntRecord; import org.apache.hugegraph.traversal.algorithm.records.record.Record; import org.apache.hugegraph.traversal.algorithm.records.record.RecordType; import org.apache.hugegraph.util.collection.CollectionFactory; import org.apache.hugegraph.util.collection.IntMap; import org.apache.hugegraph.util.collection.IntSet; -import org.apache.hugegraph.traversal.algorithm.HugeTraverser.Path; -import org.apache.hugegraph.traversal.algorithm.HugeTraverser.PathSet; public class ShortestPathRecords extends DoubleWayMultiPathsRecords { diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java index 4e53ecc16b..d41adc92a8 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java @@ -25,17 +25,18 @@ import org.apache.hugegraph.HugeException; import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.type.define.CollectionType; -import org.apache.hugegraph.util.collection.CollectionFactory; -import org.apache.hugegraph.util.collection.IntIterator; -import org.apache.hugegraph.util.collection.IntMap; -import org.apache.hugegraph.util.collection.IntSet; import org.apache.hugegraph.perf.PerfUtil.Watched; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser.EdgeRecord; import org.apache.hugegraph.traversal.algorithm.HugeTraverser.Path; import org.apache.hugegraph.traversal.algorithm.HugeTraverser.PathSet; import org.apache.hugegraph.traversal.algorithm.records.record.Int2IntRecord; import org.apache.hugegraph.traversal.algorithm.records.record.Record; import org.apache.hugegraph.traversal.algorithm.records.record.RecordType; +import org.apache.hugegraph.type.define.CollectionType; +import org.apache.hugegraph.util.collection.CollectionFactory; +import org.apache.hugegraph.util.collection.IntIterator; +import org.apache.hugegraph.util.collection.IntMap; +import org.apache.hugegraph.util.collection.IntSet; public abstract class SingleWayMultiPathsRecords extends AbstractRecords { @@ -44,7 +45,7 @@ public abstract class SingleWayMultiPathsRecords extends AbstractRecords { private final int sourceCode; private final boolean nearest; private final IntSet accessedVertices; - + private final EdgeRecord edgeResults; private IntIterator parentRecordKeys; public SingleWayMultiPathsRecords(RecordType type, boolean concurrent, @@ -58,6 +59,7 @@ public SingleWayMultiPathsRecords(RecordType type, boolean concurrent, firstRecord.addPath(this.sourceCode, 0); this.records = new Stack<>(); this.records.push(firstRecord); + this.edgeResults = new EdgeRecord(concurrent); this.accessedVertices = CollectionFactory.newIntSet(); } @@ -176,6 +178,10 @@ protected final Stack records() { return this.records; } + public EdgeRecord edgeResults() { + return edgeResults; + } + public abstract int size(); public abstract List ids(long limit); diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java index 1ce5f6d705..6fba538d54 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java @@ -19,14 +19,15 @@ import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class JaccardSimilarityApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/jaccardsimilarity"; @@ -72,9 +73,10 @@ public void testPost() { "\"top\": 3}", markoId); Response r = client().post(PATH, reqBody); String content = assertResponseStatus(200, r); - Double rippleJaccardSimilarity = assertJsonContains(content, rippleId); - Double peterJaccardSimilarity = assertJsonContains(content, peterId); - Double jsonJaccardSimilarity = assertJsonContains(content, jsonId); + Map jaccardSimilarity = assertJsonContains(content, "jaccard_similarity"); + Double rippleJaccardSimilarity = assertMapContains(jaccardSimilarity, rippleId); + Double peterJaccardSimilarity = assertMapContains(jaccardSimilarity, peterId); + Double jsonJaccardSimilarity = assertMapContains(jaccardSimilarity, jsonId); Assert.assertEquals(0.3333, rippleJaccardSimilarity.doubleValue(), 0.0001); Assert.assertEquals(0.25, peterJaccardSimilarity.doubleValue(), 0.0001); From 4d7ad86776482900ef75406760b6a6391ef08781 Mon Sep 17 00:00:00 2001 From: lzyxx <94185075+lzyxx77@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:07:34 +0800 Subject: [PATCH 02/51] fix checkstyle: Update StandardStateMachineCallback.java (#2290) During the compilation of your code, an informational message was displayed indicating an issue with the file /home/lzy/hugegraph/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java at line 36. The specific problem was that the length of this line exceeded 100 characters, with a total of 101 characters. To address this issue, I have made modifications to this class. I have split the originally long line into multiple lines to ensure that each line's length adheres to the coding standards' specified limits. This action not only aligns with the requirements of the code style, but also improves the readability and maintainability of the code. --- .../hugegraph/masterelection/StandardStateMachineCallback.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java b/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java index 88bec95b31..28e01d2913 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java @@ -33,7 +33,8 @@ public class StandardStateMachineCallback implements StateMachineCallback { private boolean isMaster = false; - public StandardStateMachineCallback(TaskManager taskManager, GlobalMasterInfo globalMasterInfo) { + public StandardStateMachineCallback(TaskManager taskManager, + GlobalMasterInfo globalMasterInfo) { this.taskManager = taskManager; this.taskManager.enableRoleElected(true); this.globalMasterInfo = globalMasterInfo; From 77c76124af0fbb186d16790220583b7e58b0df9c Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Fri, 25 Aug 2023 15:20:44 +0800 Subject: [PATCH 03/51] chore(dist): replace wget to curl to download swagger-ui (#2277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Main Changes: 1. replace `wget` by `curl` when downloading `swagger-ui` 2. silence the output of `curl` and `tar` commands 3. reuse the existing `v4.15.5.tar.gz` before downloading 4. avoid downloading `swagger-ui` in non-Linux platforms to prevent build failures (there might be a cross-platform build approach available 🤔) 5. wrapp the script content within `` blocks ensures that the script retains its original format when generating the `dist.sh` script (also suppresses automatic indentation) 6. remove intermediate files at the end of the script **An alternative approach**, during the generation of the `dist.sh` script, only the `${final.name}` property from the build process is utilized. It might be possible to separately store a `dist.sh` script within hugegraph-dist, then use `sed` during the build process to replace the value of `${final.name}`, **thereby avoiding the need to embed script content within the pom file**. --------- Co-authored-by: imbajin --- hugegraph-dist/dist.sh | 46 ++++++++ hugegraph-dist/pom.xml | 231 +++++++++++++++++++++++++++++------------ pom.xml | 26 +++++ 3 files changed, 234 insertions(+), 69 deletions(-) create mode 100644 hugegraph-dist/dist.sh diff --git a/hugegraph-dist/dist.sh b/hugegraph-dist/dist.sh new file mode 100644 index 0000000000..64029d49a0 --- /dev/null +++ b/hugegraph-dist/dist.sh @@ -0,0 +1,46 @@ +#!/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. +# +VERSION=4.15.5 + +curl --version >/dev/null 2>&1 || + { + echo 'ERROR: Please install `curl` first if you need `swagger-ui`' + exit + } + +# TODO: perhaps it's necessary verify the checksum before reusing the existing tar +if [[ ! -f v$VERSION.tar.gz ]]; then + curl -s -S -L -o v$VERSION.tar.gz \ + https://github.com/swagger-api/swagger-ui/archive/refs/tags/v$VERSION.tar.gz || + { + echo 'ERROR: Download `swagger-ui` failed, please check your network connection' + exit + } +fi + +tar zxf v$VERSION.tar.gz -C . >/dev/null 2>&1 + +echo "window.onload = function() { window.ui = SwaggerUIBundle({ +url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', +presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], +plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > \ + swagger-ui-$VERSION/dist/swagger-initializer.js + +# conceal the VERSION from the outside +mv swagger-ui-$VERSION swagger-ui +echo 'INFO: Successfully download `swagger-ui`' diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 8c23199544..48ad2017b7 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -124,30 +124,6 @@ - - maven-assembly-plugin - 2.4 - - - assembly-hugegraph - package - - single - - - false - false - ${top.level.dir} - - - ${assembly.descriptor.dir}/assembly.xml - - ${final.name} - - - - - org.apache.maven.plugins maven-clean-plugin @@ -168,51 +144,168 @@ - - - maven-antrun-plugin - - - download-swagger-ui - package - - run - - - - - wget --version 1>/dev/null || exit - wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz - tar zxvf v4.15.5.tar.gz - echo "window.onload = function() { window.ui = SwaggerUIBundle({ - url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout', - presets:[SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], - plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > swagger-ui-4.15.5/dist/swagger-initializer.js - cp -r swagger-ui-4.15.5/dist ../${final.name}/swagger-ui - - - - - - - - - package - - run - - - - - - - - - - - - - + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.4 + + + assembly-hugegraph + package + + single + + + false + false + ${top.level.dir} + + + ${assembly.descriptor.dir}/assembly.xml + + ${final.name} + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + download-swagger-ui + prepare-package + + run + + + + + + + + + + + install-swagger-ui + package + + run + + + + + + + + + + + + + + + + + + + + + + + assembly-hugegraph + + + + maven-assembly-plugin + + + + + + + !skip-assembly-hugegraph + + + + + unix-package + + + + maven-antrun-plugin + + + + + + unix + Linux + + + + + mac-package + + + + maven-antrun-plugin + + + + + + mac + + + + + tar-package + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + tar-package + package + + run + + + + + + + + + + + + + + + + + + + !skip-tar-package + + + + diff --git a/pom.xml b/pom.xml index 719328316c..5cc42a954d 100644 --- a/pom.xml +++ b/pom.xml @@ -453,6 +453,32 @@ true + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-version + + enforce + + + false + + + + + + [1.8,12) + + + [3.5.0,) + + + + + + From 8a515f20db2361eb4151bbb73695a239af1aae65 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 28 Aug 2023 15:36:21 +0800 Subject: [PATCH 04/51] feat(dist): support pre-load test graph data in docker container (#2241) - Provide the related conf and groovy for user to pre load some data. - Change the start-hugegraph.sh to get the environment variables to decide to pre-load or not. --------- Co-authored-by: imbajin --- hugegraph-dist/README.md | 56 +++++++++++++++++++ .../assembly/static/bin/start-hugegraph.sh | 30 ++++++++-- 2 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 hugegraph-dist/README.md diff --git a/hugegraph-dist/README.md b/hugegraph-dist/README.md new file mode 100644 index 0000000000..b8e6499285 --- /dev/null +++ b/hugegraph-dist/README.md @@ -0,0 +1,56 @@ +# Deploy Hugegraph server with docker + +## 1. Deploy + +We can use docker to quickly start an inner HugeGraph server with RocksDB in background. + +1. Using docker run + + Use `docker run -itd --name=graph -p 18080:8080 hugegraph/hugegraph` to start hugegraph server. + +2. Using docker compose + + We can also use `docker-compose up -d`. The `docker-compose.yaml` is below: + + ```yaml + version: '3' + services: + graph: + image: hugegraph/hugegraph + ports: + - 18080:8080 + ``` + +## 2. Create Sample Graph on Server Startup + +If you want to **pre-load** some (test) data or graphs in container(by default), you can set the env `PRELOAD=ture` + +If you want to customize the pre-loaded data, please mount the the groovy scripts (not necessary). + + + +1. Using docker run + + Use `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` + to start hugegraph server. + +2. Using docker compose + + We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below: + + ```yaml + version: '3' + services: + graph: + image: hugegraph/hugegraph + environment: + - PRELOAD=true + volumes: + - /path/to/yourscript:/hugegraph/scripts/example.groovy + ports: + - 18080:8080 + ``` + +3. Using start-hugegraph.sh + + If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`. \ No newline at end of file diff --git a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index 85d259d3cd..c53df91b9b 100644 --- a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -18,33 +18,40 @@ OPEN_MONITOR="false" OPEN_SECURITY_CHECK="true" DAEMON="true" +PRELOAD="false" #VERBOSE="" GC_OPTION="" USER_OPTION="" SERVER_STARTUP_TIMEOUT_S=30 -while getopts "d:g:m:s:j:t:v" arg; do +while getopts "d:g:m:p:s:j:t:v" arg; do case ${arg} in d) DAEMON="$OPTARG" ;; g) GC_OPTION="$OPTARG" ;; m) OPEN_MONITOR="$OPTARG" ;; + p) PRELOAD="$OPTARG" ;; s) OPEN_SECURITY_CHECK="$OPTARG" ;; j) USER_OPTION="$OPTARG" ;; t) SERVER_STARTUP_TIMEOUT_S="$OPTARG" ;; # TODO: should remove it in future (check the usage carefully) v) VERBOSE="verbose" ;; - ?) echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-s true|false] [-j java_options] + ?) echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options] [-t timeout]" && exit 1 ;; esac done if [[ "$OPEN_MONITOR" != "true" && "$OPEN_MONITOR" != "false" ]]; then - echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-s true|false] [-j java_options]" + echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" exit 1 fi if [[ "$OPEN_SECURITY_CHECK" != "true" && "$OPEN_SECURITY_CHECK" != "false" ]]; then - echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-s true|false] [-j java_options]" + echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" + exit 1 +fi + +if [[ "$PRELOAD" != "true" && "$PRELOAD" != "false" ]]; then + echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" exit 1 fi @@ -62,6 +69,7 @@ BIN=$(abs_path) TOP="$(cd "$BIN"/../ && pwd)" CONF="$TOP/conf" LOGS="$TOP/logs" +SCRIPTS="$TOP/scripts" PID_FILE="$BIN/pid" . "$BIN"/util.sh @@ -79,13 +87,23 @@ if [ ! -d "$LOGS" ]; then mkdir -p "$LOGS" fi +GREMLIN_SERVER_CONF="gremlin-server.yaml" +if [[ $PRELOAD == "true" ]]; then + GREMLIN_SERVER_CONF="gremlin-server-preload.yaml" + EXAMPLE_SCRPIT="example-preload.groovy" + cp "${CONF}"/gremlin-server.yaml "${CONF}/${GREMLIN_SERVER_CONF}" + cp "${SCRIPTS}"/example.groovy "${SCRIPTS}/${EXAMPLE_SCRPIT}" + sed -i -e "s/empty-sample.groovy/$EXAMPLE_SCRPIT/g" "${CONF}/${GREMLIN_SERVER_CONF}" + sed -i -e '/registerRocksDB/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRPIT}" +fi + if [[ $DAEMON == "true" ]]; then echo "Starting HugeGraphServer in daemon mode..." - "${BIN}"/hugegraph-server.sh "${CONF}"/gremlin-server.yaml "${CONF}"/rest-server.properties \ + "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" >>"${LOGS}"/hugegraph-server.log 2>&1 & else echo "Starting HugeGraphServer in foreground mode..." - "${BIN}"/hugegraph-server.sh "${CONF}"/gremlin-server.yaml "${CONF}"/rest-server.properties \ + "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" >>"${LOGS}"/hugegraph-server.log 2>&1 fi From aaf67cf81c2c3c03e40c2fb47792ac8498a0bce6 Mon Sep 17 00:00:00 2001 From: Chong Shen Date: Tue, 29 Aug 2023 16:09:31 +0800 Subject: [PATCH 05/51] fix(core): close flat mapper iterator after usage (#2281) close [Bug] FlatMapperIterator should be closed after usage #2280 --- .../traversal/algorithm/CountTraverser.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java index 7025aedde0..83b3747e0a 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java @@ -32,6 +32,7 @@ import org.apache.hugegraph.iterator.FlatMapperIterator; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.util.E; +import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; public class CountTraverser extends HugeTraverser { @@ -78,19 +79,23 @@ public long count(Id source, List steps, }); } - // The last step, just query count - EdgeStep lastStep = steps.get(stepNum - 1); - while (edges.hasNext()) { - Id target = ((HugeEdge) edges.next()).id().otherVertexId(); - if (this.dedup(target)) { - continue; + try { + // The last step, just query count + EdgeStep lastStep = steps.get(stepNum - 1); + while (edges.hasNext()) { + Id target = ((HugeEdge) edges.next()).id().otherVertexId(); + if (this.dedup(target)) { + continue; + } + // Count last layer vertices(without dedup size) + long edgesCount = this.edgesCount(target, lastStep); + this.count.add(edgesCount); } - // Count last layer vertices(without dedup size) - long edgesCount = this.edgesCount(target, lastStep); - this.count.add(edgesCount); - } - return this.count.longValue(); + return this.count.longValue(); + } finally { + CloseableIterator.closeIterator(edges); + } } private Iterator edgesOfVertexWithCount(Id source, EdgeStep step) { From 1d0969dedeb693b964cfe7a34d6b7538834e9967 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Fri, 8 Sep 2023 22:07:57 +0800 Subject: [PATCH 06/51] fix(dist): avoid var PRELOAD cover environmnet vars (#2302) Update hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh --------- Co-authored-by: imbajin --- .../assembly/static/bin/start-hugegraph.sh | 54 ++++++++----------- .../src/assembly/static/bin/util.sh | 5 ++ 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index c53df91b9b..9ad7da8fad 100644 --- a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -18,11 +18,29 @@ OPEN_MONITOR="false" OPEN_SECURITY_CHECK="true" DAEMON="true" -PRELOAD="false" #VERBOSE="" GC_OPTION="" USER_OPTION="" SERVER_STARTUP_TIMEOUT_S=30 +# todo: move abs_path funtion to shell like util.sh +function abs_path() { + SOURCE="${BASH_SOURCE[0]}" + while [[ -h "$SOURCE" ]]; do + DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" + done + cd -P "$(dirname "$SOURCE")" && pwd +} + +BIN=$(abs_path) +TOP="$(cd "$BIN"/../ && pwd)" +CONF="$TOP/conf" +LOGS="$TOP/logs" +SCRIPTS="$TOP/scripts" +PID_FILE="$BIN/pid" + +. "$BIN"/util.sh while getopts "d:g:m:p:s:j:t:v" arg; do case ${arg} in @@ -35,45 +53,19 @@ while getopts "d:g:m:p:s:j:t:v" arg; do t) SERVER_STARTUP_TIMEOUT_S="$OPTARG" ;; # TODO: should remove it in future (check the usage carefully) v) VERBOSE="verbose" ;; - ?) echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options] - [-t timeout]" && exit 1 ;; + # Note: update usage info when the params changed + ?) exit_with_usage_help ;; esac done if [[ "$OPEN_MONITOR" != "true" && "$OPEN_MONITOR" != "false" ]]; then - echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" - exit 1 + exit_with_usage_help fi if [[ "$OPEN_SECURITY_CHECK" != "true" && "$OPEN_SECURITY_CHECK" != "false" ]]; then - echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" - exit 1 -fi - -if [[ "$PRELOAD" != "true" && "$PRELOAD" != "false" ]]; then - echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options]" - exit 1 + exit_with_usage_help fi -function abs_path() { - SOURCE="${BASH_SOURCE[0]}" - while [[ -h "$SOURCE" ]]; do - DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" - SOURCE="$(readlink "$SOURCE")" - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" - done - cd -P "$(dirname "$SOURCE")" && pwd -} - -BIN=$(abs_path) -TOP="$(cd "$BIN"/../ && pwd)" -CONF="$TOP/conf" -LOGS="$TOP/logs" -SCRIPTS="$TOP/scripts" -PID_FILE="$BIN/pid" - -. "$BIN"/util.sh - GREMLIN_SERVER_URL=$(read_property "$CONF/rest-server.properties" "gremlinserver.url") if [ -z "$GREMLIN_SERVER_URL" ]; then GREMLIN_SERVER_URL="http://127.0.0.1:8182" diff --git a/hugegraph-dist/src/assembly/static/bin/util.sh b/hugegraph-dist/src/assembly/static/bin/util.sh index d03083388a..64980403b1 100755 --- a/hugegraph-dist/src/assembly/static/bin/util.sh +++ b/hugegraph-dist/src/assembly/static/bin/util.sh @@ -368,3 +368,8 @@ function kill_process_and_wait() { kill_process "$process_name" "$pid" wait_for_shutdown "$process_name" "$pid" "$timeout_s" } + +function exit_with_usage_help(){ + echo "USAGE: $0 [-d true|false] [-g g1] [-m true|false] [-p true|false] [-s true|false] [-j java_options] [-t timeout]" + exit 1 +} From 8e99d85d33e23a7837a9963e3233f43e7bc31e68 Mon Sep 17 00:00:00 2001 From: Wu Chencan <77946882+DanGuge@users.noreply.github.com> Date: Sun, 10 Sep 2023 16:47:45 +0800 Subject: [PATCH 07/51] feat(api-core): support label & property filtering for both edge and vertex & support kout dfs mode (#2295) - Support label & property filtering for both edge and vertex and the filtering is implemented in Kout Post and Kneighbor - Post Apis, reducing unnecessary graph searches through pruning - Support Kout dfs mode in Kout Post Api Originally only edge label filtering was supported, now label and property filtering for edge and vertex is supported. - add classes VEStepEntity and VEStep to support serialization in request - add class Steps to support filtering of edge and vertex in runtime(core) - add new method edgesOfVertex(Id source, Steps steps) to support label and property filtering for both edge and vertex in HugeTraverser.java --------- Co-authored-by: imbajin --- .../api/traversers/KneighborAPI.java | 20 +- .../hugegraph/api/traversers/KoutAPI.java | 48 +++-- .../api/traversers/TraverserAPI.java | 60 ++++++ .../apache/hugegraph/backend/query/Query.java | 1 + .../backend/tx/GraphTransaction.java | 55 ++++- .../traversal/algorithm/HugeTraverser.java | 128 +++++++++++- .../algorithm/KneighborTraverser.java | 6 +- .../traversal/algorithm/KoutTraverser.java | 40 +++- .../algorithm/iterator/NestedIterator.java | 195 ++++++++++++++++++ .../algorithm/records/KoutRecords.java | 43 +++- .../records/SingleWayMultiPathsRecords.java | 14 +- .../traversal/algorithm/steps/Steps.java | 187 +++++++++++++++++ .../traversal/optimize/TraversalUtil.java | 23 ++- .../api/traversers/KneighborApiTest.java | 22 +- .../hugegraph/api/traversers/KoutApiTest.java | 22 +- 15 files changed, 782 insertions(+), 82 deletions(-) create mode 100644 hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java create mode 100644 hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java index a0e7d0c4ee..8624b2dd02 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java @@ -37,7 +37,7 @@ import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.KneighborTraverser; import org.apache.hugegraph.traversal.algorithm.records.KneighborRecords; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; @@ -120,7 +120,7 @@ public String post(@Context GraphManager manager, E.checkArgumentNotNull(request, "The request body can't be null"); E.checkArgumentNotNull(request.source, "The source of request can't be null"); - E.checkArgument(request.step != null, + E.checkArgument(request.steps != null, "The steps of request can't be null"); if (request.countOnly) { E.checkArgument(!request.withVertex && !request.withPath && !request.withEdge, @@ -128,9 +128,9 @@ public String post(@Context GraphManager manager, } LOG.debug("Graph [{}] get customized kneighbor from source vertex " + - "'{}', with step '{}', limit '{}', count_only '{}', " + + "'{}', with steps '{}', limit '{}', count_only '{}', " + "with_vertex '{}', with_path '{}' and with_edge '{}'", - graph, request.source, request.step, request.limit, + graph, request.source, request.steps, request.limit, request.countOnly, request.withVertex, request.withPath, request.withEdge); @@ -139,11 +139,11 @@ public String post(@Context GraphManager manager, HugeGraph g = graph(manager, graph); Id sourceId = HugeVertex.getIdValue(request.source); - EdgeStep step = step(g, request.step); + Steps steps = steps(g, request.steps); KneighborRecords results; try (KneighborTraverser traverser = new KneighborTraverser(g)) { - results = traverser.customizedKneighbor(sourceId, step, + results = traverser.customizedKneighbor(sourceId, steps, request.maxDepth, request.limit); measure.addIterCount(traverser.vertexIterCounter.get(), @@ -202,8 +202,8 @@ private static class Request { @JsonProperty("source") public Object source; - @JsonProperty("step") - public TraverserAPI.Step step; + @JsonProperty("steps") + public TraverserAPI.VESteps steps; @JsonProperty("max_depth") public int maxDepth; @JsonProperty("limit") @@ -219,9 +219,9 @@ private static class Request { @Override public String toString() { - return String.format("PathRequest{source=%s,step=%s,maxDepth=%s" + + return String.format("PathRequest{source=%s,steps=%s,maxDepth=%s" + "limit=%s,countOnly=%s,withVertex=%s," + - "withPath=%s,withEdge=%s}", this.source, this.step, + "withPath=%s,withEdge=%s}", this.source, this.steps, this.maxDepth, this.limit, this.countOnly, this.withVertex, this.withPath, this.withEdge); } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java index 1adf2be5eb..1f1b6922d3 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java @@ -38,7 +38,7 @@ import org.apache.hugegraph.traversal.algorithm.HugeTraverser; import org.apache.hugegraph.traversal.algorithm.KoutTraverser; import org.apache.hugegraph.traversal.algorithm.records.KoutRecords; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; @@ -126,18 +126,19 @@ public String post(@Context GraphManager manager, E.checkArgumentNotNull(request, "The request body can't be null"); E.checkArgumentNotNull(request.source, "The source of request can't be null"); - E.checkArgument(request.step != null, + E.checkArgument(request.steps != null, "The steps of request can't be null"); if (request.countOnly) { E.checkArgument(!request.withVertex && !request.withPath && !request.withEdge, "Can't return vertex, edge or path when count only"); } + HugeTraverser.checkTraverseMode(request.traverseMode); LOG.debug("Graph [{}] get customized kout from source vertex '{}', " + - "with step '{}', max_depth '{}', nearest '{}', " + + "with steps '{}', max_depth '{}', nearest '{}', " + "count_only '{}', capacity '{}', limit '{}', " + "with_vertex '{}', with_path '{}' and with_edge '{}'", - graph, request.source, request.step, request.maxDepth, + graph, request.source, request.steps, request.maxDepth, request.nearest, request.countOnly, request.capacity, request.limit, request.withVertex, request.withPath, request.withEdge); @@ -147,14 +148,22 @@ public String post(@Context GraphManager manager, HugeGraph g = graph(manager, graph); Id sourceId = HugeVertex.getIdValue(request.source); - EdgeStep step = step(g, request.step); + Steps steps = steps(g, request.steps); KoutRecords results; try (KoutTraverser traverser = new KoutTraverser(g)) { - results = traverser.customizedKout(sourceId, step, - request.maxDepth, - request.nearest, - request.capacity, - request.limit); + if (HugeTraverser.isTraverseModeDFS(request.traverseMode)) { + results = traverser.dfsKout(sourceId, steps, + request.maxDepth, + request.nearest, + request.capacity, + request.limit); + } else { + results = traverser.customizedKout(sourceId, steps, + request.maxDepth, + request.nearest, + request.capacity, + request.limit); + } measure.addIterCount(traverser.vertexIterCounter.get(), traverser.edgeIterCounter.get()); } @@ -172,7 +181,7 @@ public String post(@Context GraphManager manager, if (request.countOnly) { return manager.serializer(g, measure.measures()) - .writeNodesWithPath("kneighbor", neighbors, size, paths, + .writeNodesWithPath("kout", neighbors, size, paths, QueryResults.emptyIterator(), QueryResults.emptyIterator()); } @@ -210,8 +219,8 @@ private static class Request { @JsonProperty("source") public Object source; - @JsonProperty("step") - public TraverserAPI.Step step; + @JsonProperty("steps") + public TraverserAPI.VESteps steps; @JsonProperty("max_depth") public int maxDepth; @JsonProperty("nearest") @@ -228,16 +237,19 @@ private static class Request { public boolean withPath = false; @JsonProperty("with_edge") public boolean withEdge = false; + @JsonProperty("traverse_mode") + public String traverseMode = HugeTraverser.TRAVERSE_MODE_BFS; @Override public String toString() { - return String.format("KoutRequest{source=%s,step=%s,maxDepth=%s" + + return String.format("KoutRequest{source=%s,steps=%s,maxDepth=%s" + "nearest=%s,countOnly=%s,capacity=%s," + "limit=%s,withVertex=%s,withPath=%s," + - "withEdge=%s}", this.source, this.step, - this.maxDepth, this.nearest, this.countOnly, - this.capacity, this.limit, this.withVertex, - this.withPath, this.withEdge); + "withEdge=%s,traverseMode=%s}", this.source, + this.steps, this.maxDepth, this.nearest, + this.countOnly, this.capacity, this.limit, + this.withVertex, this.withPath, this.withEdge, + this.traverseMode); } } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java index 9649ec03c9..cc61a9fadb 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java @@ -19,13 +19,16 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_MAX_DEGREE; +import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.type.define.Directions; + import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; @@ -36,6 +39,25 @@ protected static EdgeStep step(HugeGraph graph, Step step) { step.maxDegree, step.skipDegree); } + protected static Steps steps(HugeGraph graph, VESteps steps) { + Map> vSteps = new HashMap<>(); + if (steps.vSteps != null) { + for (VEStepEntity vStep : steps.vSteps) { + vSteps.put(vStep.label, vStep.properties); + } + } + + Map> eSteps = new HashMap<>(); + if (steps.eSteps != null) { + for (VEStepEntity eStep : steps.eSteps) { + eSteps.put(eStep.label, eStep.properties); + } + } + + return new Steps(graph, steps.direction, vSteps, eSteps, + steps.maxDegree, steps.skipDegree); + } + protected static class Step { @JsonProperty("direction") @@ -58,4 +80,42 @@ public String toString() { this.maxDegree, this.skipDegree); } } + + protected static class VEStepEntity { + + @JsonProperty("label") + public String label; + + @JsonProperty("properties") + public Map properties; + + @Override + public String toString() { + return String.format("VEStepEntity{label=%s,properties=%s}", + this.label, this.properties); + } + } + + protected static class VESteps { + + @JsonProperty("direction") + public Directions direction; + @JsonAlias("degree") + @JsonProperty("max_degree") + public long maxDegree = Long.parseLong(DEFAULT_MAX_DEGREE); + @JsonProperty("skip_degree") + public long skipDegree = 0L; + @JsonProperty("vertex_steps") + public List vSteps; + @JsonProperty("edge_steps") + public List eSteps; + + @Override + public String toString() { + return String.format("Steps{direction=%s,maxDegree=%s," + + "skipDegree=%s,vSteps=%s,eSteps=%s}", + this.direction, this.maxDegree, + this.skipDegree, this.vSteps, this.eSteps); + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java index 518ac5303a..32f416b371 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java @@ -306,6 +306,7 @@ public boolean reachLimit(long count) { /** * Set or update the offset and limit by a range [start, end) * NOTE: it will use the min range one: max start and min end + * * @param start the range start, include it * @param end the range end, exclude it */ diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java index ea1196eaef..0574318d74 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java @@ -690,7 +690,7 @@ public void removeVertex(HugeVertex vertex) { // Override vertices in local `addedVertices` this.addedVertices.remove(vertex.id()); // Force load vertex to ensure all properties are loaded (refer to #2181) - if (vertex.schemaLabel().indexLabels().size() > 0) { + if (vertex.schemaLabel().indexLabels().size() > 0) { vertex.forceLoad(); } // Collect the removed vertex @@ -937,7 +937,7 @@ protected Iterator queryEdgesByIds(Object[] edgeIds, * local vertex and duplicated id. */ Iterator it = this.queryEdgesFromBackend(query); - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) Iterator r = (Iterator) it; return r; } @@ -1195,9 +1195,10 @@ public void removeEdgeProperty(HugeEdgeProperty prop) { /** * Construct one edge condition query based on source vertex, direction and * edge labels + * * @param sourceVertex source vertex of edge - * @param direction only be "IN", "OUT" or "BOTH" - * @param edgeLabels edge labels of queried edges + * @param direction only be "IN", "OUT" or "BOTH" + * @param edgeLabels edge labels of queried edges * @return constructed condition query */ @Watched @@ -1230,8 +1231,39 @@ public static ConditionQuery constructEdgesQuery(Id sourceVertex, } else if (edgeLabels.length > 1) { query.query(Condition.in(HugeKeys.LABEL, Arrays.asList(edgeLabels))); + } + + return query; + } + + public static ConditionQuery constructEdgesQuery(Id sourceVertex, + Directions direction, + List edgeLabels) { + E.checkState(sourceVertex != null, + "The edge query must contain source vertex"); + E.checkState(direction != null, + "The edge query must contain direction"); + + ConditionQuery query = new ConditionQuery(HugeType.EDGE); + + // Edge source vertex + query.eq(HugeKeys.OWNER_VERTEX, sourceVertex); + + // Edge direction + if (direction == Directions.BOTH) { + query.query(Condition.or( + Condition.eq(HugeKeys.DIRECTION, Directions.OUT), + Condition.eq(HugeKeys.DIRECTION, Directions.IN))); } else { - assert edgeLabels.length == 0; + assert direction == Directions.OUT || direction == Directions.IN; + query.eq(HugeKeys.DIRECTION, direction); + } + + // Edge labels + if (edgeLabels.size() == 1) { + query.eq(HugeKeys.LABEL, edgeLabels.get(0)); + } else if (edgeLabels.size() > 1) { + query.query(Condition.in(HugeKeys.LABEL, edgeLabels)); } return query; @@ -1363,8 +1395,8 @@ private QueryList optimizeQueries(Query query, } boolean supportIn = this.storeFeatures().supportsQueryWithInCondition(); - for (ConditionQuery cq: ConditionQueryFlatten.flatten( - (ConditionQuery) query, supportIn)) { + for (ConditionQuery cq : ConditionQueryFlatten.flatten( + (ConditionQuery) query, supportIn)) { // Optimize by sysprop Query q = this.optimizeQuery(cq); /* @@ -1387,7 +1419,7 @@ private Query optimizeQuery(ConditionQuery query) { "Not supported querying by id and conditions: %s", query); } - Id label = (Id) query.condition(HugeKeys.LABEL); + Id label = query.condition(HugeKeys.LABEL); // Optimize vertex query if (label != null && query.resultType().isVertex()) { @@ -1580,6 +1612,7 @@ private void checkNonnullProperty(HugeVertex vertex) { @SuppressWarnings("unchecked") Collection missed = CollectionUtils.subtract(nonNullKeys, keys); HugeGraph graph = this.graph(); + E.checkArgument(false, "All non-null property keys %s of " + "vertex label '%s' must be set, missed keys %s", graph.mapPkId2Name(nonNullKeys), vertexLabel.name(), @@ -1803,9 +1836,9 @@ private Iterator joinTxVertices(Query query, // Filter vertices matched conditions return q.test(v) ? v : null; }; - vertices = this.joinTxRecords(query, vertices, matchTxFunc, - this.addedVertices, this.removedVertices, - this.updatedVertices); + vertices = this.joinTxRecords(query, vertices, matchTxFunc, + this.addedVertices, this.removedVertices, + this.updatedVertices); return vertices; } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java index c0d36f31bd..f5415d9c51 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java @@ -17,6 +17,7 @@ package org.apache.hugegraph.traversal.algorithm; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -48,7 +49,10 @@ import org.apache.hugegraph.perf.PerfUtil.Watched; import org.apache.hugegraph.schema.SchemaLabel; import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.structure.HugeVertex; +import org.apache.hugegraph.traversal.algorithm.iterator.NestedIterator; import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.traversal.optimize.TraversalUtil; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.type.define.CollectionType; @@ -85,6 +89,9 @@ public class HugeTraverser { // Empirical value of scan limit, with which results can be returned in 3s public static final String DEFAULT_PAGE_LIMIT = "100000"; public static final long NO_LIMIT = -1L; + // traverse mode of kout algorithm: bfs and dfs + public static final String TRAVERSE_MODE_BFS = "breadth_first_search"; + public static final String TRAVERSE_MODE_DFS = "depth_first_search"; protected static final Logger LOG = Log.logger(HugeTraverser.class); protected static final int MAX_VERTICES = 10; private static CollectionFactory collectionFactory; @@ -164,6 +171,17 @@ public static void checkSkipDegree(long skipDegree, long degree, } } + public static void checkTraverseMode(String traverseMode) { + E.checkArgument(traverseMode.compareToIgnoreCase(TRAVERSE_MODE_BFS) == 0 || + traverseMode.compareToIgnoreCase(TRAVERSE_MODE_DFS) == 0, + "The traverse mode must be one of '%s' or '%s', but got '%s'", + TRAVERSE_MODE_BFS, TRAVERSE_MODE_DFS, traverseMode); + } + + public static boolean isTraverseModeDFS(String traverseMode) { + return traverseMode.compareToIgnoreCase(TRAVERSE_MODE_DFS) == 0; + } + public static > Map topN( Map map, boolean sorted, @@ -272,6 +290,15 @@ protected static List joinPath(Node prev, Node back, boolean ring) { return path; } + public static List pathEdges(Iterator iterator, HugeEdge edge) { + List edges = new ArrayList<>(); + if (iterator instanceof NestedIterator) { + edges = ((NestedIterator) iterator).pathEdges(); + } + edges.add(edge); + return edges; + } + public HugeGraph graph() { return this.graph; } @@ -438,6 +465,93 @@ private Iterator edgesOfVertex(Id source, EdgeStep edgeStep, return edgeStep.skipSuperNodeIfNeeded(edges); } + public Iterator edgesOfVertex(Id source, Steps steps) { + List edgeLabels = steps.edgeLabels(); + ConditionQuery cq = GraphTransaction.constructEdgesQuery( + source, steps.direction(), edgeLabels); + cq.capacity(Query.NO_CAPACITY); + if (steps.limit() != NO_LIMIT) { + cq.limit(steps.limit()); + } + + Map edgeConditions = + getFilterQueryConditions(steps.edgeSteps(), HugeType.EDGE); + + Iterator filteredEdges = + new FilterIterator<>(this.graph().edges(cq), + edge -> validateEdge(edgeConditions, (HugeEdge) edge)); + + return edgesOfVertexStep(filteredEdges, steps); + } + + protected Iterator edgesOfVertexStep(Iterator edges, Steps steps) { + if (steps.isVertexEmpty()) { + return edges; + } + + Map vertexConditions = + getFilterQueryConditions(steps.vertexSteps(), HugeType.VERTEX); + + return new FilterIterator<>(edges, + edge -> validateVertex(vertexConditions, (HugeEdge) edge)); + } + + private Boolean validateVertex(Map conditions, + HugeEdge edge) { + HugeVertex sourceV = edge.sourceVertex(); + HugeVertex targetV = edge.targetVertex(); + if (!conditions.containsKey(sourceV.schemaLabel().id()) || + !conditions.containsKey(targetV.schemaLabel().id())) { + return false; + } + + ConditionQuery cq = conditions.get(sourceV.schemaLabel().id()); + if (cq != null) { + sourceV = (HugeVertex) this.graph.vertex(sourceV.id()); + if (!cq.test(sourceV)) { + return false; + } + } + + cq = conditions.get(targetV.schemaLabel().id()); + if (cq != null) { + targetV = (HugeVertex) this.graph.vertex(targetV.id()); + return cq.test(targetV); + } + return true; + } + + private Boolean validateEdge(Map conditions, + HugeEdge edge) { + if (!conditions.containsKey(edge.schemaLabel().id())) { + return false; + } + + ConditionQuery cq = conditions.get(edge.schemaLabel().id()); + if (cq != null) { + return cq.test(edge); + } + return true; + } + + private Map getFilterQueryConditions( + Map idStepEntityMap, HugeType type) { + Map conditions = new HashMap<>(); + + for (Map.Entry entry : idStepEntityMap.entrySet()) { + Steps.StepEntity stepEntity = entry.getValue(); + if (stepEntity.properties() != null && !stepEntity.properties().isEmpty()) { + ConditionQuery cq = new ConditionQuery(type); + Map properties = stepEntity.properties(); + TraversalUtil.fillConditionQuery(cq, properties, this.graph); + conditions.put(entry.getKey(), cq); + } else { + conditions.put(entry.getKey(), null); + } + } + return conditions; + } + private void fillFilterBySortKeys(Query query, Id[] edgeLabels, Map properties) { if (properties == null || properties.isEmpty()) { @@ -513,6 +627,19 @@ protected void checkVertexExist(Id vertexId, String name) { } } + public Iterator createNestedIterator(Id sourceV, Steps steps, + int depth, Set visited, boolean nearest) { + E.checkArgument(depth > 0, "The depth should large than 0 for nested iterator"); + visited.add(sourceV); + + // build a chained iterator path with length of depth + Iterator iterator = this.edgesOfVertex(sourceV, steps); + for (int i = 1; i < depth; i++) { + iterator = new NestedIterator(this, iterator, steps, visited, nearest); + } + return iterator; + } + public static class Node { private final Id id; @@ -876,6 +1003,5 @@ public Set getEdges(Iterator vertexIter) { } return edges; } - } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java index b3ae29ac8f..9f16f480b2 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java @@ -25,7 +25,7 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KneighborRecords; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Edge; @@ -69,7 +69,7 @@ public Set kneighbor(Id sourceV, Directions dir, return all; } - public KneighborRecords customizedKneighbor(Id source, EdgeStep step, + public KneighborRecords customizedKneighbor(Id source, Steps steps, int maxDepth, long limit) { E.checkNotNull(source, "source vertex id"); this.checkVertexExist(source, "source vertex"); @@ -85,7 +85,7 @@ public KneighborRecords customizedKneighbor(Id source, EdgeStep step, if (this.reachLimit(limit, records.size())) { return; } - Iterator edges = edgesOfVertex(v, step); + Iterator edges = edgesOfVertex(v, steps); this.vertexIterCounter.addAndGet(1L); while (!this.reachLimit(limit, records.size()) && edges.hasNext()) { HugeEdge edge = (HugeEdge) edges.next(); diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java index 9f40be8fbd..9924c766c5 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java @@ -26,7 +26,7 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KoutRecords; -import org.apache.hugegraph.traversal.algorithm.steps.EdgeStep; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Edge; @@ -97,7 +97,7 @@ public Set kout(Id sourceV, Directions dir, String label, return latest; } - public KoutRecords customizedKout(Id source, EdgeStep step, + public KoutRecords customizedKout(Id source, Steps steps, int maxDepth, boolean nearest, long capacity, long limit) { E.checkNotNull(source, "source vertex id"); @@ -109,13 +109,13 @@ public KoutRecords customizedKout(Id source, EdgeStep step, depth[0] = maxDepth; boolean concurrent = maxDepth >= this.concurrentDepth(); - KoutRecords records = new KoutRecords(concurrent, source, nearest); + KoutRecords records = new KoutRecords(concurrent, source, nearest, 0); Consumer consumer = v -> { if (this.reachLimit(limit, depth[0], records.size())) { return; } - Iterator edges = edgesOfVertex(v, step); + Iterator edges = edgesOfVertex(v, steps); this.vertexIterCounter.addAndGet(1L); while (!this.reachLimit(limit, depth[0], records.size()) && edges.hasNext()) { @@ -138,6 +138,38 @@ public KoutRecords customizedKout(Id source, EdgeStep step, return records; } + public KoutRecords dfsKout(Id source, Steps steps, + int maxDepth, boolean nearest, + long capacity, long limit) { + E.checkNotNull(source, "source vertex id"); + this.checkVertexExist(source, "source vertex"); + checkPositive(maxDepth, "k-out max_depth"); + checkCapacity(capacity); + checkLimit(limit); + + Set all = newIdSet(); + all.add(source); + + KoutRecords records = new KoutRecords(false, source, nearest, maxDepth); + Iterator iterator = this.createNestedIterator(source, steps, maxDepth, all, nearest); + while (iterator.hasNext()) { + HugeEdge edge = (HugeEdge) iterator.next(); + this.edgeIterCounter.addAndGet(1L); + + Id target = edge.id().otherVertexId(); + if (!nearest || !all.contains(target)) { + records.addFullPath(HugeTraverser.pathEdges(iterator, edge)); + } + + if (limit != NO_LIMIT && records.size() >= limit || + capacity != NO_LIMIT && all.size() > capacity) { + break; + } + } + + return records; + } + private void checkCapacity(long capacity, long accessed, long depth) { if (capacity == NO_LIMIT) { return; diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java new file mode 100644 index 0000000000..3b9f037940 --- /dev/null +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java @@ -0,0 +1,195 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.traversal.algorithm.iterator; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.iterator.WrappedIterator; +import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; +import org.apache.hugegraph.util.collection.ObjectIntMapping; +import org.apache.hugegraph.util.collection.ObjectIntMappingFactory; +import org.apache.tinkerpop.gremlin.structure.Edge; + +public class NestedIterator extends WrappedIterator { + + private final int MAX_CACHED_COUNT = 1000; + /** + * Set visited: visited vertex-ids of all parent-tree + * used to exclude visited vertex + */ + private final boolean nearest; + private final Set visited; + private final int MAX_VISITED_COUNT = 100000; + + // cache for edges, initial capacity to avoid memory fragment + private final List cache; + private final Map parentEdgePointerMap; + + private final Iterator parentIterator; + private final HugeTraverser traverser; + private final Steps steps; + private final ObjectIntMapping idMapping; + private HugeEdge currentEdge; + private int cachePointer; + private Iterator currentIterator; + + public NestedIterator(HugeTraverser traverser, + Iterator parentIterator, + Steps steps, + Set visited, + boolean nearest) { + this.traverser = traverser; + this.parentIterator = parentIterator; + this.steps = steps; + this.visited = visited; + this.nearest = nearest; + + this.cache = new ArrayList<>(MAX_CACHED_COUNT); + this.parentEdgePointerMap = new HashMap<>(); + + this.cachePointer = 0; + this.currentEdge = null; + this.currentIterator = null; + + this.idMapping = ObjectIntMappingFactory.newObjectIntMapping(false); + } + + private static Long makeVertexPairIndex(int source, int target) { + return ((long) source & 0xFFFFFFFFL) | + (((long) target << 32) & 0xFFFFFFFF00000000L); + } + + @Override + public boolean hasNext() { + if (this.currentIterator == null || !this.currentIterator.hasNext()) { + return fetch(); + } + return true; + } + + @Override + public Edge next() { + return this.currentIterator.next(); + } + + @Override + protected Iterator originIterator() { + return this.parentIterator; + } + + @Override + protected boolean fetch() { + while (this.currentIterator == null || !this.currentIterator.hasNext()) { + if (this.currentIterator != null) { + this.currentIterator = null; + } + + if (this.cache.size() == this.cachePointer && !this.fillCache()) { + return false; + } + + this.currentEdge = this.cache.get(this.cachePointer); + this.cachePointer++; + this.currentIterator = + traverser.edgesOfVertex(this.currentEdge.id().otherVertexId(), steps); + this.traverser.vertexIterCounter.addAndGet(1L); + + } + return true; + } + + private boolean fillCache() { + // fill cache from parent + while (this.parentIterator.hasNext() && this.cache.size() < MAX_CACHED_COUNT) { + HugeEdge edge = (HugeEdge) this.parentIterator.next(); + Id vertexId = edge.id().otherVertexId(); + + this.traverser.edgeIterCounter.addAndGet(1L); + + if (!this.nearest || !this.visited.contains(vertexId)) { + // update parent edge cache pointer + int parentEdgePointer = -1; + if (this.parentIterator instanceof NestedIterator) { + parentEdgePointer = ((NestedIterator) this.parentIterator).currentEdgePointer(); + } + + this.parentEdgePointerMap.put(makeEdgeIndex(edge), parentEdgePointer); + + this.cache.add(edge); + if (this.visited.size() < MAX_VISITED_COUNT) { + this.visited.add(vertexId); + } + } + } + return this.cache.size() > this.cachePointer; + } + + public List pathEdges() { + List edges = new ArrayList<>(); + HugeEdge currentEdge = this.currentEdge; + if (this.parentIterator instanceof NestedIterator) { + NestedIterator parent = (NestedIterator) this.parentIterator; + int parentEdgePointer = this.parentEdgePointerMap.get(makeEdgeIndex(currentEdge)); + edges.addAll(parent.pathEdges(parentEdgePointer)); + } + edges.add(currentEdge); + return edges; + } + + private List pathEdges(int edgePointer) { + List edges = new ArrayList<>(); + HugeEdge edge = this.cache.get(edgePointer); + if (this.parentIterator instanceof NestedIterator) { + NestedIterator parent = (NestedIterator) this.parentIterator; + int parentEdgePointer = this.parentEdgePointerMap.get(makeEdgeIndex(edge)); + edges.addAll(parent.pathEdges(parentEdgePointer)); + } + edges.add(edge); + return edges; + } + + public int currentEdgePointer() { + return this.cachePointer - 1; + } + + private Long makeEdgeIndex(HugeEdge edge) { + int sourceV = this.code(edge.id().ownerVertexId()); + int targetV = this.code(edge.id().otherVertexId()); + return makeVertexPairIndex(sourceV, targetV); + } + + private int code(Id id) { + if (id.number()) { + long l = id.asLong(); + if (0 <= l && l <= Integer.MAX_VALUE) { + return (int) l; + } + } + int code = this.idMapping.object2Code(id); + assert code > 0; + return -code; + } +} diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java index 5953e71e2a..e4264893a5 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java @@ -23,6 +23,7 @@ import java.util.Stack; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.HugeTraverser.PathSet; import org.apache.hugegraph.traversal.algorithm.records.record.Record; import org.apache.hugegraph.traversal.algorithm.records.record.RecordType; @@ -32,8 +33,23 @@ public class KoutRecords extends SingleWayMultiPathsRecords { - public KoutRecords(boolean concurrent, Id source, boolean nearest) { + // Non-zero depth is used for deepFirst traverse mode. + // In such case, startOneLayer/finishOneLayer should not be called, + // instead, we should use addFullPath + private final int depth; + + public KoutRecords(boolean concurrent, Id source, boolean nearest, int depth) { super(RecordType.INT, concurrent, source, nearest); + + // add depth(num) records to record each layer + this.depth = depth; + for (int i = 0; i < depth; i++) { + this.records().push(this.newRecord()); + } + assert (this.records().size() == (depth + 1)); + + // init top layer's parentRecord + this.currentRecord(this.records().peek(), null); } @Override @@ -61,4 +77,29 @@ public PathSet paths(long limit) { } return paths; } + + public void addFullPath(List edges) { + assert (depth == edges.size()); + + int sourceCode = this.code(edges.get(0).id().ownerVertexId()); + int targetCode; + for (int i = 0; i < edges.size(); i++) { + HugeEdge edge = edges.get(i); + Id sourceV = edge.id().ownerVertexId(); + Id targetV = edge.id().otherVertexId(); + + assert (this.code(sourceV) == sourceCode); + + this.edgeResults().addEdge(sourceV, targetV, edge); + + targetCode = this.code(targetV); + Record record = this.records().elementAt(i + 1); + if (this.sourceCode == targetCode) { + break; + } + + this.addPathToRecord(sourceCode, targetCode, record); + sourceCode = targetCode; + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java index d41adc92a8..fad78edf07 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java @@ -40,9 +40,8 @@ public abstract class SingleWayMultiPathsRecords extends AbstractRecords { + protected final int sourceCode; private final Stack records; - - private final int sourceCode; private final boolean nearest; private final IntSet accessedVertices; private final EdgeRecord edgeResults; @@ -110,15 +109,16 @@ public Iterator keys() { @Watched public void addPath(Id source, Id target) { - int sourceCode = this.code(source); - int targetCode = this.code(target); + this.addPathToRecord(this.code(source), this.code(target), this.currentRecord()); + } + + public void addPathToRecord(int sourceCode, int targetCode, Record record) { if (this.nearest && this.accessedVertices.contains(targetCode) || - !this.nearest && this.currentRecord().containsKey(targetCode) || + !this.nearest && record.containsKey(targetCode) || targetCode == this.sourceCode) { return; } - this.currentRecord().addPath(targetCode, sourceCode); - + record.addPath(targetCode, sourceCode); this.accessedVertices.add(targetCode); } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java new file mode 100644 index 0000000000..d1a9238be1 --- /dev/null +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java @@ -0,0 +1,187 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.traversal.algorithm.steps; + +import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.schema.EdgeLabel; +import org.apache.hugegraph.schema.VertexLabel; +import org.apache.hugegraph.traversal.algorithm.HugeTraverser; +import org.apache.hugegraph.traversal.optimize.TraversalUtil; +import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.E; + +public class Steps { + + protected final Map edgeSteps; + protected final Map vertexSteps; + protected final Directions direction; + protected final long degree; + protected final long skipDegree; + + public Steps(HugeGraph graph, Directions direction, + Map> vSteps, + Map> eSteps, + long degree, long skipDegree) { + E.checkArgument(degree == NO_LIMIT || degree > 0L, + "The max degree must be > 0 or == -1, but got: %s", degree); + HugeTraverser.checkSkipDegree(skipDegree, degree, NO_LIMIT); + + this.direction = direction; + + // parse vertex steps + this.vertexSteps = new HashMap<>(); + if (vSteps != null && !vSteps.isEmpty()) { + initVertexFilter(graph, vSteps); + } + + // parse edge steps + this.edgeSteps = new HashMap<>(); + if (eSteps != null && !eSteps.isEmpty()) { + initEdgeFilter(graph, eSteps); + } + + this.degree = degree; + this.skipDegree = skipDegree; + } + + private void initVertexFilter(HugeGraph graph, Map> vSteps) { + for (Map.Entry> entry : vSteps.entrySet()) { + if (checkEntryEmpty(entry)) { + continue; + } + E.checkArgument(entry.getKey() != null && !entry.getKey().isEmpty(), + "The vertex step label could not be null"); + + VertexLabel vertexLabel = graph.vertexLabel(entry.getKey()); + StepEntity stepEntity = handleStepEntity(graph, entry, vertexLabel.id()); + this.vertexSteps.put(vertexLabel.id(), stepEntity); + } + } + + private void initEdgeFilter(HugeGraph graph, Map> eSteps) { + for (Map.Entry> entry : eSteps.entrySet()) { + if (checkEntryEmpty(entry)) { + continue; + } + E.checkArgument(entry.getKey() != null && !entry.getKey().isEmpty(), + "The edge step label could not be null"); + + EdgeLabel edgeLabel = graph.edgeLabel(entry.getKey()); + StepEntity stepEntity = handleStepEntity(graph, entry, edgeLabel.id()); + this.edgeSteps.put(edgeLabel.id(), stepEntity); + } + } + + private StepEntity handleStepEntity(HugeGraph graph, + Map.Entry> entry, + Id id) { + Map properties = null; + if (entry.getValue() != null) { + properties = TraversalUtil.transProperties(graph, entry.getValue()); + } + return new StepEntity(id, entry.getKey(), properties); + } + + private boolean checkEntryEmpty(Map.Entry> entry) { + return (entry.getKey() == null || entry.getKey().isEmpty()) && + (entry.getValue() == null || entry.getValue().isEmpty()); + } + + public long degree() { + return this.degree; + } + + public Map edgeSteps() { + return this.edgeSteps; + } + + public Map vertexSteps() { + return this.vertexSteps; + } + + public long skipDegree() { + return this.skipDegree; + } + + public Directions direction() { + return this.direction; + } + + public long limit() { + return this.skipDegree > 0L ? this.skipDegree : this.degree; + } + + public List edgeLabels() { + return new ArrayList<>(this.edgeSteps.keySet()); + } + + public boolean isVertexEmpty() { + return this.vertexSteps.isEmpty(); + } + + @Override + public String toString() { + return "Steps{" + + "edgeSteps=" + this.edgeSteps + + ", vertexSteps=" + this.vertexSteps + + ", direction=" + this.direction + + ", degree=" + this.degree + + ", skipDegree=" + this.skipDegree + + '}'; + } + + public static class StepEntity { + + protected final Id id; + protected final String label; + protected final Map properties; + + public StepEntity(Id id, String label, Map properties) { + this.id = id; + this.label = label; + this.properties = properties; + } + + public Id id() { + return this.id; + } + + public String label() { + return this.label; + } + + public Map properties() { + return this.properties; + } + + @Override + public String toString() { + return String.format("StepEntity{id=%s,label=%s," + + "properties=%s}", this.id, + this.label, this.properties); + } + } +} diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java index 77de342583..99f45fc1cd 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java @@ -39,11 +39,18 @@ import org.apache.hugegraph.backend.query.Condition; import org.apache.hugegraph.backend.query.ConditionQuery; import org.apache.hugegraph.backend.query.Query; +import org.apache.hugegraph.exception.NotSupportException; +import org.apache.hugegraph.iterator.FilterIterator; import org.apache.hugegraph.schema.PropertyKey; import org.apache.hugegraph.schema.SchemaLabel; +import org.apache.hugegraph.structure.HugeElement; +import org.apache.hugegraph.structure.HugeProperty; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.type.define.HugeKeys; +import org.apache.hugegraph.util.CollectionUtil; +import org.apache.hugegraph.util.DateUtil; +import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.JsonUtil; import org.apache.tinkerpop.gremlin.process.traversal.Compare; import org.apache.tinkerpop.gremlin.process.traversal.Contains; @@ -83,13 +90,6 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph; -import org.apache.hugegraph.exception.NotSupportException; -import org.apache.hugegraph.iterator.FilterIterator; -import org.apache.hugegraph.structure.HugeElement; -import org.apache.hugegraph.structure.HugeProperty; -import org.apache.hugegraph.util.CollectionUtil; -import org.apache.hugegraph.util.DateUtil; -import org.apache.hugegraph.util.E; import com.google.common.collect.ImmutableList; public final class TraversalUtil { @@ -146,7 +146,8 @@ public static void trySetGraph(Step step, HugeGraph graph) { } local.setGraph(graph); } - for (final Traversal.Admin global : ((TraversalParent) step).getGlobalChildren()) { + for (final Traversal.Admin global : + ((TraversalParent) step).getGlobalChildren()) { if (global.getGraph().filter(g -> !(g instanceof EmptyGraph)).isPresent()) { continue; } @@ -690,7 +691,7 @@ private static boolean isSysProp(String key) { return token2HugeKey(key) != null; } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) private static void collectPredicates(List> results, List> predicates) { for (P p : predicates) { @@ -781,7 +782,7 @@ private static V validPropertyValue(V value, PropertyKey pkey) { public static void retrieveSysprop(List hasContainers, Function func) { - for (Iterator iter = hasContainers.iterator(); iter.hasNext();) { + for (Iterator iter = hasContainers.iterator(); iter.hasNext(); ) { HasContainer container = iter.next(); if (container.getKey().startsWith("~") && func.apply(container)) { iter.remove(); @@ -842,7 +843,7 @@ public static boolean testProperty(Property prop, Object expected) { public static Map transProperties(HugeGraph graph, Map props) { Map pks = new HashMap<>(props.size()); - for (Map.Entry e: props.entrySet()) { + for (Map.Entry e : props.entrySet()) { PropertyKey pk = graph.propertyKey(e.getKey()); pks.put(pk.id(), e.getValue()); } diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java index f207b59b22..e415fa568f 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java @@ -20,15 +20,16 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import jakarta.ws.rs.core.Response; + public class KneighborApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/kneighbor"; @@ -64,13 +65,18 @@ public void testPost() { String markoId = name2Ids.get("marko"); String reqBody = String.format("{ " + "\"source\": \"%s\", " + - "\"step\": { " + + "\"steps\": { " + " \"direction\": \"BOTH\", " + - " \"labels\": [\"knows\", " + - " \"created\"], " + - "\"properties\": { " + - " \"weight\": \"P.gt(0.1)\"}, " + - " \"degree\": 10000, " + + " \"edge_steps\": [" + + " {\"label\": \"knows\"," + + " \"properties\": {" + + " \"weight\": \"P.gt(0.1)\"}}," + + " {\"label\": \"created\"," + + " \"properties\": {" + + " \"weight\": \"P.gt(0.1)\"}}" + + " ], " + + " \"vertex_steps\": []," + + " \"max_degree\": 10000, " + " \"skip_degree\": 100000}, " + "\"max_depth\": 3, " + "\"limit\": 10000, " + diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java index 2fb8a6466b..11544e3afc 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java @@ -20,15 +20,16 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class KoutApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/kout"; @@ -75,13 +76,18 @@ public void testPost() { String markoId = name2Ids.get("marko"); String reqBody = String.format("{ " + "\"source\": \"%s\", " + - "\"step\": { " + + "\"steps\": { " + " \"direction\": \"BOTH\", " + - " \"labels\": [\"knows\", " + - " \"created\"], " + - "\"properties\": { " + - " \"weight\": \"P.gt(0.1)\"}, " + - " \"degree\": 10000, " + + " \"edge_steps\": [" + + " {\"label\": \"knows\"," + + " \"properties\": {" + + " \"weight\": \"P.gt(0.1)\"}}," + + " {\"label\": \"created\"," + + " \"properties\": {" + + " \"weight\": \"P.gt(0.1)\"}}" + + " ], " + + " \"vertex_steps\": []," + + " \"max_degree\": 10000, " + " \"skip_degree\": 100000}, " + "\"max_depth\": 1, " + "\"nearest\": true, " + From 4ceef1ab0cb1ed4c8cdebdc7bda02f6649de8b40 Mon Sep 17 00:00:00 2001 From: M <87920097+msgui@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:48:37 +0800 Subject: [PATCH 08/51] fix: base-ref/head-ref missed in dependency-review on master (#2308) --- .github/workflows/check-dependencies.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index 60185492bf..0a7396ff80 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -3,7 +3,6 @@ name: "3rd-party" on: push: branches: - - master - /^release-.*$/ pull_request: From d7c1c2149c474f43d83d75f5ed13b79d8036575a Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:14:01 +0800 Subject: [PATCH 09/51] doc: update README about start server with example graph (#2315) --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edc7c97bba..d50235bbec 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,10 @@ Billions of vertices and edges can be easily stored into and queried from HugeGr We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner HugeGraph server with `RocksDB` in background. -Optional: use `docker exec -it graph bash` to enter the container to do some operations. +Optional: + +1. use `docker exec -it graph bash` to enter the container to do some operations. +2. use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD="true" hugegraph/hugegraph` to start with a **built-in** (example) graph. ### 2. Download Way @@ -54,7 +57,7 @@ The project [doc page](https://hugegraph.apache.org/docs/) contains more informa and provides detailed documentation for users. (Structure / Usage / API / Configs...) And here are links of other **HugeGraph** component/repositories: -1. [hugegraph-toolchain](https://github.com/apache/incubator-hugegraph-toolchain) (graph **loader/dashboard/tool/client**) +1. [hugegraph-toolchain](https://github.com/apache/incubator-hugegraph-toolchain) (graph **[loader](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-loader)/[dashboard](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-hubble)/[tool](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-tools)/[client](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-client)**) 2. [hugegraph-computer](https://github.com/apache/incubator-hugegraph-computer) (matched **graph computing** system) 3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** module) 4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code) From 30ef2f7c6b7d55de65200f8222b52f12cbe82853 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:25:45 +0800 Subject: [PATCH 10/51] feat: support White IP List (#2299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tips: - this feat works when auth mode was set. - this feat works when white ip status was enabled. because now PD is unavailable,just use java list; when pd ready , we can checkout pd. --- .../api/filter/AuthenticationFilter.java | 69 ++++++-- .../hugegraph/api/profile/WhiteIpListAPI.java | 155 ++++++++++++++++++ .../hugegraph/auth/HugeGraphAuthProxy.java | 20 +++ .../hugegraph/config/ServerOptions.java | 10 +- .../apache/hugegraph/auth/AuthManager.java | 8 + .../hugegraph/auth/StandardAuthManager.java | 45 ++++- 6 files changed, 280 insertions(+), 27 deletions(-) create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java index f534a0ac9a..464e695fef 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java @@ -17,14 +17,38 @@ package org.apache.hugegraph.api.filter; +import static org.apache.hugegraph.config.ServerOptions.WHITE_IP_STATUS; + import java.io.IOException; import java.security.Principal; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Set; + +import javax.xml.bind.DatatypeConverter; + +import org.apache.hugegraph.auth.HugeAuthenticator; +import org.apache.hugegraph.auth.HugeAuthenticator.RequiredPerm; +import org.apache.hugegraph.auth.HugeAuthenticator.RolePerm; +import org.apache.hugegraph.auth.HugeAuthenticator.User; +import org.apache.hugegraph.auth.RolePermission; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.server.auth.AuthenticationException; +import org.glassfish.grizzly.http.server.Request; +import org.glassfish.grizzly.utils.Charsets; +import org.slf4j.Logger; + +import com.alipay.remoting.util.StringUtils; +import com.google.common.collect.ImmutableList; import jakarta.annotation.Priority; import jakarta.ws.rs.BadRequestException; +import jakarta.ws.rs.ForbiddenException; import jakarta.ws.rs.NotAuthorizedException; import jakarta.ws.rs.Priorities; import jakarta.ws.rs.container.ContainerRequestContext; @@ -35,23 +59,6 @@ import jakarta.ws.rs.core.SecurityContext; import jakarta.ws.rs.core.UriInfo; import jakarta.ws.rs.ext.Provider; -import javax.xml.bind.DatatypeConverter; - -import org.apache.commons.lang3.StringUtils; -import org.apache.tinkerpop.gremlin.server.auth.AuthenticationException; -import org.glassfish.grizzly.http.server.Request; -import org.glassfish.grizzly.utils.Charsets; -import org.slf4j.Logger; - -import org.apache.hugegraph.auth.HugeAuthenticator; -import org.apache.hugegraph.auth.HugeAuthenticator.RequiredPerm; -import org.apache.hugegraph.auth.HugeAuthenticator.RolePerm; -import org.apache.hugegraph.auth.HugeAuthenticator.User; -import org.apache.hugegraph.auth.RolePermission; -import org.apache.hugegraph.core.GraphManager; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import com.google.common.collect.ImmutableList; @Provider @PreMatching @@ -68,12 +75,20 @@ public class AuthenticationFilter implements ContainerRequestFilter { "versions" ); + private static String whiteIpStatus; + + private static final String STRING_WHITE_IP_LIST = "whiteiplist"; + private static final String STRING_ENABLE = "enable"; + @Context private jakarta.inject.Provider managerProvider; @Context private jakarta.inject.Provider requestProvider; + @Context + private jakarta.inject.Provider configProvider; + @Override public void filter(ContainerRequestContext context) throws IOException { if (AuthenticationFilter.isWhiteAPI(context)) { @@ -102,6 +117,26 @@ protected User authenticate(ContainerRequestContext context) { path = request.getRequestURI(); } + // Check whiteIp + if (whiteIpStatus == null) { + whiteIpStatus = this.configProvider.get().get(WHITE_IP_STATUS); + } + + if (Objects.equals(whiteIpStatus, STRING_ENABLE) && request != null) { + peer = request.getRemoteAddr() + ":" + request.getRemotePort(); + path = request.getRequestURI(); + + String remoteIp = request.getRemoteAddr(); + Set whiteIpList = manager.authManager().listWhiteIPs(); + boolean whiteIpEnabled = manager.authManager().getWhiteIpStatus(); + if (!path.contains(STRING_WHITE_IP_LIST) && whiteIpEnabled && + !whiteIpList.contains(remoteIp)) { + throw new ForbiddenException( + String.format("Remote ip '%s' is not permitted", + remoteIp)); + } + } + Map credentials = new HashMap<>(); // Extract authentication credentials String auth = context.getHeaderString(HttpHeaders.AUTHORIZATION); diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java new file mode 100644 index 0000000000..7503e13822 --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java @@ -0,0 +1,155 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.profile; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.lang.StringUtils; +import org.apache.hugegraph.api.API; +import org.apache.hugegraph.api.filter.StatusFilter; +import org.apache.hugegraph.auth.AuthManager; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + +import com.codahale.metrics.annotation.Timed; +import com.google.common.collect.ImmutableMap; + +import jakarta.annotation.security.RolesAllowed; +import jakarta.inject.Singleton; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + +@Path("whiteiplist") +@Singleton +public class WhiteIpListAPI extends API { + + private static final Logger LOG = Log.logger(WhiteIpListAPI.class); + + @GET + @Timed + @Produces(APPLICATION_JSON_WITH_CHARSET) + @RolesAllowed("admin") + public Map list(@Context GraphManager manager) { + LOG.debug("List white ips"); + AuthManager authManager = manager.authManager(); + Set whiteIpList = authManager.listWhiteIPs(); + return ImmutableMap.of("whiteIpList", whiteIpList); + } + + @POST + @Timed + @StatusFilter.Status(StatusFilter.Status.ACCEPTED) + @Consumes(APPLICATION_JSON) + @Produces(APPLICATION_JSON_WITH_CHARSET) + @RolesAllowed("admin") + public Map updateWhiteIPs(@Context GraphManager manager, Map actionMap) { + E.checkArgument(actionMap != null, + "Missing argument: actionMap"); + Set whiteIpList = manager.authManager().listWhiteIPs(); + Object ipListRaw = actionMap.get("ips"); + E.checkArgument(ipListRaw instanceof List, + "Invalid ips type '%s', must be list", ipListRaw.getClass()); + List ipList = (List) ipListRaw; + Object actionRaw = actionMap.get("action"); + E.checkArgument(actionRaw != null, + "Missing argument: action"); + E.checkArgument(actionRaw instanceof String, + "Invalid action type '%s', must be string", + actionRaw.getClass()); + String action = (String) actionRaw; + E.checkArgument(StringUtils.isNotEmpty(action), + "Missing argument: action"); + Set existedIPs = new HashSet<>(); + Set loadedIPs = new HashSet<>(); + Set illegalIPs = new HashSet<>(); + Map result = new HashMap<>(); + for (String ip : ipList) { + if (whiteIpList.contains(ip)) { + existedIPs.add(ip); + continue; + } + if ("load".equals(action)) { + boolean rightIp = checkIp(ip) ? loadedIPs.add(ip) : illegalIPs.add(ip); + } + } + switch (action) { + case "load": + LOG.debug("Load to white ip list"); + result.put("existed_ips", existedIPs); + result.put("added_ips", loadedIPs); + if (!illegalIPs.isEmpty()) { + result.put("illegal_ips", illegalIPs); + } + whiteIpList.addAll(loadedIPs); + break; + case "remove": + LOG.debug("Remove from white ip list"); + result.put("removed_ips", existedIPs); + result.put("non_existed_ips", loadedIPs); + whiteIpList.removeAll(existedIPs); + break; + default: + throw new AssertionError(String.format("Invalid action '%s', " + + "supported action is " + + "'load' or 'remove'", + action)); + } + manager.authManager().setWhiteIPs(whiteIpList); + return result; + } + + @PUT + @Timed + @Produces(APPLICATION_JSON_WITH_CHARSET) + @RolesAllowed("admin") + public Map updateStatus(@Context GraphManager manager, @QueryParam("status") String status) { + LOG.debug("Enable or disable white ip list"); + E.checkArgument("true".equals(status) || + "false".equals(status), + "Invalid status, valid status is 'true' or 'false'"); + boolean open = Boolean.parseBoolean(status); + manager.authManager().enabledWhiteIpList(open); + Map map = new HashMap<>(); + map.put("WhiteIpListOpen", open); + return map; + } + + private boolean checkIp(String ipStr) { + String ip = "^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\." + + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\." + + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\." + + "(00?\\d|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$"; + Pattern pattern = Pattern.compile(ip); + Matcher matcher = pattern.matcher(ipStr); + return matcher.matches(); + } +} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java index 04cfac30d7..2435e2667a 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java @@ -1568,6 +1568,26 @@ public UserWithRole validateUser(String token) { } } + @Override + public Set listWhiteIPs() { + return this.authManager.listWhiteIPs(); + } + + @Override + public void setWhiteIPs(Set whiteIpList) { + this.authManager.setWhiteIPs(whiteIpList); + } + + @Override + public boolean getWhiteIpStatus() { + return this.authManager.getWhiteIpStatus(); + } + + @Override + public void enabledWhiteIpList(boolean status) { + this.authManager.enabledWhiteIpList(status); + } + @Override public String loginUser(String username, String password) { try { diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java index e66b593568..6e41ae87c0 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java @@ -264,4 +264,12 @@ public static synchronized ServerOptions instance() { disallowEmpty(), true ); -} \ No newline at end of file + + public static final ConfigOption WHITE_IP_STATUS = + new ConfigOption<>( + "white_ip.status", + "The status of whether enable white ip.", + disallowEmpty(), + "disable" + ); +} diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java index 2dba7c7a15..908eed01f1 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java @@ -126,4 +126,12 @@ public interface AuthManager { UserWithRole validateUser(String username, String password); UserWithRole validateUser(String token); + + Set listWhiteIPs(); + + void setWhiteIPs(Set whiteIpList); + + boolean getWhiteIpStatus(); + + void enabledWhiteIpList(boolean status); } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java index 910f19cdc5..123c8e9ffd 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java @@ -27,31 +27,30 @@ import javax.security.sasl.AuthenticationException; -import jakarta.ws.rs.ForbiddenException; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; +import org.apache.hugegraph.HugeException; +import org.apache.hugegraph.HugeGraphParams; +import org.apache.hugegraph.auth.HugeUser.P; +import org.apache.hugegraph.auth.SchemaDefine.AuthElement; import org.apache.hugegraph.backend.cache.Cache; import org.apache.hugegraph.backend.cache.CacheManager; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.config.AuthOptions; +import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.LockUtil; +import org.apache.hugegraph.util.Log; import org.apache.hugegraph.util.StringEncoding; import org.slf4j.Logger; -import org.apache.hugegraph.HugeException; -import org.apache.hugegraph.HugeGraphParams; -import org.apache.hugegraph.auth.HugeUser.P; -import org.apache.hugegraph.auth.SchemaDefine.AuthElement; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.jsonwebtoken.Claims; +import jakarta.ws.rs.ForbiddenException; public class StandardAuthManager implements AuthManager { @@ -77,6 +76,10 @@ public class StandardAuthManager implements AuthManager { private final TokenGenerator tokenGenerator; private final long tokenExpire; + private Set ipWhiteList; + + private Boolean ipWhiteListEnabled; + public StandardAuthManager(HugeGraphParams graph) { E.checkNotNull(graph, "graph"); HugeConfig config = graph.configuration(); @@ -104,6 +107,10 @@ public StandardAuthManager(HugeGraphParams graph) { HugeAccess::fromEdge); this.tokenGenerator = new TokenGenerator(config); + + this.ipWhiteList = new HashSet<>(); + + this.ipWhiteListEnabled = false; } private Cache cache(String prefix, long capacity, @@ -689,6 +696,26 @@ public UserWithRole validateUser(String token) { return new UserWithRole(user.id(), username, this.rolePermission(user)); } + @Override + public Set listWhiteIPs() { + return ipWhiteList; + } + + @Override + public void setWhiteIPs(Set ipWhiteList) { + this.ipWhiteList = ipWhiteList; + } + + @Override + public boolean getWhiteIpStatus() { + return this.ipWhiteListEnabled; + } + + @Override + public void enabledWhiteIpList(boolean status) { + this.ipWhiteListEnabled = status; + } + /** * Maybe can define an proxy class to choose forward or call local */ From fc9bc2866e4bbcd65bf67a6dbbeb541b06da8649 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Sun, 8 Oct 2023 20:21:09 +0800 Subject: [PATCH 11/51] feat(api): support metric API Prometheus format & add statistic metric api (#2286) --- .../java/org/apache/hugegraph/api/API.java | 3 +- .../hugegraph/api/filter/AccessLogFilter.java | 82 +++++ .../hugegraph/api/filter/PathFilter.java | 40 +++ .../hugegraph/api/metrics/MetricsAPI.java | 316 ++++++++++++++++-- .../apache/hugegraph/metrics/MetricsKeys.java | 40 +++ .../apache/hugegraph/metrics/MetricsUtil.java | 165 ++++++++- .../apache/hugegraph/api/MetricsApiTest.java | 34 +- 7 files changed, 643 insertions(+), 37 deletions(-) create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java index 99fe67e5ba..e57f6739df 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java @@ -27,6 +27,7 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.define.Checkable; +import org.apache.hugegraph.exception.NotFoundException; import org.apache.hugegraph.metrics.MetricsUtil; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.InsertionOrderUtil; @@ -38,7 +39,6 @@ import com.google.common.collect.ImmutableMap; import jakarta.ws.rs.ForbiddenException; -import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.NotSupportedException; import jakarta.ws.rs.core.MediaType; @@ -49,6 +49,7 @@ public class API { public static final String APPLICATION_JSON = MediaType.APPLICATION_JSON; public static final String APPLICATION_JSON_WITH_CHARSET = APPLICATION_JSON + ";charset=" + CHARSET; + public static final String APPLICATION_TEXT_WITH_CHARSET = MediaType.TEXT_PLAIN + ";charset=" + CHARSET; public static final String JSON = MediaType.APPLICATION_JSON_TYPE .getSubtype(); public static final String ACTION_APPEND = "append"; diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java new file mode 100644 index 0000000000..ba9c981186 --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java @@ -0,0 +1,82 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.filter; + +import static org.apache.hugegraph.api.filter.PathFilter.REQUEST_TIME; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_FAILED_COUNTER; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_RESPONSE_TIME_HISTOGRAM; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_SUCCESS_COUNTER; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_TOTAL_COUNTER; + +import java.io.IOException; + +import org.apache.hugegraph.metrics.MetricsUtil; + +import jakarta.inject.Singleton; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerResponseContext; +import jakarta.ws.rs.container.ContainerResponseFilter; +import jakarta.ws.rs.ext.Provider; + + +@Provider +@Singleton +public class AccessLogFilter implements ContainerResponseFilter { + + private static final String DELIMETER = "/"; + + /** + * Use filter to log request info + * + * @param requestContext requestContext + * @param responseContext responseContext + */ + @Override + public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { + // Grab corresponding request / response info from context; + String method = requestContext.getRequest().getMethod(); + String path = requestContext.getUriInfo().getPath(); + String metricsName = join(path, method); + + MetricsUtil.registerCounter(join(metricsName, METRICS_PATH_TOTAL_COUNTER)).inc(); + if (statusOk(responseContext.getStatus())) { + MetricsUtil.registerCounter(join(metricsName, METRICS_PATH_SUCCESS_COUNTER)).inc(); + } else { + MetricsUtil.registerCounter(join(metricsName, METRICS_PATH_FAILED_COUNTER)).inc(); + } + + // get responseTime + Object requestTime = requestContext.getProperty(REQUEST_TIME); + if(requestTime!=null){ + long now = System.currentTimeMillis(); + long responseTime = (now - (long)requestTime); + + MetricsUtil.registerHistogram( + join(metricsName, METRICS_PATH_RESPONSE_TIME_HISTOGRAM)) + .update(responseTime); + } + } + + private String join(String path1, String path2) { + return String.join(DELIMETER, path1, path2); + } + + private boolean statusOk(int status){ + return status == 200 || status == 201 || status == 202; + } +} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java new file mode 100644 index 0000000000..3414d6831b --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.filter; + +import java.io.IOException; + +import jakarta.inject.Singleton; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerRequestFilter; +import jakarta.ws.rs.container.PreMatching; +import jakarta.ws.rs.ext.Provider; + +@Provider +@Singleton +@PreMatching +public class PathFilter implements ContainerRequestFilter { + + public static final String REQUEST_TIME = "request_time"; + + @Override + public void filter(ContainerRequestContext context) + throws IOException { + context.setProperty(REQUEST_TIME, System.currentTimeMillis()); + } +} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java index 6df4f6453b..f74286b5f8 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java @@ -19,33 +19,66 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; +import static org.apache.hugegraph.metrics.MetricsUtil.COUNT_ATTR; +import static org.apache.hugegraph.metrics.MetricsUtil.END_LSTR; +import static org.apache.hugegraph.metrics.MetricsUtil.FIFT_MIN_RATE_ATRR; +import static org.apache.hugegraph.metrics.MetricsUtil.FIVE_MIN_RATE_ATRR; +import static org.apache.hugegraph.metrics.MetricsUtil.GAUGE_TYPE; +import static org.apache.hugegraph.metrics.MetricsUtil.HISTOGRAM_TYPE; +import static org.apache.hugegraph.metrics.MetricsUtil.LEFT_NAME_STR; +import static org.apache.hugegraph.metrics.MetricsUtil.MEAN_RATE_ATRR; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_FAILED_COUNTER; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_RESPONSE_TIME_HISTOGRAM; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_SUCCESS_COUNTER; +import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_TOTAL_COUNTER; +import static org.apache.hugegraph.metrics.MetricsUtil.ONE_MIN_RATE_ATRR; +import static org.apache.hugegraph.metrics.MetricsUtil.PROM_HELP_NAME; +import static org.apache.hugegraph.metrics.MetricsUtil.RIGHT_NAME_STR; +import static org.apache.hugegraph.metrics.MetricsUtil.SPACE_STR; +import static org.apache.hugegraph.metrics.MetricsUtil.STR_HELP; +import static org.apache.hugegraph.metrics.MetricsUtil.STR_TYPE; +import static org.apache.hugegraph.metrics.MetricsUtil.UNTYPED; +import static org.apache.hugegraph.metrics.MetricsUtil.VERSION_STR; +import static org.apache.hugegraph.metrics.MetricsUtil.exportSnapshot; +import static org.apache.hugegraph.metrics.MetricsUtil.replaceDotDashInKey; +import static org.apache.hugegraph.metrics.MetricsUtil.replaceSlashInKey; +import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.security.RolesAllowed; -import jakarta.inject.Singleton; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; - +import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.api.API; +import org.apache.hugegraph.backend.store.BackendMetrics; import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.metrics.MetricsKeys; import org.apache.hugegraph.metrics.MetricsModule; +import org.apache.hugegraph.metrics.MetricsUtil; import org.apache.hugegraph.metrics.ServerReporter; import org.apache.hugegraph.metrics.SystemMetrics; -import org.slf4j.Logger; - -import org.apache.hugegraph.HugeGraph; -import org.apache.hugegraph.api.API; -import org.apache.hugegraph.backend.store.BackendMetrics; import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.JsonUtil; import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.version.ApiVersion; +import org.apache.tinkerpop.gremlin.server.util.MetricManager; +import org.slf4j.Logger; + +import com.codahale.metrics.Counter; +import com.codahale.metrics.Gauge; +import com.codahale.metrics.Histogram; +import com.codahale.metrics.Meter; import com.codahale.metrics.Metric; import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.security.RolesAllowed; +import jakarta.inject.Singleton; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + @Singleton @Path("metrics") @Tag(name = "MetricsAPI") @@ -53,12 +86,14 @@ public class MetricsAPI extends API { private static final Logger LOG = Log.logger(MetricsAPI.class); - private SystemMetrics systemMetrics; + private static final String JSON_STR = "json"; static { JsonUtil.registerModule(new MetricsModule(SECONDS, MILLISECONDS, false)); } + private final SystemMetrics systemMetrics; + public MetricsAPI() { this.systemMetrics = new SystemMetrics(); } @@ -94,21 +129,6 @@ public String backend(@Context GraphManager manager) { return JsonUtil.toJson(results); } - @GET - @Timed - @Produces(APPLICATION_JSON_WITH_CHARSET) - @RolesAllowed({"admin", "$owner= $action=metrics_read"}) - public String all() { - ServerReporter reporter = ServerReporter.instance(); - Map> result = new LinkedHashMap<>(); - result.put("gauges", reporter.gauges()); - result.put("counters", reporter.counters()); - result.put("histograms", reporter.histograms()); - result.put("meters", reporter.meters()); - result.put("timers", reporter.timers()); - return JsonUtil.toJson(result); - } - @GET @Timed @Path("gauges") @@ -158,4 +178,242 @@ public String timers() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.timers()); } + + @GET + @Timed + @Produces(APPLICATION_TEXT_WITH_CHARSET) + @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + public String all(@Context GraphManager manager, + @QueryParam("type") String type) { + if (type != null && type.equals(JSON_STR)) { + return baseMetricAll(); + } else { + return baseMetricPrometheusAll(); + } + } + + @GET + @Path("statistics") + @Timed + @Produces(APPLICATION_TEXT_WITH_CHARSET) + @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + public String statistics(@QueryParam("type") String type) { + Map> metricMap = statistics(); + + if (type != null && type.equals(JSON_STR)) { + return JsonUtil.toJson(metricMap); + } + return statisticsProm(metricMap); + } + + public String baseMetricAll() { + ServerReporter reporter = ServerReporter.instance(); + Map> result = new LinkedHashMap<>(); + result.put("gauges", reporter.gauges()); + result.put("counters", reporter.counters()); + result.put("histograms", reporter.histograms()); + result.put("meters", reporter.meters()); + result.put("timers", reporter.timers()); + return JsonUtil.toJson(result); + } + + private String baseMetricPrometheusAll() { + StringBuilder promMetric = new StringBuilder(); + ServerReporter reporter = ServerReporter.instance(); + String helpName = PROM_HELP_NAME; + // build version info + promMetric.append(STR_HELP) + .append(helpName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + UNTYPED + END_LSTR); + promMetric.append(helpName) + .append(VERSION_STR) + .append(ApiVersion.VERSION.toString()).append("\",}") + .append(SPACE_STR + "1.0" + END_LSTR); + + // build gauges metric info + for (String key : reporter.gauges().keySet()) { + final Gauge gauge + = reporter.gauges().get(key); + if (gauge != null) { + helpName = replaceDotDashInKey(key); + promMetric.append(STR_HELP) + .append(helpName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(helpName).append(SPACE_STR + GAUGE_TYPE + END_LSTR); + promMetric.append(helpName) + .append(SPACE_STR + gauge.getValue() + END_LSTR); + } + } + + // build histograms metric info + for (String histogramkey : reporter.histograms().keySet()) { + final Histogram histogram = reporter.histograms().get(histogramkey); + if (histogram != null) { + helpName = replaceDotDashInKey(histogramkey); + promMetric.append(STR_HELP) + .append(helpName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promMetric.append(helpName) + .append(COUNT_ATTR) + .append(histogram.getCount() + END_LSTR); + promMetric.append( + exportSnapshot(helpName, histogram.getSnapshot())); + } + } + + // build meters metric info + for (String meterkey : reporter.meters().keySet()) { + final Meter metric = reporter.meters().get(meterkey); + if (metric != null) { + helpName = replaceDotDashInKey(meterkey); + promMetric.append(STR_HELP) + .append(helpName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promMetric.append(helpName) + .append(COUNT_ATTR) + .append(metric.getCount() + END_LSTR); + promMetric.append(helpName) + .append(MEAN_RATE_ATRR) + .append(metric.getMeanRate() + END_LSTR); + promMetric.append(helpName) + .append(ONE_MIN_RATE_ATRR) + .append(metric.getOneMinuteRate() + END_LSTR); + promMetric.append(helpName) + .append(FIVE_MIN_RATE_ATRR) + .append(metric.getFiveMinuteRate() + END_LSTR); + promMetric.append(helpName) + .append(FIFT_MIN_RATE_ATRR) + .append(metric.getFifteenMinuteRate() + END_LSTR); + } + } + + // build timer metric info + for (String timerkey : reporter.timers().keySet()) { + final com.codahale.metrics.Timer timer = reporter.timers() + .get(timerkey); + if (timer != null) { + helpName = replaceDotDashInKey(timerkey); + promMetric.append(STR_HELP) + .append(helpName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promMetric.append(helpName) + .append(COUNT_ATTR) + .append(timer.getCount() + END_LSTR); + promMetric.append(helpName) + .append(ONE_MIN_RATE_ATRR) + .append(timer.getOneMinuteRate() + END_LSTR); + promMetric.append(helpName) + .append(FIVE_MIN_RATE_ATRR) + .append(timer.getFiveMinuteRate() + END_LSTR); + promMetric.append(helpName) + .append(FIFT_MIN_RATE_ATRR) + .append(timer.getFifteenMinuteRate() + END_LSTR); + promMetric.append( + exportSnapshot(helpName, timer.getSnapshot())); + } + } + + MetricsUtil.writePrometheusFormat(promMetric, MetricManager.INSTANCE.getRegistry()); + + return promMetric.toString(); + } + + private Map> statistics() { + Map> metricsMap = new HashMap<>(); + ServerReporter reporter = ServerReporter.instance(); + for (Map.Entry entry : reporter.histograms().entrySet()) { + // entryKey = path/method/responseTimeHistogram + String entryKey = entry.getKey(); + String[] split = entryKey.split("/"); + String lastWord = split[split.length - 1]; + if (!lastWord.equals(METRICS_PATH_RESPONSE_TIME_HISTOGRAM)) { + // original metrics dont report + continue; + } + // metricsName = path/method + String metricsName = + entryKey.substring(0, entryKey.length() - lastWord.length() - 1); + + Counter totalCounter = reporter.counters().get( + joinWithSlash(metricsName, METRICS_PATH_TOTAL_COUNTER)); + Counter failedCounter = reporter.counters().get( + joinWithSlash(metricsName, METRICS_PATH_FAILED_COUNTER)); + Counter successCounter = reporter.counters().get( + joinWithSlash(metricsName, METRICS_PATH_SUCCESS_COUNTER)); + + + Histogram histogram = entry.getValue(); + Map entryMetricsMap = new HashMap<>(); + entryMetricsMap.put(MetricsKeys.MAX_RESPONSE_TIME.name(), + histogram.getSnapshot().getMax()); + entryMetricsMap.put(MetricsKeys.MEAN_RESPONSE_TIME.name(), + histogram.getSnapshot().getMean()); + + entryMetricsMap.put(MetricsKeys.TOTAL_REQUEST.name(), + totalCounter.getCount()); + + if (failedCounter == null) { + entryMetricsMap.put(MetricsKeys.FAILED_REQUEST.name(), 0); + } else { + entryMetricsMap.put(MetricsKeys.FAILED_REQUEST.name(), + failedCounter.getCount()); + } + + if (successCounter == null) { + entryMetricsMap.put(MetricsKeys.SUCCESS_REQUEST.name(), 0); + } else { + entryMetricsMap.put(MetricsKeys.SUCCESS_REQUEST.name(), + successCounter.getCount()); + } + + metricsMap.put(metricsName, entryMetricsMap); + + } + return metricsMap; + } + + private String statisticsProm(Map> metricMap) { + StringBuilder promMetric = new StringBuilder(); + + // build version info + promMetric.append(STR_HELP) + .append(PROM_HELP_NAME).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(PROM_HELP_NAME) + .append(SPACE_STR + UNTYPED + END_LSTR); + promMetric.append(PROM_HELP_NAME) + .append(VERSION_STR) + .append(ApiVersion.VERSION.toString()).append("\",}") + .append(SPACE_STR + "1.0" + END_LSTR); + + for (String methodKey : metricMap.keySet()) { + String metricName = replaceSlashInKey(methodKey); + promMetric.append(STR_HELP) + .append(metricName).append(END_LSTR); + promMetric.append(STR_TYPE) + .append(metricName).append(SPACE_STR + GAUGE_TYPE + END_LSTR); + Map itemMetricMap = metricMap.get(methodKey); + for (String labelName : itemMetricMap.keySet()) { + promMetric.append(metricName).append(LEFT_NAME_STR).append(labelName) + .append(RIGHT_NAME_STR).append(itemMetricMap.get(labelName)) + .append(END_LSTR); + } + } + return promMetric.toString(); + } + + private String joinWithSlash(String path1, String path2) { + return String.join("/", path1, path2); + } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java new file mode 100644 index 0000000000..1cda15c829 --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.metrics; + +public enum MetricsKeys { + + MAX_RESPONSE_TIME(1, "max_response_time"), + + MEAN_RESPONSE_TIME(2, "mean_response_time"), + + TOTAL_REQUEST(3, "total_request"), + + FAILED_REQUEST(4, "failed_request"), + + SUCCESS_REQUEST(5, "success_request"); + + private final byte code; + private final String name; + + MetricsKeys(int code, String name) { + assert code < 256; + this.code = (byte) code; + this.name = name; + } +} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java index fabd1df7b9..bb411f9276 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java @@ -24,12 +24,45 @@ import com.codahale.metrics.Histogram; import com.codahale.metrics.Meter; import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.Snapshot; import com.codahale.metrics.Timer; public class MetricsUtil { - private static final MetricRegistry REGISTRY = - MetricManager.INSTANCE.getRegistry(); + public static final String METRICS_PATH_TOTAL_COUNTER = "TOTAL_COUNTER"; + public static final String METRICS_PATH_FAILED_COUNTER = "FAILED_COUNTER"; + public static final String METRICS_PATH_SUCCESS_COUNTER = "SUCCESS_COUNTER"; + public static final String METRICS_PATH_RESPONSE_TIME_HISTOGRAM = + "RESPONSE_TIME_HISTOGRAM"; + public static final String P75_ATTR = "{name=\"p75\",} "; + public static final String P95_ATTR = "{name=\"p95\",} "; + public static final String P98_ATTR = "{name=\"p98\",} "; + public static final String P99_ATTR = "{name=\"p99\",} "; + public static final String P999_ATTR = "{name=\"p999\",} "; + public static final String MEAN_RATE_ATRR = "{name=\"mean_rate\",} "; + public static final String ONE_MIN_RATE_ATRR = "{name=\"m1_rate\",} "; + public static final String FIVE_MIN_RATE_ATRR = "{name=\"m5_rate\",} "; + public static final String FIFT_MIN_RATE_ATRR = "{name=\"m15_rate\",} "; + public static final MetricRegistry REGISTRY = MetricManager.INSTANCE.getRegistry(); + public static final String STR_HELP = "# HELP "; + public static final String STR_TYPE = "# TYPE "; + public static final String HISTOGRAM_TYPE = "histogram"; + public static final String UNTYPED = "untyped"; + public static final String GAUGE_TYPE = "gauge"; + public static final String END_LSTR = "\n"; + public static final String SPACE_STR = " "; + public static final String VERSION_STR = "{version=\""; + public static final String COUNT_ATTR = "{name=\"count\",} "; + public static final String MIN_ATTR = "{name=\"min\",} "; + public static final String MAX_ATTR = "{name=\"max\",} "; + public static final String MEAN_ATTR = "{name=\"mean\",} "; + public static final String STDDEV_ATTR = "{name=\"stddev\",} "; + public static final String P50_ATTR = "{name=\"p50\",} "; + + public static final String LEFT_NAME_STR = "{name="; + public static final String RIGHT_NAME_STR = ",} "; + public static final String PROM_HELP_NAME = "hugegraph_info"; + public static Gauge registerGauge(Class clazz, String name, Gauge gauge) { @@ -40,10 +73,18 @@ public static Counter registerCounter(Class clazz, String name) { return REGISTRY.counter(MetricRegistry.name(clazz, name)); } + public static Counter registerCounter(String name) { + return REGISTRY.counter(MetricRegistry.name(name)); + } + public static Histogram registerHistogram(Class clazz, String name) { return REGISTRY.histogram(MetricRegistry.name(clazz, name)); } + public static Histogram registerHistogram(String name) { + return REGISTRY.histogram(name); + } + public static Meter registerMeter(Class clazz, String name) { return REGISTRY.meter(MetricRegistry.name(clazz, name)); } @@ -51,4 +92,124 @@ public static Meter registerMeter(Class clazz, String name) { public static Timer registerTimer(Class clazz, String name) { return REGISTRY.timer(MetricRegistry.name(clazz, name)); } + + public static String replaceDotDashInKey(String orgKey) { + return orgKey.replace(".", "_").replace("-", "_"); + } + + public static String replaceSlashInKey(String orgKey) { + return orgKey.replace("/", "_"); + } + + public static void writePrometheusFormat(StringBuilder promeMetrics, MetricRegistry registry) { + // gauges + registry.getGauges().forEach((key, gauge) -> { + if (gauge != null) { + String helpName = replaceDotDashInKey(key); + promeMetrics.append(STR_HELP) + .append(helpName).append(END_LSTR); + promeMetrics.append(STR_TYPE) + .append(helpName).append(SPACE_STR + GAUGE_TYPE + END_LSTR); + promeMetrics.append(helpName).append(SPACE_STR).append(gauge.getValue()) + .append(END_LSTR); + } + }); + + // histograms + registry.getHistograms().forEach((key, histogram) -> { + if (histogram != null) { + String helpName = replaceDotDashInKey(key); + promeMetrics.append(STR_HELP) + .append(helpName).append(END_LSTR); + promeMetrics.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promeMetrics.append(helpName) + .append(COUNT_ATTR).append(histogram.getCount()).append(END_LSTR); + promeMetrics.append( + exportSnapshot(helpName, histogram.getSnapshot())); + } + }); + + // meters + registry.getMeters().forEach((key, metric) -> { + if (metric != null) { + String helpName = replaceDotDashInKey(key); + promeMetrics.append(STR_HELP) + .append(helpName).append(END_LSTR); + promeMetrics.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promeMetrics.append(helpName) + .append(COUNT_ATTR).append(metric.getCount()).append(END_LSTR); + promeMetrics.append(helpName) + .append(MEAN_RATE_ATRR).append(metric.getMeanRate()).append(END_LSTR); + promeMetrics.append(helpName) + .append(ONE_MIN_RATE_ATRR).append(metric.getOneMinuteRate()) + .append(END_LSTR); + promeMetrics.append(helpName) + .append(FIVE_MIN_RATE_ATRR).append(metric.getFiveMinuteRate()) + .append(END_LSTR); + promeMetrics.append(helpName) + .append(FIFT_MIN_RATE_ATRR).append(metric.getFifteenMinuteRate()) + .append(END_LSTR); + } + }); + + // timer + registry.getTimers().forEach((key, timer) -> { + if (timer != null) { + String helpName = replaceDotDashInKey(key); + promeMetrics.append(STR_HELP) + .append(helpName).append(END_LSTR); + promeMetrics.append(STR_TYPE) + .append(helpName) + .append(SPACE_STR + HISTOGRAM_TYPE + END_LSTR); + + promeMetrics.append(helpName) + .append(COUNT_ATTR).append(timer.getCount()).append(END_LSTR); + promeMetrics.append(helpName) + .append(ONE_MIN_RATE_ATRR).append(timer.getOneMinuteRate()) + .append(END_LSTR); + promeMetrics.append(helpName) + .append(FIVE_MIN_RATE_ATRR).append(timer.getFiveMinuteRate()) + .append(END_LSTR); + promeMetrics.append(helpName) + .append(FIFT_MIN_RATE_ATRR).append(timer.getFifteenMinuteRate()) + .append(END_LSTR); + promeMetrics.append( + exportSnapshot(helpName, timer.getSnapshot())); + } + }); + } + + public static String exportSnapshot(final String helpName, final Snapshot snapshot) { + if (snapshot == null) { + return ""; + } + StringBuilder snapMetrics = new StringBuilder(); + snapMetrics.append(helpName) + .append(MIN_ATTR).append(snapshot.getMin()).append(END_LSTR); + snapMetrics.append(helpName) + .append(MAX_ATTR).append(snapshot.getMax()).append(END_LSTR); + snapMetrics.append(helpName) + .append(MEAN_ATTR).append(snapshot.getMean()).append(END_LSTR); + snapMetrics.append(helpName) + .append(STDDEV_ATTR).append(snapshot.getStdDev()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P50_ATTR).append(snapshot.getMedian()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P75_ATTR).append(snapshot.get75thPercentile()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P95_ATTR).append(snapshot.get95thPercentile()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P98_ATTR).append(snapshot.get98thPercentile()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P99_ATTR).append(snapshot.get99thPercentile()).append(END_LSTR); + snapMetrics.append(helpName) + .append(P999_ATTR).append(snapshot.get999thPercentile()).append(END_LSTR); + return snapMetrics.toString(); + } } diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java index 499103c174..cce5af30cc 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java @@ -17,20 +17,24 @@ package org.apache.hugegraph.api; +import java.util.HashMap; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.testutil.Assert; import org.junit.Test; -import org.apache.hugegraph.testutil.Assert; +import jakarta.ws.rs.core.Response; public class MetricsApiTest extends BaseApiTest { - private static String path = "/metrics"; + private static final String path = "/metrics"; + private static final String statisticsPath = path + "/statistics"; @Test - public void testMetricsAll() { - Response r = client().get(path); + public void testBaseMetricsAll() { + Map params = new HashMap<>(); + params.put("type", "json"); + Response r = client().get(path, params); String result = assertResponseStatus(200, r); assertJsonContains(result, "gauges"); assertJsonContains(result, "counters"); @@ -39,6 +43,26 @@ public void testMetricsAll() { assertJsonContains(result, "timers"); } + @Test + public void testBaseMetricsPromAll() { + Response r = client().get(path); + assertResponseStatus(200, r); + } + + @Test + public void testStatisticsMetricsAll() { + Map params = new HashMap<>(); + params.put("type", "json"); + Response r = client().get(path); + assertResponseStatus(200, r); + } + + @Test + public void testStatisticsMetricsPromAll() { + Response r = client().get(statisticsPath); + assertResponseStatus(200, r); + } + @Test public void testMetricsSystem() { Response r = client().get(path, "system"); From 45636a048933a72516c4988622039887d475827f Mon Sep 17 00:00:00 2001 From: Jermy Li Date: Fri, 13 Oct 2023 13:47:01 +0800 Subject: [PATCH 12/51] README.md tiny improve (#2320) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d50235bbec..5e589be604 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,9 @@ The project [doc page](https://hugegraph.apache.org/docs/) contains more informa and provides detailed documentation for users. (Structure / Usage / API / Configs...) And here are links of other **HugeGraph** component/repositories: -1. [hugegraph-toolchain](https://github.com/apache/incubator-hugegraph-toolchain) (graph **[loader](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-loader)/[dashboard](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-hubble)/[tool](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-tools)/[client](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-client)**) -2. [hugegraph-computer](https://github.com/apache/incubator-hugegraph-computer) (matched **graph computing** system) -3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** module) +1. [hugegraph-toolchain](https://github.com/apache/incubator-hugegraph-toolchain) (graph tools **[loader](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-loader)/[dashboard](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-hubble)/[tool](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-tools)/[client](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-client)**) +2. [hugegraph-computer](https://github.com/apache/incubator-hugegraph-computer) (integrated **graph computing** system) +3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** libs) 4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code) ## License From 869fc81811017b9780297cfaafb22d0328478afe Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:15:51 +0800 Subject: [PATCH 13/51] feat(api): support embedded arthas agent in hugegraph-server (#2278) --- hugegraph-api/pom.xml | 15 +- .../hugegraph/api/arthas/ArthasAPI.java | 56 +++++ .../hugegraph/config/ServerOptions.java | 32 +++ hugegraph-dist/release-docs/NOTICE | 38 ++++ .../licenses/LICENSE-arthas-agent-attach.txt | 202 ++++++++++++++++++ .../licenses/LICENSE-arthas-packaging.txt | 202 ++++++++++++++++++ .../LICENSE-byte-buddy-agent-1.11.6.txt | 176 +++++++++++++++ .../release-docs/licenses/LICENSE-zt-zip.txt | 202 ++++++++++++++++++ .../scripts/dependency/known-dependencies.txt | 4 + .../static/conf/rest-server.properties | 6 + .../apache/hugegraph/api/ApiTestSuite.java | 3 +- .../apache/hugegraph/api/ArthasApiTest.java | 62 ++++++ .../org/apache/hugegraph/api/BaseApiTest.java | 29 ++- pom.xml | 1 + 14 files changed, 1014 insertions(+), 14 deletions(-) create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java create mode 100644 hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt create mode 100644 hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt create mode 100644 hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt create mode 100644 hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt create mode 100644 hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml index 2d7370056e..b99cde52cf 100644 --- a/hugegraph-api/pom.xml +++ b/hugegraph-api/pom.xml @@ -15,8 +15,8 @@ License for the specific language governing permissions and limitations under the License. --> - org.apache.hugegraph @@ -153,6 +153,17 @@ swagger-jaxrs2-jakarta 2.1.9 + + + com.taobao.arthas + arthas-agent-attach + ${arthas.version} + + + com.taobao.arthas + arthas-packaging + ${arthas.version} + diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java new file mode 100644 index 0000000000..549f9de0a8 --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.arthas; + +import java.util.HashMap; + +import org.apache.hugegraph.api.API; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.ServerOptions; +import org.apache.hugegraph.util.JsonUtil; + +import com.codahale.metrics.annotation.Timed; +import com.taobao.arthas.agent.attach.ArthasAgent; + +import jakarta.inject.Singleton; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; + +@Path("arthas") +@Singleton +public class ArthasAPI extends API { + + @Context + private jakarta.inject.Provider configProvider; + + @PUT + @Timed + @Produces(APPLICATION_JSON_WITH_CHARSET) + public Object startArthas() { + HugeConfig config = this.configProvider.get(); + HashMap configMap = new HashMap<>(4); + configMap.put("arthas.telnetPort", config.get(ServerOptions.ARTHAS_TELNET_PORT)); + configMap.put("arthas.httpPort", config.get(ServerOptions.ARTHAS_HTTP_PORT)); + configMap.put("arthas.ip", config.get(ServerOptions.ARTHAS_IP)); + configMap.put("arthas.disabledCommands", config.get(ServerOptions.ARTHAS_DISABLED_COMMANDS)); + ArthasAgent.attach(configMap); + return JsonUtil.toJson(configMap); + } +} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java index 6e41ae87c0..e8b999fb56 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java @@ -272,4 +272,36 @@ public static synchronized ServerOptions instance() { disallowEmpty(), "disable" ); + + public static final ConfigOption ARTHAS_TELNET_PORT = + new ConfigOption<>( + "arthas.telnet_port", + "The telnet port provided by Arthas, it can be accessible from the outside.", + disallowEmpty(), + "8562" + ); + + public static final ConfigOption ARTHAS_HTTP_PORT = + new ConfigOption<>( + "arthas.http_port", + "The HTTP port provided by Arthas, it can be accessible from the outside.", + disallowEmpty(), + "8561" + ); + + public static final ConfigOption ARTHAS_IP = + new ConfigOption<>( + "arthas.ip", + "The IP provided by Arthas, it can be accessible from the outside.", + disallowEmpty(), + "0.0.0.0" + ); + + public static final ConfigOption ARTHAS_DISABLED_COMMANDS = + new ConfigOption<>( + "arthas.disabled_commands", + "The disabled Arthas commands due to high risk.", + null, + "jad" + ); } diff --git a/hugegraph-dist/release-docs/NOTICE b/hugegraph-dist/release-docs/NOTICE index 101ea81f45..39922da249 100644 --- a/hugegraph-dist/release-docs/NOTICE +++ b/hugegraph-dist/release-docs/NOTICE @@ -2058,3 +2058,41 @@ HPPC borrowed code, ideas or both from: (Apache license) * Koloboke, https://github.com/OpenHFT/Koloboke (Apache license) + + + +======================================================================== + +Arthas NOTICE + +======================================================================== + + +Arthas +Copyright 2018 Alibaba Group + +This product includes software developed at +Alibaba Group (https://www.alibabagroup.com/en/global/home). + +This product contains code form the greys-anatomy Project: + +The greys-anatomy Project +================= +Please visit Github for more information: +* https://github.com/oldmanpushcart/greys-anatomy + + +------------------------------------------------------------------------------- +This product contains a modified portion of 'Apache Commons Lang': +* LICENSE: + * Apache License 2.0 +* HOMEPAGE: + * https://commons.apache.org/proper/commons-lang/ + + +This product contains a modified portion of 'Apache Commons Net': +* LICENSE: + * Apache License 2.0 +* HOMEPAGE: + * https://commons.apache.org/proper/commons-net/ + diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt b/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt b/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt b/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt new file mode 100644 index 0000000000..d0381d6d04 --- /dev/null +++ b/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt @@ -0,0 +1,176 @@ +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/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt b/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt new file mode 100644 index 0000000000..a250c1a8c1 --- /dev/null +++ b/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt @@ -0,0 +1,202 @@ + + 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 2012 ZeroTurnaround 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/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-dist/scripts/dependency/known-dependencies.txt index 5e50bdb4a0..b5f5036617 100644 --- a/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -7,6 +7,8 @@ annotations-4.1.1.4.jar ansj_seg-5.1.6.jar antlr-runtime-3.5.2.jar aopalliance-repackaged-3.0.1.jar +arthas-agent-attach-3.7.1.jar +arthas-packaging-3.7.1.jar asm-5.0.4.jar asm-6.0.jar asm-analysis-5.0.3.jar @@ -18,6 +20,7 @@ audience-annotations-0.5.0.jar bolt-1.6.4.jar byte-buddy-1.10.5.jar byte-buddy-agent-1.10.5.jar +byte-buddy-agent-1.11.6.jar caffeine-2.2.6.jar caffeine-2.3.1.jar cassandra-all-3.11.12.jar @@ -261,3 +264,4 @@ tracer-core-3.0.8.jar translation-1.0.4.jar util-9.0-9.0.20190305.jar validation-api-1.1.0.Final.jar +zt-zip-1.14.jar diff --git a/hugegraph-dist/src/assembly/static/conf/rest-server.properties b/hugegraph-dist/src/assembly/static/conf/rest-server.properties index 794caec84d..f6444f84fb 100644 --- a/hugegraph-dist/src/assembly/static/conf/rest-server.properties +++ b/hugegraph-dist/src/assembly/static/conf/rest-server.properties @@ -9,6 +9,12 @@ graphs=./conf/graphs batch.max_write_ratio=80 batch.max_write_threads=0 +# configuration of arthas +arthas.telnet_port=8562 +arthas.http_port=8561 +arthas.ip=0.0.0.0 +arthas.disabled_commands=jad + # authentication configs # choose 'org.apache.hugegraph.auth.StandardAuthenticator' or # 'org.apache.hugegraph.auth.ConfigAuthenticator' diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java index a5830a4336..26e00e227a 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java @@ -40,7 +40,8 @@ LoginApiTest.class, ProjectApiTest.class, TraversersApiTestSuite.class, - CypherApiTest.class + CypherApiTest.class, + ArthasApiTest.class }) public class ApiTestSuite { diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java new file mode 100644 index 0000000000..174b665fea --- /dev/null +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api; + +import org.junit.Before; +import org.junit.Test; + +import com.google.common.collect.ImmutableMap; + +import jakarta.ws.rs.core.Response; + +public class ArthasApiTest extends BaseApiTest { + + private static final String ARTHAS_START_PATH = "/arthas"; + private static final String ARTHAS_API_BASE_URL = "http://127.0.0.1:8561"; + private static final String ARTHAS_API_PATH = "/api"; + + @Before + public void testArthasStart() { + Response r = client().put(ARTHAS_START_PATH, "", "", ImmutableMap.of()); + assertResponseStatus(200, r); + } + + @Test + public void testArthasApi() { + String body = "{\n" + + " \"action\": \"exec\",\n" + + " \"requestId\": \"req112\",\n" + + " \"consumerId\": \"955dbd1325334a84972b0f3ac19de4f7_2\",\n" + + " \"command\": \"version\",\n" + + " \"execTimeout\": \"10000\"\n" + + "}"; + RestClient arthasApiClient = new RestClient(ARTHAS_API_BASE_URL, false); + // If request header contains basic auth, and if we are not set auth when arthas attach hg, + // arthas will auth it and return 401. ref:https://arthas.aliyun.com/en/doc/auth.html#configure-username-and-password + Response r = arthasApiClient.post(ARTHAS_API_PATH, body); + String result = assertResponseStatus(200, r); + assertJsonContains(result, "state"); + assertJsonContains(result, "requestId"); + assertJsonContains(result, "sessionId"); + assertJsonContains(result, "body"); + + RestClient arthasApiClientWithAuth = new RestClient(ARTHAS_API_BASE_URL); + r = arthasApiClientWithAuth.post(ARTHAS_API_PATH, body); + assertResponseStatus(401, r); + } +} diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java index 83c1dcebe0..24b19ba1ea 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java @@ -27,13 +27,10 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import jakarta.ws.rs.client.Client; -import jakarta.ws.rs.client.ClientBuilder; -import jakarta.ws.rs.client.Entity; -import jakarta.ws.rs.client.WebTarget; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.Response; import org.apache.http.util.TextUtils; +import org.apache.hugegraph.HugeException; +import org.apache.hugegraph.util.CollectionUtil; +import org.apache.hugegraph.util.JsonUtil; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.jersey.client.filter.EncodingFilter; import org.glassfish.jersey.message.GZipEncoder; @@ -42,9 +39,6 @@ import org.junit.Assert; import org.junit.BeforeClass; -import org.apache.hugegraph.HugeException; -import org.apache.hugegraph.util.CollectionUtil; -import org.apache.hugegraph.util.JsonUtil; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -52,6 +46,13 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; + public class BaseApiTest { private static final String BASE_URL = "http://127.0.0.1:8080"; @@ -104,11 +105,17 @@ public static class RestClient { private WebTarget target; public RestClient(String url) { + this(url, true); + } + + public RestClient(String url,Boolean enableAuth) { this.client = ClientBuilder.newClient(); this.client.register(EncodingFilter.class); this.client.register(GZipEncoder.class); - this.client.register(HttpAuthenticationFeature.basic(USERNAME, - PASSWORD)); + if(enableAuth) { + this.client.register(HttpAuthenticationFeature.basic(USERNAME, + PASSWORD)); + } this.target = this.client.target(url); } diff --git a/pom.xml b/pom.xml index 5cc42a954d..242263c196 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,7 @@ 1.47.0 3.21.7 1.36 + 3.7.1 From 73329ce4f50c729676252a3c288ef199a970a684 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:17:36 +0800 Subject: [PATCH 14/51] doc: README.md tiny improve (#2331) --- hugegraph-dist/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hugegraph-dist/README.md b/hugegraph-dist/README.md index b8e6499285..1aedb37bbe 100644 --- a/hugegraph-dist/README.md +++ b/hugegraph-dist/README.md @@ -10,7 +10,7 @@ We can use docker to quickly start an inner HugeGraph server with RocksDB in bac 2. Using docker compose - We can also use `docker-compose up -d`. The `docker-compose.yaml` is below: + Certainly we can only deploy server without other instance. Additionally, if we want to manage other HugeGraph-related instances with `server` in a single file, we can deploy HugeGraph-related instances via `docker-compose up -d`. The `docker-compose.yaml` is as below: ```yaml version: '3' @@ -27,8 +27,6 @@ If you want to **pre-load** some (test) data or graphs in container(by default), If you want to customize the pre-loaded data, please mount the the groovy scripts (not necessary). - - 1. Using docker run Use `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` @@ -36,7 +34,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script 2. Using docker compose - We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below: + We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below. [example.groovy](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/src/assembly/static/scripts/example.groovy) is a pre-defined script. If needed, we can mount a new `example.groovy` to preload different data: ```yaml version: '3' From d4b95ca32371dfdee60d448fa3e5ab38fc4e288e Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:29:42 +0800 Subject: [PATCH 15/51] feat: support Cassandra with docker-compose in server (#2307) ## Main Changes 1. change the dockerfile, adding the shell to wait for storage backend and use a docker-entrypoint.sh to manage the starting process. 2. delete a deprecated class in gremlin-console.sh (reference: [doc of ScriptExecutor](https://tinkerpop.apache.org/javadocs/3.2.3/full/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.html)) 3. add a healthy check in docker-compose 4. add an example folder where we can put all the template docker-compose.yml here 5. add `*swagger-ui*` in gitignore, which appears after you compile the source code locally. --------- Co-authored-by: imbajin --- .licenserc.yaml | 1 + Dockerfile | 14 +++-- LICENSE | 1 + hugegraph-dist/docker/docker-entrypoint.sh | 24 ++++++++ .../example/docker-compose-cassandra.yml | 61 +++++++++++++++++++ .../docker/scripts/detect-storage.groovy | 31 ++++++++++ .../docker/scripts/remote-connect.groovy | 19 ++++++ hugegraph-dist/release-docs/LICENSE | 1 + .../assembly/static/bin/docker-entrypoint.sh | 24 ++++++++ .../assembly/static/bin/gremlin-console.sh | 10 +-- .../src/assembly/static/bin/wait-storage.sh | 54 ++++++++++++++++ 11 files changed, 229 insertions(+), 11 deletions(-) create mode 100644 hugegraph-dist/docker/docker-entrypoint.sh create mode 100644 hugegraph-dist/docker/example/docker-compose-cassandra.yml create mode 100644 hugegraph-dist/docker/scripts/detect-storage.groovy create mode 100644 hugegraph-dist/docker/scripts/remote-connect.groovy create mode 100644 hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh create mode 100644 hugegraph-dist/src/assembly/static/bin/wait-storage.sh diff --git a/.licenserc.yaml b/.licenserc.yaml index 334d89b51e..db7af8d8d1 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -96,6 +96,7 @@ header: # `header` section is configurations for source codes license header. - '**/util/StringEncoding.java' - 'hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java' - 'hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java' + - 'hugegraph-dist/src/assembly/static/bin/wait-storage.sh' comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`. # license-location-threshold specifies the index threshold where the license header can be located, diff --git a/Dockerfile b/Dockerfile index e096f3430a..7dcbf2131f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,8 @@ COPY --from=build /pkg/apache-hugegraph-incubating-$version/ /hugegraph LABEL maintainer="HugeGraph Docker Maintainers " # TODO: use g1gc or zgc as default -ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" +ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" \ + HUGEGRAPH_HOME="hugegraph" #COPY . /hugegraph/hugegraph-server WORKDIR /hugegraph/ @@ -50,11 +51,16 @@ RUN set -x \ # 2. Init HugeGraph Sever RUN set -e \ && pwd && cd /hugegraph/ \ - && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties \ - && ./bin/init-store.sh + && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties + +# 3. Init docker script +COPY hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts +COPY hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts +COPY hugegraph-dist/docker/docker-entrypoint.sh . +RUN chmod 755 ./docker-entrypoint.sh EXPOSE 8080 VOLUME /hugegraph ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["./bin/start-hugegraph.sh", "-d false -j $JAVA_OPTS -g zgc"] +CMD ["./docker-entrypoint.sh"] diff --git a/LICENSE b/LICENSE index ad08080e31..cea0b74f43 100644 --- a/LICENSE +++ b/LICENSE @@ -214,5 +214,6 @@ hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptT hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph +hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java from https://github.com/opencypher/cypher-for-gremlin hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java from https://github.com/opencypher/cypher-for-gremlin diff --git a/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-dist/docker/docker-entrypoint.sh new file mode 100644 index 0000000000..e1fad4a9ff --- /dev/null +++ b/hugegraph-dist/docker/docker-entrypoint.sh @@ -0,0 +1,24 @@ +#!/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. +# + + +./bin/wait-storage.sh + +./bin/init-store.sh + +./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc diff --git a/hugegraph-dist/docker/example/docker-compose-cassandra.yml b/hugegraph-dist/docker/example/docker-compose-cassandra.yml new file mode 100644 index 0000000000..3682b02f92 --- /dev/null +++ b/hugegraph-dist/docker/example/docker-compose-cassandra.yml @@ -0,0 +1,61 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version: "3" + +services: + graph: + image: hugegraph/hugegraph + container_name: cas-graph + ports: + - 18080:8080 + environment: + hugegraph.backend: cassandra + hugegraph.serializer: cassandra + hugegraph.cassandra.host: cas-cassandra + hugegraph.cassandra.port: 9042 + networks: + - ca-network + depends_on: + - cassandra + healthcheck: + test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"] + interval: 10s + timeout: 30s + retries: 3 + + cassandra: + image: cassandra:4 + container_name: cas-cassandra + ports: + - 7000:7000 + - 9042:9042 + security_opt: + - seccomp:unconfined + networks: + - ca-network + healthcheck: + test: ["CMD", "cqlsh", "--execute", "describe keyspaces;"] + interval: 10s + timeout: 30s + retries: 5 + +networks: + ca-network: + +volumes: + hugegraph-data: diff --git a/hugegraph-dist/docker/scripts/detect-storage.groovy b/hugegraph-dist/docker/scripts/detect-storage.groovy new file mode 100644 index 0000000000..df57ade988 --- /dev/null +++ b/hugegraph-dist/docker/scripts/detect-storage.groovy @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +import org.apache.hugegraph.HugeFactory +import org.apache.hugegraph.dist.RegisterUtil + +// register all the backend to avoid changes if docker needs to support othre backend +RegisterUtil.registerPlugins() +RegisterUtil.registerRocksDB() +RegisterUtil.registerCassandra() +RegisterUtil.registerScyllaDB() +RegisterUtil.registerHBase() +RegisterUtil.registerMysql() +RegisterUtil.registerPalo() +RegisterUtil.registerPostgresql() + +graph = HugeFactory.open('./conf/graphs/hugegraph.properties') diff --git a/hugegraph-dist/docker/scripts/remote-connect.groovy b/hugegraph-dist/docker/scripts/remote-connect.groovy new file mode 100644 index 0000000000..e352cdc7e9 --- /dev/null +++ b/hugegraph-dist/docker/scripts/remote-connect.groovy @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +:remote connect tinkerpop.server conf/remote.yaml +:> hugegraph diff --git a/hugegraph-dist/release-docs/LICENSE b/hugegraph-dist/release-docs/LICENSE index f1cc9686c8..25c50c2fbb 100644 --- a/hugegraph-dist/release-docs/LICENSE +++ b/hugegraph-dist/release-docs/LICENSE @@ -220,6 +220,7 @@ The text of each license is the standard Apache 2.0 license. hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph +hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java from https://github.com/apache/tinkerpop hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java from https://github.com/apache/tinkerpop hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java from https://github.com/apache/tinkerpop diff --git a/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh b/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh new file mode 100644 index 0000000000..e1fad4a9ff --- /dev/null +++ b/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh @@ -0,0 +1,24 @@ +#!/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. +# + + +./bin/wait-storage.sh + +./bin/init-store.sh + +./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc diff --git a/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh b/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh index b8a0fadbd2..edcdc0c403 100755 --- a/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh +++ b/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh @@ -84,14 +84,10 @@ PROFILING_ENABLED=false # Process options MAIN_CLASS=org.apache.tinkerpop.gremlin.console.Console -while getopts "elpv" opt; do +while getopts "lpv" opt; do case "$opt" in - e) MAIN_CLASS=org.apache.tinkerpop.gremlin.groovy.jsr223.ScriptExecutor - # Stop processing gremlin-console.sh arguments as soon as the -e switch - # is seen; everything following -e becomes arguments to the - # ScriptExecutor main class. This maintains compatibility with - # older deployments. - break;; + # class ScriptExecutor has been Deprecated. + # reference https://tinkerpop.apache.org/javadocs/3.2.3/full/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.html l) eval GREMLIN_LOG_LEVEL=\$$OPTIND OPTIND="$(( $OPTIND + 1 ))" if [ "$GREMLIN_LOG_LEVEL" = "TRACE" -o \ diff --git a/hugegraph-dist/src/assembly/static/bin/wait-storage.sh b/hugegraph-dist/src/assembly/static/bin/wait-storage.sh new file mode 100644 index 0000000000..3a98e8c56e --- /dev/null +++ b/hugegraph-dist/src/assembly/static/bin/wait-storage.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# +# Copyright 2023 JanusGraph Authors +# +# 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. +# + +function abs_path() { + SOURCE="${BASH_SOURCE[0]}" + while [[ -h "$SOURCE" ]]; do + DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" + done + cd -P "$(dirname "$SOURCE")" && pwd +} + +BIN=$(abs_path) +TOP="$(cd "$BIN"/../ && pwd)" +GRAPH_CONF="$TOP/conf/graphs/hugegraph.properties" +WAIT_STORAGE_TIMEOUT_S=120 +DETECT_STORAGE="$TOP/scripts/detect-storage.groovy" + +. "$BIN"/util.sh + +# apply config from env +while IFS=' ' read -r envvar_key envvar_val; do + if [[ "${envvar_key}" =~ hugegraph\. ]] && [[ ! -z ${envvar_val} ]]; then + envvar_key=${envvar_key#"hugegraph."} + if grep -q -E "^\s*${envvar_key}\s*=\.*" ${GRAPH_CONF}; then + sed -ri "s#^(\s*${envvar_key}\s*=).*#\\1${envvar_val}#" ${GRAPH_CONF} + else + echo "${envvar_key}=${envvar_val}" >> ${GRAPH_CONF} + fi + else + continue + fi +done < <(env | sort -r | awk -F= '{ st = index($0, "="); print $1 " " substr($0, st+1) }') + +# wait for storage +if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then + timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \ + "until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done" +fi From b43526da604d78674d9644b30058627dd68ed51b Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:24:43 +0800 Subject: [PATCH 16/51] fix: always wait for storage if rocksdb is selected (#2333) --- hugegraph-dist/src/assembly/static/bin/wait-storage.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hugegraph-dist/src/assembly/static/bin/wait-storage.sh b/hugegraph-dist/src/assembly/static/bin/wait-storage.sh index 3a98e8c56e..bdadeab234 100644 --- a/hugegraph-dist/src/assembly/static/bin/wait-storage.sh +++ b/hugegraph-dist/src/assembly/static/bin/wait-storage.sh @@ -48,7 +48,9 @@ while IFS=' ' read -r envvar_key envvar_val; do done < <(env | sort -r | awk -F= '{ st = index($0, "="); print $1 " " substr($0, st+1) }') # wait for storage -if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then - timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \ - "until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done" +if env | grep '^hugegraph\.' > /dev/null; then + if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then + timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \ + "until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done" + fi fi From 8db0a9b19532ba7d05303009e404602cc5048762 Mon Sep 17 00:00:00 2001 From: Wu Chencan <77946882+DanGuge@users.noreply.github.com> Date: Tue, 24 Oct 2023 06:33:24 -0500 Subject: [PATCH 17/51] feat(core): support batch+parallel edges traverse (#2312) ## Main Changes - Enhance Consumers.java, supporting ExceptionHandle and `Future` to handle InterruptedException when awaiting - Add Nested Iterator Edge and support batch execution - Support batch execution & thread parallel in KoutTraverser and Kneighbor --- .../backend/query/EdgesQueryIterator.java | 64 +++++ .../apache/hugegraph/task/TaskManager.java | 15 +- .../traversal/algorithm/HugeTraverser.java | 45 ++++ .../algorithm/KneighborTraverser.java | 56 +++-- .../traversal/algorithm/KoutTraverser.java | 76 +++--- .../traversal/algorithm/OltpTraverser.java | 223 +++++++++++++++++- .../algorithm/records/KneighborRecords.java | 14 +- .../traversal/algorithm/steps/Steps.java | 4 + .../org/apache/hugegraph/util/Consumers.java | 128 +++++++--- .../backend/store/rocksdb/RocksDBStore.java | 13 +- 10 files changed, 516 insertions(+), 122 deletions(-) create mode 100644 hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java new file mode 100644 index 0000000000..4ab9a8859a --- /dev/null +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.backend.query; + +import java.util.Iterator; +import java.util.List; + +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.backend.tx.GraphTransaction; +import org.apache.hugegraph.type.define.Directions; + +public class EdgesQueryIterator implements Iterator { + + private final List labels; + private final Directions directions; + private final long limit; + private final Iterator sources; + + public EdgesQueryIterator(Iterator sources, + Directions directions, + List labels, + long limit) { + this.sources = sources; + this.labels = labels; + this.directions = directions; + // Traverse NO_LIMIT 和 Query.NO_LIMIT 不同 + this.limit = limit < 0 ? Query.NO_LIMIT : limit; + } + + @Override + public boolean hasNext() { + return sources.hasNext(); + } + + @Override + public Query next() { + Id sourceId = this.sources.next(); + ConditionQuery query = GraphTransaction.constructEdgesQuery(sourceId, + this.directions, + this.labels); + if (this.limit != Query.NO_LIMIT) { + query.limit(this.limit); + query.capacity(this.limit); + } else { + query.capacity(Query.NO_CAPACITY); + } + return query; + } +} diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java b/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java index 524a1f7593..0ad96f443c 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java @@ -26,16 +26,17 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.apache.hugegraph.HugeException; +import org.apache.hugegraph.HugeGraphParams; +import org.apache.hugegraph.concurrent.PausableScheduledThreadPool; import org.apache.hugegraph.type.define.NodeRole; -import org.apache.hugegraph.util.*; import org.apache.hugegraph.util.Consumers; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.ExecutorUtil; import org.apache.hugegraph.util.LockUtil; +import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -import org.apache.hugegraph.HugeException; -import org.apache.hugegraph.HugeGraphParams; -import org.apache.hugegraph.concurrent.PausableScheduledThreadPool; - public final class TaskManager { private static final Logger LOG = Log.logger(TaskManager.class); @@ -48,7 +49,7 @@ public final class TaskManager { public static final String TASK_SCHEDULER = "task-scheduler-%d"; protected static final long SCHEDULE_PERIOD = 1000L; // unit ms - + private static final long TX_CLOSE_TIMEOUT = 30L; // unit s private static final int THREADS = 4; private static final TaskManager MANAGER = new TaskManager(THREADS); @@ -134,7 +135,7 @@ private void closeTaskTx(HugeGraphParams graph) { graph.closeTx(); } else { Consumers.executeOncePerThread(this.taskExecutor, totalThreads, - graph::closeTx); + graph::closeTx, TX_CLOSE_TIMEOUT); } } catch (Exception e) { throw new HugeException("Exception when closing task tx", e); diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java index f5415d9c51..194576e857 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java @@ -17,6 +17,8 @@ package org.apache.hugegraph.traversal.algorithm; +import java.io.Closeable; +import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -37,6 +39,7 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.query.Aggregate; import org.apache.hugegraph.backend.query.ConditionQuery; +import org.apache.hugegraph.backend.query.EdgesQueryIterator; import org.apache.hugegraph.backend.query.Query; import org.apache.hugegraph.backend.query.QueryResults; import org.apache.hugegraph.backend.tx.GraphTransaction; @@ -66,6 +69,7 @@ import org.apache.hugegraph.util.collection.ObjectIntMapping; import org.apache.hugegraph.util.collection.ObjectIntMappingFactory; import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; import org.slf4j.Logger; import com.google.common.collect.ImmutableList; @@ -465,6 +469,13 @@ private Iterator edgesOfVertex(Id source, EdgeStep edgeStep, return edgeStep.skipSuperNodeIfNeeded(edges); } + public EdgesIterator edgesOfVertices(Iterator sources, + Directions dir, + List labelIds, + long degree) { + return new EdgesIterator(new EdgesQueryIterator(sources, dir, labelIds, degree)); + } + public Iterator edgesOfVertex(Id source, Steps steps) { List edgeLabels = steps.edgeLabels(); ConditionQuery cq = GraphTransaction.constructEdgesQuery( @@ -474,6 +485,11 @@ public Iterator edgesOfVertex(Id source, Steps steps) { cq.limit(steps.limit()); } + if (steps.isEdgeEmpty()) { + Iterator edges = this.graph().edges(cq); + return edgesOfVertexStep(edges, steps); + } + Map edgeConditions = getFilterQueryConditions(steps.edgeSteps(), HugeType.EDGE); @@ -1004,4 +1020,33 @@ public Set getEdges(Iterator vertexIter) { return edges; } } + + public class EdgesIterator implements Iterator>, Closeable { + + private final Iterator> currentIter; + + public EdgesIterator(EdgesQueryIterator queries) { + List> iteratorList = new ArrayList<>(); + while (queries.hasNext()) { + Iterator edges = graph.edges(queries.next()); + iteratorList.add(edges); + } + this.currentIter = iteratorList.iterator(); + } + + @Override + public boolean hasNext() { + return this.currentIter.hasNext(); + } + + @Override + public Iterator next() { + return this.currentIter.next(); + } + + @Override + public void close() throws IOException { + CloseableIterator.closeIterator(currentIter); + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java index 9f16f480b2..565d0af5f6 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java @@ -17,11 +17,11 @@ package org.apache.hugegraph.traversal.algorithm; -import java.util.Iterator; import java.util.Set; import java.util.function.Consumer; import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.EdgeId; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KneighborRecords; @@ -48,25 +48,27 @@ public Set kneighbor(Id sourceV, Directions dir, Id labelId = this.getEdgeLabelId(label); - Set latest = newSet(); - Set all = newSet(); + KneighborRecords records = new KneighborRecords(true, sourceV, true); - latest.add(sourceV); - this.vertexIterCounter.addAndGet(1L); + Consumer consumer = edgeId -> { + if (this.reachLimit(limit, records.size())) { + return; + } + records.addPath(edgeId.ownerVertexId(), edgeId.otherVertexId()); + }; while (depth-- > 0) { - long remaining = limit == NO_LIMIT ? NO_LIMIT : limit - all.size(); - latest = this.adjacentVertices(sourceV, latest, dir, labelId, - all, degree, remaining); - all.addAll(latest); - this.vertexIterCounter.addAndGet(1L); - this.edgeIterCounter.addAndGet(latest.size()); - if (reachLimit(limit, all.size())) { + records.startOneLayer(true); + traverseIdsByBfs(records.keys(), dir, labelId, degree, NO_LIMIT, consumer); + records.finishOneLayer(); + if (reachLimit(limit, records.size())) { break; } } - return all; + this.vertexIterCounter.addAndGet(records.size()); + + return records.idsBySet(limit); } public KneighborRecords customizedKneighbor(Id source, Steps steps, @@ -76,33 +78,29 @@ public KneighborRecords customizedKneighbor(Id source, Steps steps, checkPositive(maxDepth, "k-neighbor max_depth"); checkLimit(limit); - boolean concurrent = maxDepth >= this.concurrentDepth(); - - KneighborRecords records = new KneighborRecords(concurrent, + KneighborRecords records = new KneighborRecords(true, source, true); - Consumer consumer = v -> { + Consumer consumer = edge -> { if (this.reachLimit(limit, records.size())) { return; } - Iterator edges = edgesOfVertex(v, steps); - this.vertexIterCounter.addAndGet(1L); - while (!this.reachLimit(limit, records.size()) && edges.hasNext()) { - HugeEdge edge = (HugeEdge) edges.next(); - Id target = edge.id().otherVertexId(); - records.addPath(v, target); - - records.edgeResults().addEdge(v, target, edge); - - this.edgeIterCounter.addAndGet(1L); - } + EdgeId edgeId = ((HugeEdge) edge).id(); + records.addPath(edgeId.ownerVertexId(), edgeId.otherVertexId()); + records.edgeResults().addEdge(edgeId.ownerVertexId(), edgeId.otherVertexId(), edge); }; while (maxDepth-- > 0) { records.startOneLayer(true); - traverseIds(records.keys(), consumer, concurrent); + traverseIdsByBfs(records.keys(), steps, NO_LIMIT, consumer); records.finishOneLayer(); + if (this.reachLimit(limit, records.size())) { + break; + } } + + this.vertexIterCounter.addAndGet(records.size()); + return records; } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java index 9924c766c5..c683694c14 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java @@ -18,12 +18,15 @@ package org.apache.hugegraph.traversal.algorithm; import java.util.Iterator; +import java.util.List; import java.util.Set; import java.util.function.Consumer; import org.apache.hugegraph.HugeException; import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.EdgeId; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.backend.query.Query; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.traversal.algorithm.records.KoutRecords; import org.apache.hugegraph.traversal.algorithm.steps.Steps; @@ -57,34 +60,45 @@ public Set kout(Id sourceV, Directions dir, String label, Id labelId = this.getEdgeLabelId(label); - Set latest = newIdSet(); - latest.add(sourceV); + Set sources = newIdSet(); + Set neighbors = newIdSet(); + Set visited = nearest ? newIdSet() : null; - Set all = newIdSet(); - all.add(sourceV); + neighbors.add(sourceV); + + ConcurrentVerticesConsumer consumer; + + long remaining = capacity == NO_LIMIT ? NO_LIMIT : capacity - 1; - long remaining = capacity == NO_LIMIT ? - NO_LIMIT : capacity - latest.size(); - this.vertexIterCounter.addAndGet(1L); while (depth-- > 0) { // Just get limit nodes in last layer if limit < remaining capacity if (depth == 0 && limit != NO_LIMIT && (limit < remaining || remaining == NO_LIMIT)) { remaining = limit; } - if (nearest) { - latest = this.adjacentVertices(sourceV, latest, dir, labelId, - all, degree, remaining); - all.addAll(latest); - } else { - latest = this.adjacentVertices(sourceV, latest, dir, labelId, - null, degree, remaining); + + if (visited != null) { + visited.addAll(neighbors); } - this.vertexIterCounter.addAndGet(1L); - this.edgeIterCounter.addAndGet(latest.size()); + + // swap sources and neighbors + Set tmp = neighbors; + neighbors = sources; + sources = tmp; + + // start + consumer = new ConcurrentVerticesConsumer(sourceV, visited, remaining, neighbors); + + this.vertexIterCounter.addAndGet(sources.size()); + this.edgeIterCounter.addAndGet(neighbors.size()); + + traverseIdsByBfs(sources.iterator(), dir, labelId, degree, capacity, consumer); + + sources.clear(); + if (capacity != NO_LIMIT) { // Update 'remaining' value to record remaining capacity - remaining -= latest.size(); + remaining -= neighbors.size(); if (remaining <= 0 && depth > 0) { throw new HugeException( @@ -94,7 +108,7 @@ public Set kout(Id sourceV, Directions dir, String label, } } - return latest; + return neighbors; } public KoutRecords customizedKout(Id source, Steps steps, @@ -107,33 +121,25 @@ public KoutRecords customizedKout(Id source, Steps steps, checkLimit(limit); long[] depth = new long[1]; depth[0] = maxDepth; - boolean concurrent = maxDepth >= this.concurrentDepth(); - KoutRecords records = new KoutRecords(concurrent, source, nearest, 0); + KoutRecords records = new KoutRecords(true, source, nearest, 0); - Consumer consumer = v -> { + Consumer consumer = edge -> { if (this.reachLimit(limit, depth[0], records.size())) { return; } - Iterator edges = edgesOfVertex(v, steps); - this.vertexIterCounter.addAndGet(1L); - while (!this.reachLimit(limit, depth[0], records.size()) && - edges.hasNext()) { - HugeEdge edge = (HugeEdge) edges.next(); - Id target = edge.id().otherVertexId(); - records.addPath(v, target); - this.checkCapacity(capacity, records.accessed(), depth[0]); - - records.edgeResults().addEdge(v, target, edge); - - this.edgeIterCounter.addAndGet(1L); - } + EdgeId edgeId = ((HugeEdge) edge).id(); + records.addPath(edgeId.ownerVertexId(), edgeId.otherVertexId()); + records.edgeResults().addEdge(edgeId.ownerVertexId(), edgeId.otherVertexId(), edge); }; while (depth[0]-- > 0) { + List sources = records.ids(Query.NO_LIMIT); records.startOneLayer(true); - this.traverseIds(records.keys(), consumer, concurrent); + traverseIdsByBfs(sources.iterator(), steps, capacity, consumer); + this.vertexIterCounter.addAndGet(sources.size()); records.finishOneLayer(); + checkCapacity(capacity, records.accessed(), depth[0]); } return records; } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java index b05de24228..c05d8f89f4 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java @@ -17,24 +17,36 @@ package org.apache.hugegraph.traversal.algorithm; +import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import com.google.common.base.Objects; import org.apache.commons.lang3.tuple.Pair; import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.EdgeId; import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.backend.query.EdgesQueryIterator; import org.apache.hugegraph.config.CoreOptions; +import org.apache.hugegraph.iterator.FilterIterator; +import org.apache.hugegraph.iterator.MapperIterator; +import org.apache.hugegraph.structure.HugeEdge; +import org.apache.hugegraph.traversal.algorithm.steps.Steps; +import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.Consumers; +import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Element; import org.apache.tinkerpop.gremlin.structure.Property; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator; -import org.apache.hugegraph.iterator.FilterIterator; +import com.google.common.base.Objects; public abstract class OltpTraverser extends HugeTraverser implements AutoCloseable { @@ -75,7 +87,7 @@ public static void destroy() { protected long traversePairs(Iterator> pairs, Consumer> consumer) { - return this.traverse(pairs, consumer, "traverse-pairs"); + return this.traverseByOne(pairs, consumer, "traverse-pairs"); } protected long traverseIds(Iterator ids, Consumer consumer, @@ -93,18 +105,19 @@ protected long traverseIds(Iterator ids, Consumer consumer, } protected long traverseIds(Iterator ids, Consumer consumer) { - return this.traverse(ids, consumer, "traverse-ids"); + return this.traverseByOne(ids, consumer, "traverse-ids"); } - protected long traverse(Iterator iterator, Consumer consumer, - String name) { + protected long traverseByOne(Iterator iterator, + Consumer consumer, + String taskName) { if (!iterator.hasNext()) { return 0L; } Consumers consumers = new Consumers<>(executors.getExecutor(), consumer, null); - consumers.start(name); + consumers.start(taskName); long total = 0L; try { while (iterator.hasNext()) { @@ -129,11 +142,101 @@ protected long traverse(Iterator iterator, Consumer consumer, return total; } + protected void traverseIdsByBfs(Iterator vertices, + Directions dir, + Id label, + long degree, + long capacity, + Consumer consumer) { + List labels = label == null ? Collections.emptyList() : + Collections.singletonList(label); + OneStepEdgeIterConsumer edgeIterConsumer = new OneStepEdgeIterConsumer(consumer, capacity); + + EdgesIterator edgeIter = edgesOfVertices(vertices, dir, labels, degree); + + // parallel out-of-order execution + this.traverseByBatch(edgeIter, edgeIterConsumer, "traverse-bfs-step", 1); + } + + protected void traverseIdsByBfs(Iterator vertices, + Steps steps, + long capacity, + Consumer consumer) { + StepsEdgeIterConsumer edgeIterConsumer = + new StepsEdgeIterConsumer(consumer, capacity, steps); + + EdgesQueryIterator queryIterator = new EdgesQueryIterator(vertices, + steps.direction(), + steps.edgeLabels(), + steps.degree()); + + // get Iterator> from Iterator + EdgesIterator edgeIter = new EdgesIterator(queryIterator); + + // parallel out-of-order execution + this.traverseByBatch(edgeIter, edgeIterConsumer, "traverse-bfs-steps", 1); + } + + protected long traverseByBatch(Iterator> sources, + Consumer> consumer, + String taskName, int concurrentWorkers) { + if (!sources.hasNext()) { + return 0L; + } + AtomicBoolean done = new AtomicBoolean(false); + Consumers> consumers = null; + try { + consumers = buildConsumers(consumer, concurrentWorkers, done, + executors.getExecutor()); + return startConsumers(sources, taskName, done, consumers); + } finally { + assert consumers != null; + executors.returnExecutor(consumers.executor()); + } + } + + private long startConsumers(Iterator> sources, + String taskName, + AtomicBoolean done, + Consumers> consumers) { + long total = 0L; + try { + consumers.start(taskName); + while (sources.hasNext() && !done.get()) { + total++; + Iterator v = sources.next(); + consumers.provide(v); + } + } catch (Consumers.StopExecution e) { + // pass + } catch (Throwable e) { + throw Consumers.wrapException(e); + } finally { + try { + consumers.await(); + } catch (Throwable e) { + throw Consumers.wrapException(e); + } finally { + CloseableIterator.closeIterator(sources); + } + } + return total; + } + + private Consumers> buildConsumers(Consumer> consumer, + int queueSizePerWorker, + AtomicBoolean done, + ExecutorService executor) { + return new Consumers<>(executor, + consumer, + null, + e -> done.set(true), + queueSizePerWorker); + } + protected Iterator filter(Iterator vertices, String key, Object value) { - return new FilterIterator<>(vertices, vertex -> { - return match(vertex, key, value); - }); + return new FilterIterator<>(vertices, vertex -> match(vertex, key, value)); } protected boolean match(Element elem, String key, Object value) { @@ -175,4 +278,104 @@ public List getValues(K key) { return values; } } + + public static class ConcurrentVerticesConsumer implements Consumer { + + private final Id sourceV; + private final Set excluded; + private final Set neighbors; + private final long limit; + private final AtomicInteger count; + + public ConcurrentVerticesConsumer(Id sourceV, Set excluded, long limit, + Set neighbors) { + this.sourceV = sourceV; + this.excluded = excluded; + this.limit = limit; + this.neighbors = neighbors; + this.count = new AtomicInteger(0); + } + + @Override + public void accept(EdgeId edgeId) { + if (this.limit != NO_LIMIT && count.get() >= this.limit) { + throw new Consumers.StopExecution("reach limit"); + } + + Id targetV = edgeId.otherVertexId(); + if (this.sourceV.equals(targetV)) { + return; + } + + if (this.excluded != null && this.excluded.contains(targetV)) { + return; + } + + if (this.neighbors.add(targetV)) { + if (this.limit != NO_LIMIT) { + this.count.getAndIncrement(); + } + } + } + } + + public abstract class EdgesConsumer implements Consumer> { + + private final Consumer consumer; + private final long capacity; + + public EdgesConsumer(Consumer consumer, long capacity) { + this.consumer = consumer; + this.capacity = capacity; + } + + protected abstract Iterator prepare(Iterator iter); + + @Override + public void accept(Iterator edgeIter) { + Iterator ids = prepare(edgeIter); + long counter = 0; + while (ids.hasNext()) { + if (Thread.currentThread().isInterrupted()) { + LOG.warn("Consumer is Interrupted"); + break; + } + counter++; + this.consumer.accept(ids.next()); + } + long total = edgeIterCounter.addAndGet(counter); + // traverse by batch & improve performance + if (this.capacity != NO_LIMIT && total >= this.capacity) { + throw new Consumers.StopExecution("reach capacity"); + } + } + } + + public class OneStepEdgeIterConsumer extends EdgesConsumer { + + public OneStepEdgeIterConsumer(Consumer consumer, long capacity) { + super(consumer, capacity); + } + + @Override + protected Iterator prepare(Iterator edgeIter) { + return new MapperIterator<>(edgeIter, (e) -> ((HugeEdge) e).id()); + } + } + + public class StepsEdgeIterConsumer extends EdgesConsumer { + + private final Steps steps; + + public StepsEdgeIterConsumer(Consumer consumer, long capacity, + Steps steps) { + super(consumer, capacity); + this.steps = steps; + } + + @Override + protected Iterator prepare(Iterator edgeIter) { + return edgesOfVertexStep(edgeIter, this.steps); + } + } } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java index 7e04a286c3..649b1c2116 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java @@ -19,7 +19,9 @@ import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.NO_LIMIT; +import java.util.Collection; import java.util.List; +import java.util.Set; import java.util.Stack; import org.apache.hugegraph.backend.id.Id; @@ -45,6 +47,17 @@ public int size() { @Override public List ids(long limit) { List ids = CollectionFactory.newList(CollectionType.EC); + this.getRecords(limit, ids); + return ids; + } + + public Set idsBySet(long limit) { + Set ids = CollectionFactory.newSet(CollectionType.EC); + this.getRecords(limit, ids); + return ids; + } + + private void getRecords(long limit, Collection ids) { Stack records = this.records(); // Not include record(i=0) to ignore source vertex for (int i = 1; i < records.size(); i++) { @@ -54,7 +67,6 @@ public List ids(long limit) { limit--; } } - return ids; } @Override diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java index d1a9238be1..c2a1a7e1e1 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java @@ -138,6 +138,10 @@ public List edgeLabels() { return new ArrayList<>(this.edgeSteps.keySet()); } + public boolean isEdgeEmpty() { + return this.edgeSteps.isEmpty(); + } + public boolean isVertexEmpty() { return this.vertexSteps.isEmpty(); } diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java b/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java index 00689e0c5e..06e678fd98 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java @@ -27,16 +27,16 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import org.apache.hugegraph.config.CoreOptions; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeException; +import org.apache.hugegraph.config.CoreOptions; import org.apache.hugegraph.task.TaskManager.ContextCallable; +import org.slf4j.Logger; public final class Consumers { @@ -46,16 +46,16 @@ public final class Consumers { private static final Logger LOG = Log.logger(Consumers.class); + private final V QUEUE_END = (V) new Object(); private final ExecutorService executor; private final Consumer consumer; - private final Runnable done; - + private final Runnable doneHandle; + private final Consumer exceptionHandle; private final int workers; + private final List runningFutures; 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) { @@ -63,23 +63,40 @@ public Consumers(ExecutorService executor, Consumer consumer) { } public Consumers(ExecutorService executor, - Consumer consumer, Runnable done) { + Consumer consumer, Runnable doneHandle) { + this(executor, consumer, doneHandle, QUEUE_WORKER_SIZE); + } + + public Consumers(ExecutorService executor, + Consumer consumer, + Runnable doneHandle, + int queueSizePerWorker) { + this(executor, consumer, doneHandle, null, queueSizePerWorker); + } + + public Consumers(ExecutorService executor, + Consumer consumer, + Runnable doneHandle, + Consumer exceptionHandle, + int queueSizePerWorker) { this.executor = executor; this.consumer = consumer; - this.done = done; + this.doneHandle = doneHandle; + this.exceptionHandle = exceptionHandle; int workers = THREADS; if (this.executor instanceof ThreadPoolExecutor) { workers = ((ThreadPoolExecutor) this.executor).getCorePoolSize(); } this.workers = workers; - this.queueSize = QUEUE_WORKER_SIZE * workers; + + this.runningFutures = new ArrayList<>(workers); + this.queueSize = queueSizePerWorker * workers + 1; 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; @@ -87,7 +104,8 @@ public void start(String name) { LOG.info("Starting {} workers[{}] with queue size {}...", this.workers, name, this.queueSize); for (int i = 0; i < this.workers; i++) { - this.executor.submit(new ContextCallable<>(this::runAndDone)); + this.runningFutures.add( + this.executor.submit(new ContextCallable<>(this::runAndDone))); } } @@ -95,11 +113,15 @@ 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)) { + if (e instanceof StopExecution) { + this.queue.clear(); + putQueueEnd(); + } else { + // Only the first exception to one thread can be stored + this.exception = e; LOG.error("Error when running task", e); } + exceptionHandle(e); } finally { this.done(); this.latch.countDown(); @@ -109,11 +131,7 @@ private Void runAndDone() { private void run() { LOG.debug("Start to work..."); - while (!this.ending) { - this.consume(); - } - assert this.ending; - while (this.consume()){ + while (this.consume()) { // ignore } @@ -121,14 +139,18 @@ private void run() { } private boolean consume() { - V elem; - try { - elem = this.queue.poll(CONSUMER_WAKE_PERIOD, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - // ignore - return true; + V elem = null; + while (elem == null) { + try { + elem = this.queue.poll(CONSUMER_WAKE_PERIOD, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + // ignore + return false; + } } - if (elem == null) { + + if (elem == QUEUE_END) { + putQueueEnd(); return false; } // do job @@ -136,13 +158,29 @@ private boolean consume() { return true; } + private void exceptionHandle(Throwable e) { + if (this.exceptionHandle == null) { + return; + } + + try { + this.exceptionHandle.accept(e); + } catch (Throwable ex) { + if (this.exception == null) { + this.exception = ex; + } else { + LOG.warn("Error while calling exceptionHandle()", ex); + } + } + } + private void done() { - if (this.done == null) { + if (this.doneHandle == null) { return; } try { - this.done.run(); + this.doneHandle.run(); } catch (Throwable e) { if (this.exception == null) { this.exception = e; @@ -169,6 +207,16 @@ public void provide(V v) throws Throwable { } else { try { this.queue.put(v); + } catch (InterruptedException e) { + LOG.warn("Interrupt while queuing QUEUE_END", e); + } + } + } + + private void putQueueEnd() { + if (this.executor != null) { + try { + this.queue.put(QUEUE_END); } catch (InterruptedException e) { LOG.warn("Interrupted while enqueue", e); } @@ -176,15 +224,18 @@ public void provide(V v) throws Throwable { } public void await() throws Throwable { - this.ending = true; if (this.executor == null) { // call done() directly if without thread pool this.done(); } else { try { + putQueueEnd(); this.latch.await(); } catch (InterruptedException e) { String error = "Interrupted while waiting for consumers"; + for (Future f : this.runningFutures) { + f.cancel(true); + } this.exception = new HugeException(error, e); LOG.warn(error, e); } @@ -201,7 +252,8 @@ public ExecutorService executor() { public static void executeOncePerThread(ExecutorService executor, int totalThreads, - Runnable callback) + Runnable callback, + long invokeTimeout) throws InterruptedException { // Ensure callback execute at least once for every thread final Map threadsTimes = new ConcurrentHashMap<>(); @@ -230,7 +282,7 @@ public static void executeOncePerThread(ExecutorService executor, for (int i = 0; i < totalThreads; i++) { tasks.add(task); } - executor.invokeAll(tasks); + executor.invokeAll(tasks, invokeTimeout, TimeUnit.SECONDS); } public static ExecutorService newThreadPool(String prefix, int workers) { @@ -290,13 +342,21 @@ public synchronized ExecutorService getExecutor() { public synchronized void returnExecutor(ExecutorService executor) { E.checkNotNull(executor, "executor"); if (!this.executors.offer(executor)) { - executor.shutdown(); + try { + executor.shutdown(); + } catch (Exception e) { + LOG.warn("close ExecutorService with error:", e); + } } } public synchronized void destroy() { for (ExecutorService executor : this.executors) { - executor.shutdown(); + try { + executor.shutdownNow(); + } catch (Exception e) { + LOG.warn("close ExecutorService with error:", e); + } } this.executors.clear(); } diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java b/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java index 2dba5fa766..283baa622a 100644 --- a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java +++ b/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java @@ -44,9 +44,6 @@ import java.util.stream.Collectors; import org.apache.commons.io.FileUtils; -import org.rocksdb.RocksDBException; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeException; import org.apache.hugegraph.backend.BackendException; import org.apache.hugegraph.backend.id.Id; @@ -69,6 +66,9 @@ import org.apache.hugegraph.util.ExecutorUtil; import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.Log; +import org.rocksdb.RocksDBException; +import org.slf4j.Logger; + import com.google.common.collect.ImmutableList; public abstract class RocksDBStore extends AbstractBackendStore { @@ -93,7 +93,8 @@ public abstract class RocksDBStore extends AbstractBackendStore Date: Wed, 25 Oct 2023 04:25:07 -0500 Subject: [PATCH 18/51] fix(core): handle schema Cache expandCapacity concurrent problem (#2332) --- .../backend/store/ram/IntObjectMap.java | 9 +-- .../apache/hugegraph/unit/UnitTestSuite.java | 6 +- .../unit/store/RamIntObjectMapTest.java | 72 +++++++++++++++++++ 3 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java index 78af531a07..735f423ce8 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java @@ -29,8 +29,8 @@ public final class IntObjectMap implements RamMap { private static final float DEFAULT_INITIAL_FACTOR = 0.25f; private final int maxSize; - private int currentSize; - private Object[] array; + private volatile int currentSize; + private volatile Object[] array; public IntObjectMap(int size) { this.maxSize = size; @@ -79,10 +79,11 @@ private synchronized void expandCapacity() { if (this.currentSize == this.maxSize) { return; } - this.currentSize = Math.min(this.currentSize * 2, this.maxSize); - Object[] newArray = new Object[this.currentSize]; + int newSize = Math.min(this.currentSize * 2, this.maxSize); + Object[] newArray = new Object[newSize]; System.arraycopy(this.array, 0, newArray, 0, this.array.length); this.clear(); this.array = newArray; + this.currentSize = newSize; } } diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java b/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java index 3b8071f9f1..d72269a4f5 100644 --- a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java @@ -27,6 +27,7 @@ import org.apache.hugegraph.unit.rocksdb.RocksDBCountersTest; import org.apache.hugegraph.unit.rocksdb.RocksDBSessionTest; import org.apache.hugegraph.unit.rocksdb.RocksDBSessionsTest; +import org.apache.hugegraph.unit.store.RamIntObjectMapTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; @@ -148,7 +149,10 @@ Int2IntsMapTest.class, IdSetTest.class, IntMapTest.class, - IntSetTest.class + IntSetTest.class, + + /* store */ + RamIntObjectMapTest.class }) public class UnitTestSuite { } diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java b/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java new file mode 100644 index 0000000000..4e9fe4d95b --- /dev/null +++ b/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.unit.store; + +import java.util.concurrent.CountDownLatch; + +import org.apache.hugegraph.backend.store.ram.IntObjectMap; +import org.junit.Assert; +import org.junit.Test; + +public class RamIntObjectMapTest { + + @Test + public void testConcurrency() { + int size = 32; + IntObjectMap map = new IntObjectMap<>(size); + + final int numThreads = 10; + final CountDownLatch startSignal = new CountDownLatch(1); + final CountDownLatch doneSignal = new CountDownLatch(numThreads); + + for (int i = 0; i < numThreads; i++) { + new Thread(() -> { + try { + startSignal.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } + + for (int j = 0; j < size; j++) { + map.set(j, j); + } + + doneSignal.countDown(); + }).start(); + } + + startSignal.countDown(); + + try { + doneSignal.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } + + for (int i = 0; i < numThreads; i++) { + new Thread(() -> { + for (int j = 0; j < size; j++) { + Integer value = map.get(j); + Assert.assertNotNull(value); + } + }).start(); + } + } +} From 70ab14e3e6e5f9ed5c3b48be4494ae3a5d5baf57 Mon Sep 17 00:00:00 2001 From: lzyxx <94185075+lzyxx77@users.noreply.github.com> Date: Sat, 28 Oct 2023 23:58:17 +0800 Subject: [PATCH 19/51] feat(cassandra): adapt cassandra from 3.11.12 to 4.0.10 (#2300) --- hugegraph-cassandra/pom.xml | 2 +- .../store/cassandra/CassandraMetrics.java | 12 ++--- .../store/cassandra/CassandraShard.java | 4 +- hugegraph-dist/release-docs/LICENSE | 2 +- .../scripts/dependency/known-dependencies.txt | 50 +++++++++++-------- .../src/assembly/travis/install-cassandra.sh | 2 +- 6 files changed, 41 insertions(+), 31 deletions(-) diff --git a/hugegraph-cassandra/pom.xml b/hugegraph-cassandra/pom.xml index 92ad5f6f56..6e12b89935 100644 --- a/hugegraph-cassandra/pom.xml +++ b/hugegraph-cassandra/pom.xml @@ -37,7 +37,7 @@ org.apache.cassandra cassandra-all - 3.11.12 + 4.0.10 org.slf4j diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java index 8759346764..f2f2931c62 100644 --- a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java +++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java @@ -112,7 +112,7 @@ protected Map getMetricsByHost(String host) { metrics.put(DISK_USAGE, UnitUtil.bytesToGB(diskSize)); metrics.put(DISK_USAGE + READABLE, UnitUtil.bytesToReadableString(diskSize)); - metrics.put(DISK_USAGE + "_details", probe.getLoadMap()); + metrics.put(DISK_USAGE + "_details", probe.getLoadMap(false)); metrics.put(DISK_UNIT, "GB"); // Uptime Metrics @@ -125,11 +125,11 @@ protected Map getMetricsByHost(String host) { this.appendExtraMetrics(metrics, probe); // Nodes Metrics - metrics.put("live_nodes", probe.getLiveNodes()); - metrics.put("joining_nodes", probe.getJoiningNodes()); - metrics.put("moving_nodes", probe.getMovingNodes()); - metrics.put("leaving_nodes", probe.getLeavingNodes()); - metrics.put("unreachable_nodes", probe.getUnreachableNodes()); + metrics.put("live_nodes", probe.getLiveNodes(false)); + metrics.put("joining_nodes", probe.getJoiningNodes(false)); + metrics.put("moving_nodes", probe.getMovingNodes(false)); + metrics.put("leaving_nodes", probe.getLeavingNodes(false)); + metrics.put("unreachable_nodes", probe.getUnreachableNodes(false)); // Others metrics.put("keyspaces", probe.getKeyspaces()); diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java index c5734f62e7..9bcefb6aa4 100644 --- a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java +++ b/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java @@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import org.apache.cassandra.config.SchemaConstants; +import org.apache.cassandra.schema.SchemaConstants; import org.apache.cassandra.db.SystemKeyspace; import org.apache.cassandra.dht.ByteOrderedPartitioner; import org.apache.cassandra.dht.IPartitioner; @@ -222,7 +222,7 @@ private static Map describeSplits( "WHERE keyspace_name = ? AND table_name = ? AND " + "range_start = ? AND range_end = ?", SchemaConstants.SYSTEM_KEYSPACE_NAME, - SystemKeyspace.SIZE_ESTIMATES); + SystemKeyspace.LEGACY_SIZE_ESTIMATES); ResultSet resultSet = session.execute(query, keyspace, table, tokenRange.getStart().toString(), diff --git a/hugegraph-dist/release-docs/LICENSE b/hugegraph-dist/release-docs/LICENSE index 25c50c2fbb..b6306df6b5 100644 --- a/hugegraph-dist/release-docs/LICENSE +++ b/hugegraph-dist/release-docs/LICENSE @@ -252,7 +252,7 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * jersey-media-json-jackson (org.glassfish.jersey.media:jersey-media-json-jackson:3.0.3 - https://projects.eclipse.org/projects/ee4j.jersey/project/jersey-media-json-jackson) (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) * Annotations for Metrics (io.dropwizard.metrics:metrics-annotation:4.2.4 - https://metrics.dropwizard.io/metrics-annotation) - (Apache License, Version 2.0) * Apache Cassandra (org.apache.cassandra:cassandra-all:3.11.12 - https://cassandra.apache.org) + (Apache License, Version 2.0) * Apache Cassandra (org.apache.cassandra:cassandra-all:4.0.10 - https://cassandra.apache.org) (Apache License, Version 2.0) * Apache Commons BeanUtils (commons-beanutils:commons-beanutils:1.9.4 - https://commons.apache.org/proper/commons-beanutils/) (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 Codec (commons-codec:commons-codec:1.15 - https://commons.apache.org/proper/commons-codec/) diff --git a/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-dist/scripts/dependency/known-dependencies.txt index b5f5036617..f1388437c7 100644 --- a/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -1,7 +1,7 @@ HdrHistogram-2.1.9.jar ST4-4.0.8.jar accessors-smart-1.2.jar -airline-0.6.jar +airline-0.8.jar animal-sniffer-annotations-1.14.jar annotations-4.1.1.4.jar ansj_seg-5.1.6.jar @@ -9,8 +9,8 @@ antlr-runtime-3.5.2.jar aopalliance-repackaged-3.0.1.jar arthas-agent-attach-3.7.1.jar arthas-packaging-3.7.1.jar -asm-5.0.4.jar asm-6.0.jar +asm-7.1.jar asm-analysis-5.0.3.jar asm-commons-5.0.3.jar asm-tree-5.0.3.jar @@ -21,12 +21,17 @@ bolt-1.6.4.jar byte-buddy-1.10.5.jar byte-buddy-agent-1.10.5.jar byte-buddy-agent-1.11.6.jar -caffeine-2.2.6.jar caffeine-2.3.1.jar -cassandra-all-3.11.12.jar +caffeine-2.5.6.jar +cassandra-all-4.0.10.jar cassandra-driver-core-3.6.0.jar checker-qual-2.0.0.jar checker-qual-3.5.0.jar +chronicle-bytes-2.20.111.jar +chronicle-core-2.20.126.jar +chronicle-queue-5.20.123.jar +chronicle-threads-2.20.111.jar +chronicle-wire-2.20.117.jar classgraph-4.8.95.jar commons-beanutils-1.9.4.jar commons-cli-1.1.jar @@ -40,15 +45,12 @@ commons-configuration-1.10.jar commons-configuration2-2.8.0.jar commons-io-2.7.jar commons-lang-2.6.jar -commons-lang3-3.1.jar commons-lang3-3.11.jar commons-logging-1.1.1.jar commons-logging-1.2.jar commons-math3-3.2.jar commons-text-1.10.0.jar -compress-lzf-0.8.4.jar concurrent-trees-2.4.0.jar -concurrentlinkedhashmap-lru-1.4.jar cypher-gremlin-extensions-1.0.4.jar disruptor-3.3.7.jar eclipse-collections-11.1.0.jar @@ -98,18 +100,20 @@ hk2-api-3.0.1.jar hk2-locator-3.0.1.jar hk2-utils-3.0.1.jar hppc-0.7.1.jar +hppc-0.8.1.jar htrace-core4-4.2.0-incubating.jar httpclient-4.5.13.jar httpcore-4.4.13.jar ikanalyzer-2012_u6.jar ivy-2.4.0.jar j2objc-annotations-1.1.jar -jackson-annotations-2.12.5.jar +j2objc-annotations-1.3.jar +jackson-annotations-2.13.2.jar jackson-annotations-2.14.0-rc1.jar -jackson-core-2.12.5.jar +jackson-core-2.13.2.jar jackson-core-2.14.0-rc1.jar jackson-databind-2.12.1.jar -jackson-databind-2.12.5.jar +jackson-databind-2.13.2.2.jar jackson-databind-2.14.0-rc1.jar jackson-dataformat-yaml-2.9.3.jar jackson-datatype-jsr310-2.12.1.jar @@ -125,7 +129,9 @@ jakarta.servlet-api-5.0.0.jar jakarta.validation-api-3.0.0.jar jakarta.ws.rs-api-3.0.0.jar jakarta.xml.bind-api-4.0.0-RC2.jar -jamm-0.3.0.jar +jamm-0.3.2.jar +java-cup-runtime-11b-20160615.jar +jcommander-1.30.jar javapoet-1.8.0.jar javassist-3.21.0-GA.jar javatuples-1.2.jar @@ -141,8 +147,8 @@ jcabi-manifests-1.1.jar jcip-annotations-1.0-1.jar jcl-over-slf4j-1.7.25.jar jcseg-core-2.6.2.jar -jctools-core-1.2.1.jar jctools-core-2.1.1.jar +jctools-core-3.1.0.jar jersey-apache-connector-3.0.3.jar jersey-client-3.0.3.jar jersey-common-3.0.3.jar @@ -159,7 +165,7 @@ jersey-test-framework-core-3.0.3.jar jersey-test-framework-provider-grizzly2-3.0.3.jar jffi-1.2.16-native.jar jffi-1.2.16.jar -jflex-1.6.0.jar +jflex-1.8.2.jar jieba-analysis-1.0.2.jar jjwt-api-0.11.5.jar jjwt-impl-0.11.5.jar @@ -169,7 +175,7 @@ jna-5.12.1.jar jnr-ffi-2.1.7.jar jnr-x86asm-1.0.2.jar joda-time-2.10.8.jar -joda-time-2.4.jar +jvm-attach-api-1.5.jar jraft-core-1.3.11.jar json-simple-1.1.jar json-smart-2.3.jar @@ -189,7 +195,6 @@ kerby-config-2.0.0.jar kerby-pkix-2.0.0.jar kerby-util-2.0.0.jar kerby-xdr-2.0.0.jar -libthrift-0.9.2.jar log4j-api-2.17.1.jar log4j-core-2.17.1.jar log4j-slf4j-impl-2.17.1.jar @@ -200,7 +205,6 @@ lucene-core-8.11.2.jar lucene-queries-4.7.2.jar lucene-queryparser-4.7.2.jar lucene-sandbox-4.7.2.jar -lz4-1.3.0.jar lz4-java-1.8.0.jar metrics-annotation-4.2.4.jar metrics-core-3.0.2.jar @@ -212,13 +216,15 @@ metrics-jvm-3.1.5.jar metrics-logback-3.1.5.jar mmseg4j-core-1.10.0.jar mockito-core-3.3.3.jar +mxdump-0.14.jar netty-all-4.1.44.Final.jar netty-all-4.1.61.Final.jar +netty-tcnative-boringssl-static-2.0.36.Final.jar nimbus-jose-jwt-4.41.2.jar nlp-lang-1.7.7.jar objenesis-2.6.jar ohc-core-0.7.4.jar -ohc-core-j8-0.4.4.jar +ohc-core-j8-0.5.1.jar opentracing-api-0.22.0.jar opentracing-mock-0.22.0.jar opentracing-noop-0.22.0.jar @@ -231,6 +237,7 @@ perfmark-api-0.25.0.jar picocli-4.3.2.jar postgresql-42.4.1.jar protobuf-java-3.21.7.jar +psjava-0.1.19.jar reporter-config-base-3.0.3.jar reporter-config3-3.0.3.jar rewriting-9.0-9.0.20190305.jar @@ -238,12 +245,15 @@ rocksdbjni-7.2.2.jar scala-java8-compat_2.12-0.8.0.jar scala-library-2.12.7.jar scala-reflect-2.12.7.jar +sjk-cli-0.14.jar +sjk-core-0.14.jar +sjk-json-0.14.jar +sjk-stacktrace-0.14.jar sigar-1.6.4.jar slf4j-api-1.7.25.jar -slf4j-api-1.7.7.jar snakeyaml-1.26.jar snakeyaml-1.27.jar -snappy-java-1.1.1.7.jar +snappy-java-1.1.2.6.jar snowball-stemmer-1.3.0.581.1.jar sofa-common-tools-1.0.12.jar sofa-rpc-all-5.7.6.jar @@ -257,7 +267,6 @@ swagger-integration-jakarta-2.1.9.jar swagger-jaxrs2-jakarta-2.1.9.jar swagger-models-1.5.18.jar swagger-models-jakarta-2.1.9.jar -thrift-server-0.3.7.jar tinkergraph-gremlin-3.5.1.jar token-provider-2.0.0.jar tracer-core-3.0.8.jar @@ -265,3 +274,4 @@ translation-1.0.4.jar util-9.0-9.0.20190305.jar validation-api-1.1.0.Final.jar zt-zip-1.14.jar +zstd-jni-1.5.5-1.jar diff --git a/hugegraph-dist/src/assembly/travis/install-cassandra.sh b/hugegraph-dist/src/assembly/travis/install-cassandra.sh index 367259d141..2bdfe0bf6a 100755 --- a/hugegraph-dist/src/assembly/travis/install-cassandra.sh +++ b/hugegraph-dist/src/assembly/travis/install-cassandra.sh @@ -19,7 +19,7 @@ set -ev TRAVIS_DIR=`dirname $0` CASS_DOWNLOAD_ADDRESS="http://archive.apache.org/dist/cassandra" -CASS_VERSION="3.10" +CASS_VERSION="4.0.10" CASS_PACKAGE="apache-cassandra-${CASS_VERSION}" CASS_TAR="${CASS_PACKAGE}-bin.tar.gz" CASS_CONF="${CASS_PACKAGE}/conf/cassandra.yaml" From 4d5f4195db368ecda4710a9e39f04f5a0f5f4d76 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Mon, 6 Nov 2023 14:15:32 +0800 Subject: [PATCH 20/51] chore(api): add swagger desc for Arthas & Metric & Cypher & White API (#2337) add swagger belong for arthas API --------- Co-authored-by: imbajin --- .github/workflows/ci.yml | 6 ++-- hugegraph-api/pom.xml | 2 +- .../hugegraph/api/arthas/ArthasAPI.java | 5 ++++ .../hugegraph/api/cypher/CypherAPI.java | 3 ++ .../hugegraph/api/job/AlgorithmAPI.java | 3 ++ .../hugegraph/api/metrics/MetricsAPI.java | 11 +++++++ .../hugegraph/api/profile/WhiteIpListAPI.java | 6 ++++ .../scripts/dependency/known-dependencies.txt | 29 ++++++++++--------- pom.xml | 1 + 9 files changed, 49 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 414fd4a3f7..b67021fab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: HEAD_BRANCH_NAME: ${{ github.head_ref }} BASE_BRANCH_NAME: ${{ github.base_ref }} TARGET_BRANCH_NAME: ${{ github.base_ref != '' && github.base_ref || github.ref_name }} - RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }} + RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') }} strategy: fail-fast: false @@ -42,7 +42,7 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 @@ -88,6 +88,6 @@ jobs: $TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3.0.0 + uses: codecov/codecov-action@v3 with: file: ${{ env.REPORT_DIR }}/*.xml diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml index b99cde52cf..ad397f18ee 100644 --- a/hugegraph-api/pom.xml +++ b/hugegraph-api/pom.xml @@ -151,7 +151,7 @@ io.swagger.core.v3 swagger-jaxrs2-jakarta - 2.1.9 + ${swagger.version} diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java index 549f9de0a8..67e65a31a8 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java @@ -27,6 +27,9 @@ import com.codahale.metrics.annotation.Timed; import com.taobao.arthas.agent.attach.ArthasAgent; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + import jakarta.inject.Singleton; import jakarta.ws.rs.PUT; import jakarta.ws.rs.Path; @@ -35,6 +38,7 @@ @Path("arthas") @Singleton +@Tag(name = "ArthasAPI") public class ArthasAPI extends API { @Context @@ -43,6 +47,7 @@ public class ArthasAPI extends API { @PUT @Timed @Produces(APPLICATION_JSON_WITH_CHARSET) + @Operation(summary = "start arthas agent") public Object startArthas() { HugeConfig config = this.configProvider.get(); HashMap configMap = new HashMap<>(4); diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java index bf43d6af44..0018bcd2f2 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java @@ -33,6 +33,8 @@ import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.tags.Tag; + import jakarta.inject.Singleton; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; @@ -47,6 +49,7 @@ @Path("graphs/{graph}/cypher") @Singleton +@Tag(name = "CypherAPI") public class CypherAPI extends API { private static final Logger LOG = Log.logger(CypherAPI.class); diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java index 8e0e7d10c3..8341adad8b 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java @@ -36,6 +36,8 @@ import com.codahale.metrics.annotation.Timed; import com.google.common.collect.ImmutableMap; +import io.swagger.v3.oas.annotations.tags.Tag; + import jakarta.inject.Singleton; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.NotFoundException; @@ -47,6 +49,7 @@ @Path("graphs/{graph}/jobs/algorithm") @Singleton +@Tag(name = "AlgorithmAPI") public class AlgorithmAPI extends API { private static final Logger LOG = Log.logger(RestServer.class); diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java index f74286b5f8..952ac90eeb 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java @@ -70,7 +70,9 @@ import com.codahale.metrics.Metric; import com.codahale.metrics.annotation.Timed; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; + import jakarta.annotation.security.RolesAllowed; import jakarta.inject.Singleton; import jakarta.ws.rs.GET; @@ -103,6 +105,7 @@ public MetricsAPI() { @Path("system") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the system metrics") public String system() { return JsonUtil.toJson(this.systemMetrics.metrics()); } @@ -112,6 +115,7 @@ public String system() { @Path("backend") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the backend metrics") public String backend(@Context GraphManager manager) { Map> results = InsertionOrderUtil.newMap(); for (String graph : manager.graphs()) { @@ -134,6 +138,7 @@ public String backend(@Context GraphManager manager) { @Path("gauges") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the gauges metrics") public String gauges() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.gauges()); @@ -144,6 +149,7 @@ public String gauges() { @Path("counters") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the counters metrics") public String counters() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.counters()); @@ -154,6 +160,7 @@ public String counters() { @Path("histograms") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the histograms metrics") public String histograms() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.histograms()); @@ -164,6 +171,7 @@ public String histograms() { @Path("meters") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the meters metrics") public String meters() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.meters()); @@ -174,6 +182,7 @@ public String meters() { @Path("timers") @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get the timers metrics") public String timers() { ServerReporter reporter = ServerReporter.instance(); return JsonUtil.toJson(reporter.timers()); @@ -183,6 +192,7 @@ public String timers() { @Timed @Produces(APPLICATION_TEXT_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get all base metrics") public String all(@Context GraphManager manager, @QueryParam("type") String type) { if (type != null && type.equals(JSON_STR)) { @@ -197,6 +207,7 @@ public String all(@Context GraphManager manager, @Timed @Produces(APPLICATION_TEXT_WITH_CHARSET) @RolesAllowed({"admin", "$owner= $action=metrics_read"}) + @Operation(summary = "get all statistics metrics") public String statistics(@QueryParam("type") String type) { Map> metricMap = statistics(); diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java index 7503e13822..860da55750 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java @@ -37,6 +37,8 @@ import com.codahale.metrics.annotation.Timed; import com.google.common.collect.ImmutableMap; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.security.RolesAllowed; import jakarta.inject.Singleton; import jakarta.ws.rs.Consumes; @@ -50,6 +52,7 @@ @Path("whiteiplist") @Singleton +@Tag(name = "WhiteIpListAPI") public class WhiteIpListAPI extends API { private static final Logger LOG = Log.logger(WhiteIpListAPI.class); @@ -58,6 +61,7 @@ public class WhiteIpListAPI extends API { @Timed @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed("admin") + @Operation(summary = "list white ips") public Map list(@Context GraphManager manager) { LOG.debug("List white ips"); AuthManager authManager = manager.authManager(); @@ -71,6 +75,7 @@ public Map list(@Context GraphManager manager) { @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON_WITH_CHARSET) @RolesAllowed("admin") + @Operation(summary = "update white ip list") public Map updateWhiteIPs(@Context GraphManager manager, Map actionMap) { E.checkArgument(actionMap != null, "Missing argument: actionMap"); @@ -131,6 +136,7 @@ public Map updateWhiteIPs(@Context GraphManager manager, Map updateStatus(@Context GraphManager manager, @QueryParam("status") String status) { LOG.debug("Enable or disable white ip list"); E.checkArgument("true".equals(status) || diff --git a/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-dist/scripts/dependency/known-dependencies.txt index f1388437c7..d40b204333 100644 --- a/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -32,7 +32,7 @@ chronicle-core-2.20.126.jar chronicle-queue-5.20.123.jar chronicle-threads-2.20.111.jar chronicle-wire-2.20.117.jar -classgraph-4.8.95.jar +classgraph-4.8.162.jar commons-beanutils-1.9.4.jar commons-cli-1.1.jar commons-codec-1.11.jar @@ -112,14 +112,16 @@ jackson-annotations-2.13.2.jar jackson-annotations-2.14.0-rc1.jar jackson-core-2.13.2.jar jackson-core-2.14.0-rc1.jar -jackson-databind-2.12.1.jar jackson-databind-2.13.2.2.jar jackson-databind-2.14.0-rc1.jar +jackson-databind-2.15.2.jar jackson-dataformat-yaml-2.9.3.jar -jackson-datatype-jsr310-2.12.1.jar +jackson-datatype-jsr310-2.15.2.jar +jackson-jakarta-rs-base-2.15.2.jar +jackson-jakarta-rs-json-provider-2.15.2.jar jackson-jaxrs-base-2.14.0-rc1.jar -jackson-jaxrs-json-provider-2.12.1-jakarta.jar jackson-jaxrs-json-provider-2.14.0-rc1.jar +jackson-module-jakarta-xmlbind-annotations-2.15.2.jar jackson-module-jaxb-annotations-2.14.0-rc1.jar jakarta.activation-2.0.1.jar jakarta.activation-api-1.2.2.jar @@ -131,7 +133,6 @@ jakarta.ws.rs-api-3.0.0.jar jakarta.xml.bind-api-4.0.0-RC2.jar jamm-0.3.2.jar java-cup-runtime-11b-20160615.jar -jcommander-1.30.jar javapoet-1.8.0.jar javassist-3.21.0-GA.jar javatuples-1.2.jar @@ -146,6 +147,7 @@ jcabi-log-0.14.jar jcabi-manifests-1.1.jar jcip-annotations-1.0-1.jar jcl-over-slf4j-1.7.25.jar +jcommander-1.30.jar jcseg-core-2.6.2.jar jctools-core-2.1.1.jar jctools-core-3.1.0.jar @@ -175,12 +177,12 @@ jna-5.12.1.jar jnr-ffi-2.1.7.jar jnr-x86asm-1.0.2.jar joda-time-2.10.8.jar -jvm-attach-api-1.5.jar jraft-core-1.3.11.jar json-simple-1.1.jar json-smart-2.3.jar jsr305-3.0.1.jar junit-4.12.jar +jvm-attach-api-1.5.jar kerb-admin-2.0.0.jar kerb-client-2.0.0.jar kerb-common-2.0.0.jar @@ -245,14 +247,15 @@ rocksdbjni-7.2.2.jar scala-java8-compat_2.12-0.8.0.jar scala-library-2.12.7.jar scala-reflect-2.12.7.jar +sigar-1.6.4.jar sjk-cli-0.14.jar sjk-core-0.14.jar sjk-json-0.14.jar sjk-stacktrace-0.14.jar -sigar-1.6.4.jar slf4j-api-1.7.25.jar snakeyaml-1.26.jar snakeyaml-1.27.jar +snakeyaml-2.2.jar snappy-java-1.1.2.6.jar snowball-stemmer-1.3.0.581.1.jar sofa-common-tools-1.0.12.jar @@ -260,18 +263,18 @@ sofa-rpc-all-5.7.6.jar sourcecode_2.12-0.1.4.jar stream-2.5.2.jar swagger-annotations-1.5.18.jar -swagger-annotations-jakarta-2.1.9.jar +swagger-annotations-jakarta-2.2.18.jar swagger-core-1.5.18.jar -swagger-core-jakarta-2.1.9.jar -swagger-integration-jakarta-2.1.9.jar -swagger-jaxrs2-jakarta-2.1.9.jar +swagger-core-jakarta-2.2.18.jar +swagger-integration-jakarta-2.2.18.jar +swagger-jaxrs2-jakarta-2.2.18.jar swagger-models-1.5.18.jar -swagger-models-jakarta-2.1.9.jar +swagger-models-jakarta-2.2.18.jar tinkergraph-gremlin-3.5.1.jar token-provider-2.0.0.jar tracer-core-3.0.8.jar translation-1.0.4.jar util-9.0-9.0.20190305.jar validation-api-1.1.0.Final.jar -zt-zip-1.14.jar zstd-jni-1.5.5-1.jar +zt-zip-1.14.jar diff --git a/pom.xml b/pom.xml index 242263c196..270182e0fa 100644 --- a/pom.xml +++ b/pom.xml @@ -116,6 +116,7 @@ 3.21.7 1.36 3.7.1 + 2.2.18 From 69e6b461add1051831dd6cc0c36a5e249a3b3176 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Mon, 6 Nov 2023 14:34:12 +0800 Subject: [PATCH 21/51] feat(api): support recording slow query log (#2327) * chore(api): code style for cr --------- Co-authored-by: imbajin --- .../hugegraph/api/filter/AccessLogFilter.java | 46 ++++++++++++++++++- .../hugegraph/api/filter/PathFilter.java | 24 ++++++++++ .../hugegraph/config/ServerOptions.java | 9 ++++ .../hugegraph/metrics/SlowQueryLog.java | 43 +++++++++++++++++ .../src/assembly/static/conf/log4j2.xml | 27 +++++++++++ .../static/conf/rest-server.properties | 3 ++ hugegraph-dist/src/main/resources/log4j2.xml | 28 +++++++++++ hugegraph-test/src/main/resources/log4j2.xml | 28 +++++++++++ 8 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java index ba9c981186..3b529cf0a3 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java @@ -17,6 +17,7 @@ package org.apache.hugegraph.api.filter; +import static org.apache.hugegraph.api.filter.PathFilter.REQUEST_PARAMS_JSON; import static org.apache.hugegraph.api.filter.PathFilter.REQUEST_TIME; import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_FAILED_COUNTER; import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_RESPONSE_TIME_HISTOGRAM; @@ -25,12 +26,20 @@ import java.io.IOException; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.ServerOptions; import org.apache.hugegraph.metrics.MetricsUtil; +import org.apache.hugegraph.metrics.SlowQueryLog; +import org.apache.hugegraph.util.JsonUtil; +import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; import jakarta.inject.Singleton; +import jakarta.ws.rs.HttpMethod; import jakarta.ws.rs.container.ContainerRequestContext; import jakarta.ws.rs.container.ContainerResponseContext; import jakarta.ws.rs.container.ContainerResponseFilter; +import jakarta.ws.rs.core.Context; import jakarta.ws.rs.ext.Provider; @@ -39,6 +48,14 @@ public class AccessLogFilter implements ContainerResponseFilter { private static final String DELIMETER = "/"; + private static final String GRAPHS = "graphs"; + private static final String GREMLIN = "gremlin"; + private static final String CYPHER = "cypher"; + + private static final Logger LOG = Log.logger(AccessLogFilter.class); + + @Context + private jakarta.inject.Provider configProvider; /** * Use filter to log request info @@ -62,13 +79,24 @@ public void filter(ContainerRequestContext requestContext, ContainerResponseCont // get responseTime Object requestTime = requestContext.getProperty(REQUEST_TIME); - if(requestTime!=null){ + if(requestTime != null){ long now = System.currentTimeMillis(); - long responseTime = (now - (long)requestTime); + long start = (Long) requestTime; + long responseTime = now - start; MetricsUtil.registerHistogram( join(metricsName, METRICS_PATH_RESPONSE_TIME_HISTOGRAM)) .update(responseTime); + + HugeConfig config = configProvider.get(); + long timeThreshold = config.get(ServerOptions.SLOW_QUERY_LOG_TIME_THRESHOLD); + + // record slow query log + if (timeThreshold > 0 && isSlowQueryLogWhiteAPI(requestContext) && responseTime > timeThreshold) { + SlowQueryLog log = new SlowQueryLog(responseTime, start, (String) requestContext.getProperty(REQUEST_PARAMS_JSON), + method, timeThreshold, path); + LOG.info("Slow query: {}", JsonUtil.toJson(log)); + } } } @@ -79,4 +107,18 @@ private String join(String path1, String path2) { private boolean statusOk(int status){ return status == 200 || status == 201 || status == 202; } + + public static boolean isSlowQueryLogWhiteAPI(ContainerRequestContext context) { + String path = context.getUriInfo().getPath(); + String method = context.getRequest().getMethod(); + + // GraphsAPI/CypherAPI/Job GremlinAPI + if (path.startsWith(GRAPHS)) { + if (method.equals(HttpMethod.GET) || path.endsWith(CYPHER) || path.endsWith(GREMLIN) ){ + return true; + } + } + // Raw GremlinAPI + return path.startsWith(GREMLIN); + } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java index 3414d6831b..e1e449ef26 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java @@ -17,12 +17,20 @@ package org.apache.hugegraph.api.filter; +import static org.apache.hugegraph.api.API.CHARSET; + import java.io.IOException; +import java.io.InputStream; + +import org.apache.commons.io.Charsets; +import org.apache.commons.io.IOUtils; import jakarta.inject.Singleton; +import jakarta.ws.rs.HttpMethod; import jakarta.ws.rs.container.ContainerRequestContext; import jakarta.ws.rs.container.ContainerRequestFilter; import jakarta.ws.rs.container.PreMatching; +import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.ext.Provider; @Provider @@ -31,10 +39,26 @@ public class PathFilter implements ContainerRequestFilter { public static final String REQUEST_TIME = "request_time"; + public static final String REQUEST_PARAMS_JSON = "request_params_json"; @Override public void filter(ContainerRequestContext context) throws IOException { context.setProperty(REQUEST_TIME, System.currentTimeMillis()); + + // record the request json + String method = context.getMethod(); + String requestParamsJson = ""; + if (method.equals(HttpMethod.POST)) { + requestParamsJson = IOUtils.toString(context.getEntityStream(), Charsets.toCharset(CHARSET)); + // replace input stream because we have already read it + InputStream in = IOUtils.toInputStream(requestParamsJson, Charsets.toCharset(CHARSET)); + context.setEntityStream(in); + } else if(method.equals(HttpMethod.GET)){ + MultivaluedMap pathParameters = context.getUriInfo().getPathParameters(); + requestParamsJson = pathParameters.toString(); + } + + context.setProperty(REQUEST_PARAMS_JSON, requestParamsJson); } } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java index e8b999fb56..a8bbe5a5f2 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java @@ -304,4 +304,13 @@ public static synchronized ServerOptions instance() { null, "jad" ); + + public static final ConfigOption SLOW_QUERY_LOG_TIME_THRESHOLD = + new ConfigOption<>( + "log.slow_query_threshold", + "The threshold time(ms) of logging slow query, " + + "0 means logging slow query is disabled.", + nonNegativeInt(), + 1000L + ); } diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java new file mode 100644 index 0000000000..cb3f1c7125 --- /dev/null +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.apache.hugegraph.metrics; + + +public class SlowQueryLog { + + public Long executeTime; + + public Long startTime; + + public String rawQuery; + + public String method; + + public Long threshold; + + public String path; + + public SlowQueryLog(Long executeTime, Long startTime, String rawQuery, String method, Long threshold, + String path) { + this.executeTime = executeTime; + this.startTime = startTime; + this.rawQuery = rawQuery; + this.method = method; + this.threshold = threshold; + this.path = path; + } +} diff --git a/hugegraph-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-dist/src/assembly/static/conf/log4j2.xml index 985ab78b2f..db58e89112 100644 --- a/hugegraph-dist/src/assembly/static/conf/log4j2.xml +++ b/hugegraph-dist/src/assembly/static/conf/log4j2.xml @@ -76,6 +76,30 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -113,5 +137,8 @@ + + + diff --git a/hugegraph-dist/src/assembly/static/conf/rest-server.properties b/hugegraph-dist/src/assembly/static/conf/rest-server.properties index f6444f84fb..23f78c5824 100644 --- a/hugegraph-dist/src/assembly/static/conf/rest-server.properties +++ b/hugegraph-dist/src/assembly/static/conf/rest-server.properties @@ -48,3 +48,6 @@ rpc.server_port=8091 # lightweight load balancing (beta) server.id=server-1 server.role=master + +# slow query log +log.slow_query_threshold=1000 diff --git a/hugegraph-dist/src/main/resources/log4j2.xml b/hugegraph-dist/src/main/resources/log4j2.xml index bdd391e58b..5d80816291 100644 --- a/hugegraph-dist/src/main/resources/log4j2.xml +++ b/hugegraph-dist/src/main/resources/log4j2.xml @@ -76,6 +76,30 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -124,5 +148,9 @@ + + + + diff --git a/hugegraph-test/src/main/resources/log4j2.xml b/hugegraph-test/src/main/resources/log4j2.xml index e830c6248e..284f53487c 100644 --- a/hugegraph-test/src/main/resources/log4j2.xml +++ b/hugegraph-test/src/main/resources/log4j2.xml @@ -76,6 +76,30 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -124,5 +148,9 @@ + + + + From bce6d058f5d1f108b4c19e18eb7a65ab0604a526 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Wed, 8 Nov 2023 18:08:08 +0800 Subject: [PATCH 22/51] refact: adjust project structure for merge PD & Store[Breaking Change] (#2338) ## Purpose of the PR Subtask of #2265. Adjust the project structure of this repository to include three sub-modules: hugegraph-server, hugegraph-pd, hugegraph-store at the root level. ## Main Changes Roll back to the moment when https://github.com/apache/incubator-hugegraph/pull/2266 was merged on `pd-store` and incorporate the latest changes in `master`. For more detailed information, please refer to https://github.com/apache/incubator-hugegraph/pull/2266#issue-1834369489. --------- Co-authored-by: M <87920097+msgui@users.noreply.github.com> --- .github/outdated/.travis.yml | 2 +- .github/workflows/check-dependencies.yml | 2 +- .github/workflows/ci.yml | 2 +- .licenserc.yaml | 10 +- hugegraph-pd/README.md | 0 .../hugegraph-api}/pom.xml | 2 +- .../java/org/apache/hugegraph/api/API.java | 0 .../hugegraph/api/arthas/ArthasAPI.java | 0 .../apache/hugegraph/api/auth/AccessAPI.java | 0 .../apache/hugegraph/api/auth/BelongAPI.java | 0 .../apache/hugegraph/api/auth/GroupAPI.java | 0 .../apache/hugegraph/api/auth/LoginAPI.java | 0 .../apache/hugegraph/api/auth/ProjectAPI.java | 0 .../apache/hugegraph/api/auth/TargetAPI.java | 0 .../apache/hugegraph/api/auth/UserAPI.java | 0 .../hugegraph/api/cypher/CypherAPI.java | 0 .../hugegraph/api/cypher/CypherClient.java | 0 .../hugegraph/api/cypher/CypherManager.java | 0 .../hugegraph/api/cypher/CypherModel.java | 0 .../hugegraph/api/filter/AccessLogFilter.java | 0 .../api/filter/AuthenticationFilter.java | 0 .../api/filter/CompressInterceptor.java | 0 .../api/filter/DecompressInterceptor.java | 0 .../hugegraph/api/filter/ExceptionFilter.java | 0 .../api/filter/LoadDetectFilter.java | 0 .../api/filter/LoadReleaseFilter.java | 0 .../hugegraph/api/filter/PathFilter.java | 0 .../hugegraph/api/filter/RedirectFilter.java | 0 .../filter/RedirectFilterDynamicFeature.java | 0 .../hugegraph/api/filter/StatusFilter.java | 0 .../apache/hugegraph/api/graph/BatchAPI.java | 0 .../apache/hugegraph/api/graph/EdgeAPI.java | 0 .../apache/hugegraph/api/graph/VertexAPI.java | 0 .../hugegraph/api/gremlin/GremlinAPI.java | 0 .../hugegraph/api/gremlin/GremlinClient.java | 0 .../api/gremlin/GremlinQueryAPI.java | 0 .../hugegraph/api/job/AlgorithmAPI.java | 0 .../apache/hugegraph/api/job/ComputerAPI.java | 0 .../apache/hugegraph/api/job/GremlinAPI.java | 0 .../apache/hugegraph/api/job/RebuildAPI.java | 0 .../org/apache/hugegraph/api/job/TaskAPI.java | 0 .../hugegraph/api/metrics/MetricsAPI.java | 0 .../hugegraph/api/profile/GraphsAPI.java | 0 .../hugegraph/api/profile/ProfileAPI.java | 0 .../hugegraph/api/profile/VersionAPI.java | 0 .../hugegraph/api/profile/WhiteIpListAPI.java | 0 .../apache/hugegraph/api/raft/RaftAPI.java | 0 .../hugegraph/api/schema/EdgeLabelAPI.java | 0 .../hugegraph/api/schema/IndexLabelAPI.java | 0 .../hugegraph/api/schema/PropertyKeyAPI.java | 0 .../hugegraph/api/schema/SchemaAPI.java | 0 .../hugegraph/api/schema/VertexLabelAPI.java | 0 .../api/traversers/AdamicAdarAPI.java | 0 .../api/traversers/AllShortestPathsAPI.java | 0 .../hugegraph/api/traversers/CountAPI.java | 0 .../api/traversers/CrosspointsAPI.java | 0 .../traversers/CustomizedCrosspointsAPI.java | 0 .../api/traversers/CustomizedPathsAPI.java | 0 .../hugegraph/api/traversers/EdgesAPI.java | 0 .../api/traversers/FusiformSimilarityAPI.java | 0 .../api/traversers/JaccardSimilarityAPI.java | 0 .../api/traversers/KneighborAPI.java | 0 .../hugegraph/api/traversers/KoutAPI.java | 0 .../traversers/MultiNodeShortestPathAPI.java | 0 .../api/traversers/NeighborRankAPI.java | 0 .../hugegraph/api/traversers/PathsAPI.java | 0 .../api/traversers/PersonalRankAPI.java | 0 .../hugegraph/api/traversers/RaysAPI.java | 0 .../api/traversers/ResourceAllocationAPI.java | 0 .../hugegraph/api/traversers/RingsAPI.java | 0 .../api/traversers/SameNeighborsAPI.java | 0 .../api/traversers/ShortestPathAPI.java | 0 .../SingleSourceShortestPathAPI.java | 0 .../api/traversers/TemplatePathsAPI.java | 0 .../api/traversers/TraverserAPI.java | 0 .../hugegraph/api/traversers/Vertices.java | 0 .../hugegraph/api/traversers/VerticesAPI.java | 0 .../traversers/WeightedShortestPathAPI.java | 0 .../hugegraph/api/variables/VariablesAPI.java | 0 .../hugegraph/auth/ConfigAuthenticator.java | 0 .../hugegraph/auth/ContextGremlinServer.java | 0 .../hugegraph/auth/HugeAuthenticator.java | 0 .../hugegraph/auth/HugeFactoryAuthProxy.java | 0 .../hugegraph/auth/HugeGraphAuthProxy.java | 0 .../hugegraph/auth/StandardAuthenticator.java | 0 .../auth/WsAndHttpBasicAuthHandler.java | 0 .../hugegraph/config/ServerOptions.java | 0 .../apache/hugegraph/core/GraphManager.java | 0 .../apache/hugegraph/define/Checkable.java | 0 .../hugegraph/define/UpdateStrategy.java | 0 .../org/apache/hugegraph/define/WorkLoad.java | 0 .../apache/hugegraph/metrics/MetricsKeys.java | 0 .../hugegraph/metrics/MetricsModule.java | 0 .../apache/hugegraph/metrics/MetricsUtil.java | 0 .../hugegraph/metrics/ServerReporter.java | 0 .../hugegraph/metrics/SlowQueryLog.java | 0 .../hugegraph/metrics/SystemMetrics.java | 0 .../opencypher/CypherOpProcessor.java | 0 .../hugegraph/opencypher/CypherPlugin.java | 0 .../rpc/RpcClientProviderWithAuth.java | 0 .../hugegraph/serializer/JsonSerializer.java | 0 .../hugegraph/serializer/Serializer.java | 0 .../hugegraph/server/ApplicationConfig.java | 0 .../apache/hugegraph/server/RestServer.java | 0 .../apache/hugegraph/version/ApiVersion.java | 2 +- ...che.tinkerpop.gremlin.jsr223.GremlinPlugin | 0 ...pache.tinkerpop.gremlin.server.OpProcessor | 0 .../hugegraph-cassandra}/pom.xml | 2 +- .../driver/core/querybuilder/Clauses.java | 0 .../cassandra/CassandraBackendEntry.java | 0 .../cassandra/CassandraEntryIterator.java | 0 .../store/cassandra/CassandraFeatures.java | 0 .../store/cassandra/CassandraMetrics.java | 0 .../store/cassandra/CassandraOptions.java | 0 .../store/cassandra/CassandraSerializer.java | 0 .../store/cassandra/CassandraSessionPool.java | 0 .../store/cassandra/CassandraShard.java | 0 .../store/cassandra/CassandraStore.java | 0 .../cassandra/CassandraStoreProvider.java | 0 .../store/cassandra/CassandraTable.java | 0 .../store/cassandra/CassandraTables.java | 0 .../hugegraph-core}/pom.xml | 2 +- .../org/apache/hugegraph/HugeException.java | 0 .../org/apache/hugegraph/HugeFactory.java | 0 .../java/org/apache/hugegraph/HugeGraph.java | 0 .../org/apache/hugegraph/HugeGraphParams.java | 0 .../apache/hugegraph/StandardHugeGraph.java | 0 .../apache/hugegraph/analyzer/Analyzer.java | 0 .../hugegraph/analyzer/AnalyzerFactory.java | 0 .../hugegraph/analyzer/AnsjAnalyzer.java | 0 .../hugegraph/analyzer/HanLPAnalyzer.java | 0 .../apache/hugegraph/analyzer/IKAnalyzer.java | 0 .../hugegraph/analyzer/JcsegAnalyzer.java | 0 .../hugegraph/analyzer/JiebaAnalyzer.java | 0 .../hugegraph/analyzer/MMSeg4JAnalyzer.java | 0 .../hugegraph/analyzer/SmartCNAnalyzer.java | 0 .../apache/hugegraph/auth/AuthConstant.java | 0 .../apache/hugegraph/auth/AuthManager.java | 0 .../apache/hugegraph/auth/EntityManager.java | 0 .../org/apache/hugegraph/auth/HugeAccess.java | 0 .../org/apache/hugegraph/auth/HugeBelong.java | 0 .../org/apache/hugegraph/auth/HugeGroup.java | 0 .../apache/hugegraph/auth/HugePermission.java | 0 .../apache/hugegraph/auth/HugeProject.java | 0 .../apache/hugegraph/auth/HugeResource.java | 0 .../org/apache/hugegraph/auth/HugeTarget.java | 0 .../org/apache/hugegraph/auth/HugeUser.java | 0 .../hugegraph/auth/RelationshipManager.java | 0 .../apache/hugegraph/auth/ResourceObject.java | 0 .../apache/hugegraph/auth/ResourceType.java | 0 .../apache/hugegraph/auth/RolePermission.java | 0 .../apache/hugegraph/auth/SchemaDefine.java | 0 .../hugegraph/auth/StandardAuthManager.java | 0 .../apache/hugegraph/auth/TokenGenerator.java | 0 .../apache/hugegraph/auth/UserWithRole.java | 0 .../hugegraph/backend/BackendException.java | 0 .../hugegraph/backend/LocalCounter.java | 0 .../apache/hugegraph/backend/Transaction.java | 0 .../backend/cache/AbstractCache.java | 0 .../apache/hugegraph/backend/cache/Cache.java | 0 .../hugegraph/backend/cache/CacheManager.java | 0 .../backend/cache/CacheNotifier.java | 0 .../backend/cache/CachedBackendStore.java | 0 .../backend/cache/CachedGraphTransaction.java | 0 .../cache/CachedSchemaTransaction.java | 0 .../hugegraph/backend/cache/LevelCache.java | 0 .../hugegraph/backend/cache/OffheapCache.java | 0 .../hugegraph/backend/cache/RamCache.java | 0 .../apache/hugegraph/backend/id/EdgeId.java | 0 .../org/apache/hugegraph/backend/id/Id.java | 0 .../hugegraph/backend/id/IdGenerator.java | 0 .../apache/hugegraph/backend/id/IdUtil.java | 0 .../backend/id/SnowflakeIdGenerator.java | 0 .../backend/id/SplicingIdGenerator.java | 0 .../hugegraph/backend/page/IdHolder.java | 0 .../hugegraph/backend/page/IdHolderList.java | 0 .../backend/page/PageEntryIterator.java | 0 .../hugegraph/backend/page/PageIds.java | 0 .../hugegraph/backend/page/PageInfo.java | 0 .../hugegraph/backend/page/PageState.java | 0 .../hugegraph/backend/page/QueryList.java | 0 .../backend/page/SortByCountIdHolderList.java | 0 .../hugegraph/backend/query/Aggregate.java | 0 .../backend/query/BatchConditionQuery.java | 0 .../hugegraph/backend/query/Condition.java | 0 .../backend/query/ConditionQuery.java | 0 .../backend/query/ConditionQueryFlatten.java | 0 .../backend/query/EdgesQueryIterator.java | 0 .../backend/query/IdPrefixQuery.java | 0 .../hugegraph/backend/query/IdQuery.java | 0 .../hugegraph/backend/query/IdRangeQuery.java | 0 .../apache/hugegraph/backend/query/Query.java | 0 .../hugegraph/backend/query/QueryResults.java | 0 .../serializer/AbstractSerializer.java | 0 .../serializer/BinaryBackendEntry.java | 0 .../serializer/BinaryEntryIterator.java | 0 .../serializer/BinaryScatterSerializer.java | 0 .../backend/serializer/BinarySerializer.java | 0 .../backend/serializer/BytesBuffer.java | 0 .../backend/serializer/GraphSerializer.java | 0 .../backend/serializer/MergeIterator.java | 0 .../backend/serializer/SchemaSerializer.java | 0 .../backend/serializer/SerializerFactory.java | 0 .../backend/serializer/TableBackendEntry.java | 0 .../backend/serializer/TableSerializer.java | 0 .../backend/serializer/TextBackendEntry.java | 0 .../backend/serializer/TextSerializer.java | 0 .../backend/store/AbstractBackendStore.java | 0 .../store/AbstractBackendStoreProvider.java | 0 .../backend/store/BackendAction.java | 0 .../hugegraph/backend/store/BackendEntry.java | 0 .../backend/store/BackendEntryIterator.java | 0 .../backend/store/BackendFeatures.java | 0 .../backend/store/BackendMetrics.java | 0 .../backend/store/BackendMutation.java | 0 .../backend/store/BackendProviderFactory.java | 0 .../backend/store/BackendSession.java | 0 .../backend/store/BackendSessionPool.java | 0 .../hugegraph/backend/store/BackendStore.java | 0 .../backend/store/BackendStoreInfo.java | 0 .../backend/store/BackendStoreProvider.java | 0 .../hugegraph/backend/store/BackendTable.java | 0 .../backend/store/MetaDispatcher.java | 0 .../hugegraph/backend/store/MetaHandler.java | 0 .../apache/hugegraph/backend/store/Shard.java | 0 .../backend/store/SystemSchemaStore.java | 0 .../hugegraph/backend/store/TableDefine.java | 0 .../backend/store/memory/InMemoryDBStore.java | 0 .../store/memory/InMemoryDBStoreProvider.java | 0 .../backend/store/memory/InMemoryDBTable.java | 0 .../store/memory/InMemoryDBTables.java | 0 .../backend/store/memory/InMemoryMetrics.java | 0 .../backend/store/raft/RaftAddPeerJob.java | 0 .../backend/store/raft/RaftBackendStore.java | 0 .../store/raft/RaftBackendStoreProvider.java | 0 .../backend/store/raft/RaftClosure.java | 0 .../backend/store/raft/RaftContext.java | 0 .../backend/store/raft/RaftException.java | 0 .../backend/store/raft/RaftGroupManager.java | 0 .../store/raft/RaftGroupManagerImpl.java | 0 .../backend/store/raft/RaftNode.java | 0 .../backend/store/raft/RaftRemovePeerJob.java | 0 .../backend/store/raft/RaftResult.java | 0 .../backend/store/raft/RaftStoreClosure.java | 0 .../backend/store/raft/StoreCommand.java | 0 .../backend/store/raft/StoreSerializer.java | 0 .../backend/store/raft/StoreSnapshotFile.java | 0 .../backend/store/raft/StoreStateMachine.java | 0 .../store/raft/compress/CompressStrategy.java | 0 .../compress/CompressStrategyManager.java | 0 .../compress/ParallelCompressStrategy.java | 0 .../raft/compress/SerialCompressStrategy.java | 0 .../store/raft/rpc/AddPeerProcessor.java | 0 .../store/raft/rpc/ListPeersProcessor.java | 0 .../store/raft/rpc/RemovePeerProcessor.java | 0 .../backend/store/raft/rpc/RpcForwarder.java | 0 .../store/raft/rpc/SetLeaderProcessor.java | 0 .../store/raft/rpc/StoreCommandProcessor.java | 0 .../backend/store/ram/IntIntMap.java | 0 .../backend/store/ram/IntLongMap.java | 0 .../backend/store/ram/IntObjectMap.java | 0 .../hugegraph/backend/store/ram/RamMap.java | 0 .../hugegraph/backend/store/ram/RamTable.java | 0 .../backend/tx/AbstractTransaction.java | 0 .../backend/tx/GraphIndexTransaction.java | 0 .../backend/tx/GraphTransaction.java | 0 .../backend/tx/IndexableTransaction.java | 0 .../backend/tx/SchemaIndexTransaction.java | 0 .../backend/tx/SchemaTransaction.java | 0 .../apache/hugegraph/config/AuthOptions.java | 0 .../apache/hugegraph/config/CoreOptions.java | 0 .../exception/ConnectionException.java | 0 .../hugegraph/exception/ExistedException.java | 0 .../exception/HugeGremlinException.java | 0 .../exception/LimitExceedException.java | 0 .../hugegraph/exception/NoIndexException.java | 0 .../exception/NotAllowException.java | 0 .../exception/NotFoundException.java | 0 .../exception/NotSupportException.java | 0 .../io/GraphSONSchemaSerializer.java | 0 .../hugegraph/io/HugeGraphIoRegistry.java | 0 .../hugegraph/io/HugeGraphSONModule.java | 0 .../apache/hugegraph/io/HugeGryoModule.java | 0 .../apache/hugegraph/job/AlgorithmJob.java | 0 .../org/apache/hugegraph/job/ComputerJob.java | 0 .../apache/hugegraph/job/EphemeralJob.java | 0 .../hugegraph/job/EphemeralJobBuilder.java | 0 .../org/apache/hugegraph/job/GremlinJob.java | 0 .../java/org/apache/hugegraph/job/Job.java | 0 .../org/apache/hugegraph/job/JobBuilder.java | 0 .../java/org/apache/hugegraph/job/SysJob.java | 0 .../org/apache/hugegraph/job/UserJob.java | 0 .../job/algorithm/AbstractAlgorithm.java | 0 .../hugegraph/job/algorithm/Algorithm.java | 0 .../job/algorithm/AlgorithmPool.java | 0 .../hugegraph/job/algorithm/BfsTraverser.java | 0 .../hugegraph/job/algorithm/Consumers.java | 0 .../job/algorithm/CountEdgeAlgorithm.java | 0 .../job/algorithm/CountVertexAlgorithm.java | 0 .../job/algorithm/SubgraphStatAlgorithm.java | 0 .../algorithm/cent/AbstractCentAlgorithm.java | 0 .../cent/BetweennessCentralityAlgorithm.java | 0 .../BetweennessCentralityAlgorithmV2.java | 0 .../cent/ClosenessCentralityAlgorithm.java | 0 .../cent/ClosenessCentralityAlgorithmV2.java | 0 .../cent/DegreeCentralityAlgorithm.java | 0 .../cent/EigenvectorCentralityAlgorithm.java | 0 .../cent/StressCentralityAlgorithm.java | 0 .../cent/StressCentralityAlgorithmV2.java | 0 .../algorithm/comm/AbstractCommAlgorithm.java | 0 .../comm/ClusterCoefficientAlgorithm.java | 0 .../job/algorithm/comm/KCoreAlgorithm.java | 0 .../job/algorithm/comm/LouvainAlgorithm.java | 0 .../job/algorithm/comm/LouvainTraverser.java | 0 .../job/algorithm/comm/LpaAlgorithm.java | 0 .../comm/TriangleCountAlgorithm.java | 0 .../comm/WeakConnectedComponent.java | 0 .../algorithm/path/RingsDetectAlgorithm.java | 0 .../job/algorithm/rank/PageRankAlgorithm.java | 0 .../FusiformSimilarityAlgorithm.java | 0 .../job/computer/AbstractComputer.java | 0 .../hugegraph/job/computer/Computer.java | 0 .../hugegraph/job/computer/ComputerPool.java | 0 .../job/computer/LouvainComputer.java | 0 .../hugegraph/job/computer/LpaComputer.java | 0 .../job/computer/PageRankComputer.java | 0 .../job/computer/TriangleCountComputer.java | 0 .../WeakConnectedComponentComputer.java | 0 .../job/schema/EdgeLabelRemoveJob.java | 0 .../job/schema/IndexLabelRebuildJob.java | 0 .../job/schema/IndexLabelRemoveJob.java | 0 .../job/schema/OlapPropertyKeyClearJob.java | 0 .../job/schema/OlapPropertyKeyCreateJob.java | 0 .../job/schema/OlapPropertyKeyRemoveJob.java | 0 .../hugegraph/job/schema/SchemaJob.java | 0 .../job/schema/VertexLabelRemoveJob.java | 0 .../job/system/DeleteExpiredElementJob.java | 0 .../job/system/DeleteExpiredIndexJob.java | 0 .../job/system/DeleteExpiredJob.java | 0 .../hugegraph/job/system/JobCounters.java | 0 .../hugegraph/masterelection/ClusterRole.java | 0 .../masterelection/ClusterRoleStore.java | 0 .../hugegraph/masterelection/Config.java | 0 .../masterelection/GlobalMasterInfo.java | 0 .../masterelection/RoleElectionConfig.java | 0 .../masterelection/RoleElectionOptions.java | 0 .../RoleElectionStateMachine.java | 0 .../StandardClusterRoleStore.java | 0 .../StandardRoleElectionStateMachine.java | 0 .../StandardStateMachineCallback.java | 0 .../masterelection/StateMachineCallback.java | 0 .../masterelection/StateMachineContext.java | 0 .../plugin/HugeGraphGremlinPlugin.java | 0 .../hugegraph/plugin/HugeGraphPlugin.java | 0 .../rpc/RpcServiceConfig4Client.java | 0 .../rpc/RpcServiceConfig4Server.java | 0 .../apache/hugegraph/schema/EdgeLabel.java | 0 .../apache/hugegraph/schema/IndexLabel.java | 0 .../apache/hugegraph/schema/PropertyKey.java | 0 .../hugegraph/schema/SchemaElement.java | 0 .../apache/hugegraph/schema/SchemaLabel.java | 0 .../hugegraph/schema/SchemaManager.java | 0 .../org/apache/hugegraph/schema/Userdata.java | 0 .../apache/hugegraph/schema/VertexLabel.java | 0 .../schema/builder/AbstractBuilder.java | 0 .../schema/builder/EdgeLabelBuilder.java | 0 .../schema/builder/IndexLabelBuilder.java | 0 .../schema/builder/PropertyKeyBuilder.java | 0 .../schema/builder/SchemaBuilder.java | 0 .../schema/builder/VertexLabelBuilder.java | 0 .../security/HugeSecurityManager.java | 0 .../apache/hugegraph/structure/GraphType.java | 0 .../apache/hugegraph/structure/HugeEdge.java | 0 .../hugegraph/structure/HugeEdgeProperty.java | 0 .../hugegraph/structure/HugeElement.java | 0 .../hugegraph/structure/HugeFeatures.java | 0 .../apache/hugegraph/structure/HugeIndex.java | 0 .../hugegraph/structure/HugeProperty.java | 0 .../hugegraph/structure/HugeVertex.java | 0 .../structure/HugeVertexProperty.java | 0 .../hugegraph/task/EphemeralJobQueue.java | 0 .../apache/hugegraph/task/HugeServerInfo.java | 0 .../org/apache/hugegraph/task/HugeTask.java | 0 .../hugegraph/task/ServerInfoManager.java | 0 .../hugegraph/task/StandardTaskScheduler.java | 0 .../apache/hugegraph/task/TaskCallable.java | 0 .../apache/hugegraph/task/TaskManager.java | 0 .../apache/hugegraph/task/TaskScheduler.java | 0 .../org/apache/hugegraph/task/TaskStatus.java | 0 .../algorithm/CollectionPathsTraverser.java | 0 .../traversal/algorithm/CountTraverser.java | 0 .../algorithm/CustomizePathsTraverser.java | 0 .../CustomizedCrosspointsTraverser.java | 0 .../FusiformSimilarityTraverser.java | 0 .../traversal/algorithm/HugeTraverser.java | 0 .../algorithm/JaccardSimilarTraverser.java | 0 .../algorithm/KneighborTraverser.java | 0 .../traversal/algorithm/KoutTraverser.java | 0 .../MultiNodeShortestPathTraverser.java | 0 .../algorithm/NeighborRankTraverser.java | 0 .../traversal/algorithm/OltpTraverser.java | 0 .../traversal/algorithm/PathTraverser.java | 0 .../traversal/algorithm/PathsTraverser.java | 0 .../algorithm/PersonalRankTraverser.java | 0 .../algorithm/PredictionTraverser.java | 0 .../algorithm/SameNeighborTraverser.java | 0 .../algorithm/ShortestPathTraverser.java | 0 .../SingleSourceShortestPathTraverser.java | 0 .../algorithm/SubGraphTraverser.java | 0 .../algorithm/TemplatePathsTraverser.java | 0 .../algorithm/iterator/NestedIterator.java | 0 .../algorithm/records/AbstractRecords.java | 0 .../records/DoubleWayMultiPathsRecords.java | 0 .../algorithm/records/KneighborRecords.java | 0 .../algorithm/records/KoutRecords.java | 0 .../algorithm/records/PathsRecords.java | 0 .../traversal/algorithm/records/Records.java | 0 .../records/ShortestPathRecords.java | 0 .../records/SingleWayMultiPathsRecords.java | 0 .../records/record/Int2ArrayRecord.java | 0 .../records/record/Int2IntRecord.java | 0 .../records/record/Int2SetRecord.java | 0 .../algorithm/records/record/Record.java | 0 .../records/record/RecordFactory.java | 0 .../algorithm/records/record/RecordType.java | 0 .../algorithm/records/record/SyncRecord.java | 0 .../traversal/algorithm/steps/EdgeStep.java | 0 .../algorithm/steps/RepeatEdgeStep.java | 0 .../traversal/algorithm/steps/Steps.java | 0 .../algorithm/steps/WeightedEdgeStep.java | 0 .../strategy/ConcurrentTraverseStrategy.java | 0 .../strategy/SingleTraverseStrategy.java | 0 .../algorithm/strategy/TraverseStrategy.java | 0 .../traversal/optimize/ConditionP.java | 0 .../traversal/optimize/HugeCountStep.java | 0 .../optimize/HugeCountStepStrategy.java | 0 .../traversal/optimize/HugeGraphStep.java | 0 .../optimize/HugeGraphStepStrategy.java | 0 .../optimize/HugePrimaryKeyStrategy.java | 0 .../optimize/HugeScriptTraversal.java | 0 .../traversal/optimize/HugeVertexStep.java | 0 .../optimize/HugeVertexStepByBatch.java | 0 .../optimize/HugeVertexStepStrategy.java | 0 .../traversal/optimize/QueryHolder.java | 0 .../hugegraph/traversal/optimize/Text.java | 0 .../traversal/optimize/TraversalUtil.java | 0 .../org/apache/hugegraph/type/HugeType.java | 0 .../org/apache/hugegraph/type/Idfiable.java | 0 .../org/apache/hugegraph/type/Indexable.java | 0 .../org/apache/hugegraph/type/Nameable.java | 0 .../apache/hugegraph/type/Propertiable.java | 0 .../org/apache/hugegraph/type/Typeable.java | 0 .../apache/hugegraph/type/define/Action.java | 0 .../hugegraph/type/define/AggregateType.java | 0 .../hugegraph/type/define/Cardinality.java | 0 .../hugegraph/type/define/CollectionType.java | 0 .../hugegraph/type/define/DataType.java | 0 .../hugegraph/type/define/Directions.java | 0 .../hugegraph/type/define/Frequency.java | 0 .../hugegraph/type/define/GraphMode.java | 0 .../hugegraph/type/define/GraphReadMode.java | 0 .../hugegraph/type/define/HugeKeys.java | 0 .../hugegraph/type/define/IdStrategy.java | 0 .../hugegraph/type/define/IndexType.java | 0 .../hugegraph/type/define/NodeRole.java | 0 .../hugegraph/type/define/SchemaStatus.java | 0 .../hugegraph/type/define/SerialEnum.java | 0 .../hugegraph/type/define/WriteType.java | 0 .../java/org/apache/hugegraph/util/Blob.java | 0 .../apache/hugegraph/util/CompressUtil.java | 0 .../org/apache/hugegraph/util/ConfigUtil.java | 0 .../org/apache/hugegraph/util/Consumers.java | 0 .../org/apache/hugegraph/util/CopyUtil.java | 0 .../org/apache/hugegraph/util/Events.java | 0 .../util/FixedTimerWindowRateLimiter.java | 0 .../util/FixedWatchWindowRateLimiter.java | 0 .../org/apache/hugegraph/util/GZipUtil.java | 0 .../org/apache/hugegraph/util/JsonUtil.java | 0 .../org/apache/hugegraph/util/KryoUtil.java | 0 .../org/apache/hugegraph/util/LZ4Util.java | 0 .../org/apache/hugegraph/util/LockUtil.java | 0 .../apache/hugegraph/util/ParameterUtil.java | 0 .../apache/hugegraph/util/RateLimiter.java | 0 .../org/apache/hugegraph/util/Reflection.java | 0 .../apache/hugegraph/util/StringEncoding.java | 0 .../util/collection/CollectionFactory.java | 0 .../hugegraph/util/collection/IdSet.java | 0 .../util/collection/Int2IntsMap.java | 0 .../util/collection/IntIterator.java | 0 .../hugegraph/util/collection/IntMap.java | 0 .../hugegraph/util/collection/IntSet.java | 0 .../util/collection/ObjectIntMapping.java | 0 .../collection/ObjectIntMappingFactory.java | 0 .../hugegraph/variables/HugeVariables.java | 0 .../apache/hugegraph/version/CoreVersion.java | 2 +- ...che.tinkerpop.gremlin.jsr223.GremlinPlugin | 0 .../src/main/resources/hugegraph.properties | 0 .../src/main/resources/proto/raft.proto | 0 .../hugegraph-dist}/README.md | 0 .../hugegraph-dist}/dist.sh | 0 .../docker/docker-entrypoint.sh | 0 .../example/docker-compose-cassandra.yml | 0 .../docker/scripts/detect-storage.groovy | 0 .../docker/scripts/remote-connect.groovy | 0 .../hugegraph-dist}/pom.xml | 2 +- .../hugegraph-dist}/release-docs/LICENSE | 0 .../hugegraph-dist}/release-docs/NOTICE | 0 .../licenses/LICENSE-HdrHistogram.txt | 0 .../release-docs/licenses/LICENSE-ST4.txt | 0 .../licenses/LICENSE-arthas-agent-attach.txt | 0 .../licenses/LICENSE-arthas-packaging.txt | 0 .../licenses/LICENSE-audience-annotations.txt | 0 .../LICENSE-byte-buddy-agent-1.11.6.txt | 0 .../licenses/LICENSE-byte-buddy-agent.txt | 0 .../licenses/LICENSE-byte-buddy.txt | 0 .../licenses/LICENSE-cassandra-all.txt | 0 .../licenses/LICENSE-commons-beanutils.txt | 0 .../licenses/LICENSE-commons-cli.txt | 0 .../licenses/LICENSE-commons-codec.txt | 0 .../licenses/LICENSE-commons-collections.txt | 0 .../licenses/LICENSE-commons-compress.txt | 0 .../LICENSE-commons-configuration.txt | 0 .../LICENSE-commons-configuration2.txt | 0 .../licenses/LICENSE-commons-io.txt | 0 .../licenses/LICENSE-commons-lang.txt | 0 .../licenses/LICENSE-commons-lang3.txt | 0 .../licenses/LICENSE-commons-logging.txt | 0 .../licenses/LICENSE-commons-math3.txt | 0 .../licenses/LICENSE-commons-text.txt | 0 .../licenses/LICENSE-compress-lzf.txt | 0 .../licenses/LICENSE-concurrent-trees.txt | 0 .../LICENSE-concurrentlinkedhashmap-lru.txt | 0 .../licenses/LICENSE-disruptor.txt | 0 .../licenses/LICENSE-error-prone.txt | 0 .../release-docs/licenses/LICENSE-exp4j.txt | 0 .../licenses/LICENSE-expressions-9.0.txt | 0 .../licenses/LICENSE-fastutil.txt | 0 .../licenses/LICENSE-findbugs-annotations.txt | 0 .../licenses/LICENSE-front-end.txt | 0 .../licenses/LICENSE-gremlin-console.txt | 0 .../licenses/LICENSE-gremlin-core.txt | 0 .../licenses/LICENSE-gremlin-driver.txt | 0 .../licenses/LICENSE-gremlin-groovy.txt | 0 .../licenses/LICENSE-gremlin-server.txt | 0 .../licenses/LICENSE-gremlin-shaded.txt | 0 .../licenses/LICENSE-gremlin-test.txt | 0 .../licenses/LICENSE-groovy-2.5.14.txt | 0 .../licenses/LICENSE-groovy-cli-picocli.txt | 0 .../licenses/LICENSE-groovy-console.txt | 0 .../licenses/LICENSE-groovy-groovysh.txt | 0 .../licenses/LICENSE-groovy-json.txt | 0 .../licenses/LICENSE-groovy-jsr223.txt | 0 .../licenses/LICENSE-groovy-swing.txt | 0 .../licenses/LICENSE-groovy-templates.txt | 0 .../licenses/LICENSE-groovy-xml.txt | 0 .../licenses/LICENSE-hamcrest.txt | 0 .../LICENSE-hbase-shaded-endpoint.txt | 0 .../release-docs/licenses/LICENSE-hppc.txt | 0 .../licenses/LICENSE-htrace-core4-4.2.0.txt | 0 .../licenses/LICENSE-httpclient.txt | 0 .../licenses/LICENSE-httpcore.txt | 0 .../licenses/LICENSE-ikanalyzer-2012_u6.txt | 0 .../release-docs/licenses/LICENSE-ivy.txt | 0 .../licenses/LICENSE-jackson-annotations.txt | 0 .../licenses/LICENSE-jackson-core.txt | 0 .../licenses/LICENSE-jackson-databind.txt | 0 .../LICENSE-jackson-dataformat-yaml.txt | 0 .../LICENSE-jackson-datatype-jsr310.txt | 0 .../licenses/LICENSE-jackson-jaxrs-base.txt | 0 ...NSE-jackson-jaxrs-json-provider-2.12.1.txt | 0 .../LICENSE-jackson-jaxrs-json-provider.txt | 0 ...ICENSE-jackson-module-jaxb-annotations.txt | 0 .../licenses/LICENSE-javax.json.txt | 0 .../licenses/LICENSE-jcabi-log.txt | 0 .../licenses/LICENSE-jcabi-manifests.txt | 0 .../licenses/LICENSE-jcl-over-slf4j.txt | 0 .../licenses/LICENSE-jersey-client.txt | 0 .../release-docs/licenses/LICENSE-jflex.txt | 0 .../licenses/LICENSE-jieba-analysis.txt | 0 .../release-docs/licenses/LICENSE-jna.txt | 0 .../licenses/LICENSE-json-simple.txt | 0 .../licenses/LICENSE-json-smart.txt | 0 .../licenses/LICENSE-kerb-admin.txt | 0 .../licenses/LICENSE-kerb-client.txt | 0 .../licenses/LICENSE-kerb-common.txt | 0 .../licenses/LICENSE-kerb-core.txt | 0 .../licenses/LICENSE-kerb-crypto.txt | 0 .../licenses/LICENSE-kerb-identity.txt | 0 .../licenses/LICENSE-kerb-server.txt | 0 .../licenses/LICENSE-kerb-simplekdc.txt | 0 .../licenses/LICENSE-kerb-util.txt | 0 .../licenses/LICENSE-kerby-asn1.txt | 0 .../licenses/LICENSE-kerby-config.txt | 0 .../licenses/LICENSE-kerby-pkix.txt | 0 .../licenses/LICENSE-kerby-util.txt | 0 .../licenses/LICENSE-kerby-xdr.txt | 0 .../licenses/LICENSE-log4j-api.txt | 0 .../licenses/LICENSE-log4j-core.txt | 0 .../licenses/LICENSE-log4j-slf4j-impl.txt | 0 .../licenses/LICENSE-objenesis.txt | 0 .../licenses/LICENSE-ohc-core.txt | 0 .../licenses/LICENSE-opencypher-ast-9.0.txt | 0 .../licenses/LICENSE-parboiled-core.txt | 0 .../licenses/LICENSE-parboiled-scala_2.12.txt | 0 .../licenses/LICENSE-parser-9.0.txt | 0 .../licenses/LICENSE-postgresql.txt | 0 .../licenses/LICENSE-rewriting-9.0.txt | 0 .../licenses/LICENSE-rocksdbjni.txt | 0 .../release-docs/licenses/LICENSE-sigar.txt | 0 .../licenses/LICENSE-snakeyaml.txt | 0 .../licenses/LICENSE-snowball-stemmer.txt | 0 .../licenses/LICENSE-swagger-annotations.txt | 0 .../licenses/LICENSE-swagger-models.txt | 0 .../licenses/LICENSE-tinkergraph-gremlin.txt | 0 .../licenses/LICENSE-token-provider.txt | 0 .../licenses/LICENSE-tracer-core.txt | 0 .../licenses/LICENSE-util-9.0.txt | 0 .../release-docs/licenses/LICENSE-zt-zip.txt | 0 .../licenses/LINCENSE-jopt-simple.txt | 0 .../hugegraph-dist}/scripts/apache-release.sh | 2 +- .../scripts/dependency/check_dependencies.sh | 0 .../scripts/dependency/known-dependencies.txt | 29 +- .../regenerate_known_dependencies.sh | 0 .../src/assembly/descriptor/assembly.xml | 2 +- .../src/assembly/jenkins/build.sh | 0 .../src/assembly/jenkins/config.sh | 0 .../src/assembly/jenkins/deploy.sh | 0 .../src/assembly/jenkins/jenkins.sh | 2 +- .../src/assembly/jenkins/publish.sh | 0 .../src/assembly/jenkins/test.sh | 0 .../src/assembly/static/bin/checksocket.sh | 0 .../assembly/static/bin/docker-entrypoint.sh | 0 .../src/assembly/static/bin/dump-conf.sh | 0 .../src/assembly/static/bin/dump-store.sh | 0 .../assembly/static/bin/gremlin-console.sh | 0 .../src/assembly/static/bin/hugegraph | 0 .../assembly/static/bin/hugegraph-server.sh | 0 .../src/assembly/static/bin/hugegraph.service | 0 .../src/assembly/static/bin/init-store.sh | 0 .../src/assembly/static/bin/install.sh | 0 .../assembly/static/bin/monitor-hugegraph.sh | 0 .../src/assembly/static/bin/raft-tools.sh | 0 .../assembly/static/bin/start-hugegraph.sh | 0 .../src/assembly/static/bin/start-monitor.sh | 0 .../src/assembly/static/bin/stop-hugegraph.sh | 0 .../src/assembly/static/bin/stop-monitor.sh | 0 .../src/assembly/static/bin/util.sh | 0 .../src/assembly/static/bin/wait-storage.sh | 0 .../src/assembly/static/conf/computer.yaml | 0 .../static/conf/graphs/hugegraph.properties | 0 .../static/conf/gremlin-driver-settings.yaml | 0 .../assembly/static/conf/gremlin-server.yaml | 0 .../src/assembly/static/conf/log4j2.xml | 0 .../assembly/static/conf/remote-objects.yaml | 0 .../src/assembly/static/conf/remote.yaml | 0 .../static/conf/rest-server.properties | 0 .../src/assembly/static/ext/README.txt | 0 .../src/assembly/static/ext/plugins.txt | 0 .../static/scripts/empty-sample.groovy | 0 .../assembly/static/scripts/example.groovy | 0 .../src/assembly/travis/build-report.sh | 2 +- .../conf-raft1/graphs/hugegraph.properties | 0 .../travis/conf-raft1/gremlin-server.yaml | 0 .../travis/conf-raft1/rest-server.properties | 0 .../conf-raft2/graphs/hugegraph.properties | 0 .../travis/conf-raft2/gremlin-server.yaml | 0 .../travis/conf-raft2/rest-server.properties | 0 .../conf-raft3/graphs/hugegraph.properties | 0 .../travis/conf-raft3/gremlin-server.yaml | 0 .../travis/conf-raft3/rest-server.properties | 0 .../src/assembly/travis/hbase-site.xml | 0 .../src/assembly/travis/install-backend.sh | 0 .../src/assembly/travis/install-cassandra.sh | 0 .../src/assembly/travis/install-hbase.sh | 0 .../travis/install-mysql-via-docker.sh | 2 +- .../src/assembly/travis/install-mysql.sh | 0 .../travis/install-postgresql-via-docker.sh | 2 +- .../src/assembly/travis/install-postgresql.sh | 2 +- .../src/assembly/travis/install-scylladb.sh | 0 .../src/assembly/travis/maven.xml | 0 .../src/assembly/travis/mysql.cnf | 0 .../assembly/travis/run-api-test-for-raft.sh | 4 +- .../src/assembly/travis/run-api-test.sh | 5 +- .../src/assembly/travis/run-core-test.sh | 2 +- .../src/assembly/travis/run-tinkerpop-test.sh | 4 +- .../src/assembly/travis/run-unit-test.sh | 2 +- .../src/assembly/travis/start-server.sh | 0 .../src/assembly/travis/stop-server.sh | 0 .../org/apache/hugegraph/cmd/ConfDumper.java | 0 .../org/apache/hugegraph/cmd/InitStore.java | 0 .../org/apache/hugegraph/cmd/StoreDumper.java | 0 .../apache/hugegraph/dist/DistOptions.java | 0 .../hugegraph/dist/HugeGraphServer.java | 0 .../hugegraph/dist/HugeGremlinServer.java | 0 .../apache/hugegraph/dist/HugeRestServer.java | 0 .../apache/hugegraph/dist/RegisterUtil.java | 0 .../src/main/resources/backend.properties | 0 .../src/main/resources/log4j2.xml | 0 .../hugegraph-example}/pom.xml | 2 +- .../apache/hugegraph/example/Example1.java | 0 .../apache/hugegraph/example/Example2.java | 0 .../apache/hugegraph/example/Example3.java | 0 .../apache/hugegraph/example/ExampleUtil.java | 0 .../example/GraphOfTheMoviesExample.java | 0 .../hugegraph/example/PerfExample1.java | 0 .../hugegraph/example/PerfExample2.java | 0 .../hugegraph/example/PerfExample3.java | 0 .../hugegraph/example/PerfExample4.java | 0 .../hugegraph/example/PerfExampleBase.java | 0 .../apache/hugegraph/example/TaskExample.java | 0 .../example/ThreadRangePerfTest.java | 0 .../src/main/resources/hugegraph.properties | 0 .../src/main/resources/log4j2.xml | 0 .../hugegraph-hbase}/pom.xml | 2 +- .../backend/store/hbase/HbaseFeatures.java | 0 .../backend/store/hbase/HbaseMetrics.java | 0 .../backend/store/hbase/HbaseOptions.java | 0 .../backend/store/hbase/HbaseSerializer.java | 0 .../backend/store/hbase/HbaseSessions.java | 0 .../backend/store/hbase/HbaseStore.java | 0 .../store/hbase/HbaseStoreProvider.java | 0 .../backend/store/hbase/HbaseTable.java | 0 .../backend/store/hbase/HbaseTables.java | 0 .../hugegraph-mysql}/pom.xml | 2 +- .../store/mysql/MysqlBackendEntry.java | 0 .../store/mysql/MysqlEntryIterator.java | 0 .../backend/store/mysql/MysqlFeatures.java | 0 .../backend/store/mysql/MysqlMetrics.java | 0 .../backend/store/mysql/MysqlOptions.java | 0 .../backend/store/mysql/MysqlSerializer.java | 0 .../backend/store/mysql/MysqlSessions.java | 0 .../backend/store/mysql/MysqlStore.java | 0 .../store/mysql/MysqlStoreProvider.java | 0 .../backend/store/mysql/MysqlTable.java | 0 .../backend/store/mysql/MysqlTables.java | 0 .../backend/store/mysql/MysqlUtil.java | 0 .../backend/store/mysql/ResultSetWrapper.java | 0 .../backend/store/mysql/WhereBuilder.java | 0 .../hugegraph-palo}/pom.xml | 2 +- .../backend/store/palo/PaloFeatures.java | 0 .../backend/store/palo/PaloFile.java | 0 .../backend/store/palo/PaloHttpClient.java | 0 .../backend/store/palo/PaloLoadInfo.java | 0 .../backend/store/palo/PaloOptions.java | 0 .../backend/store/palo/PaloSerializer.java | 0 .../backend/store/palo/PaloSessions.java | 0 .../backend/store/palo/PaloStore.java | 0 .../backend/store/palo/PaloStoreProvider.java | 0 .../backend/store/palo/PaloTable.java | 0 .../backend/store/palo/PaloTables.java | 0 .../hugegraph-postgresql}/pom.xml | 4 +- .../store/postgresql/PostgresqlOptions.java | 0 .../postgresql/PostgresqlSerializer.java | 0 .../store/postgresql/PostgresqlSessions.java | 0 .../store/postgresql/PostgresqlStore.java | 0 .../postgresql/PostgresqlStoreProvider.java | 0 .../store/postgresql/PostgresqlTable.java | 0 .../store/postgresql/PostgresqlTables.java | 0 .../hugegraph-rocksdb}/pom.xml | 2 +- .../backend/store/rocksdb/OpenedRocksDB.java | 0 .../store/rocksdb/RocksDBFeatures.java | 0 .../store/rocksdb/RocksDBIngester.java | 0 .../store/rocksdb/RocksDBIteratorPool.java | 0 .../backend/store/rocksdb/RocksDBMetrics.java | 0 .../backend/store/rocksdb/RocksDBOptions.java | 0 .../store/rocksdb/RocksDBSessions.java | 0 .../store/rocksdb/RocksDBStdSessions.java | 0 .../backend/store/rocksdb/RocksDBStore.java | 0 .../store/rocksdb/RocksDBStoreProvider.java | 0 .../backend/store/rocksdb/RocksDBTable.java | 0 .../backend/store/rocksdb/RocksDBTables.java | 0 .../store/rocksdbsst/RocksDBSstSessions.java | 0 .../store/rocksdbsst/RocksDBSstStore.java | 0 .../rocksdbsst/RocksDBSstStoreProvider.java | 0 .../hugegraph-scylladb}/pom.xml | 2 +- .../store/scylladb/ScyllaDBFeatures.java | 0 .../store/scylladb/ScyllaDBMetrics.java | 0 .../store/scylladb/ScyllaDBStoreProvider.java | 0 .../store/scylladb/ScyllaDBTablesWithMV.java | 0 .../hugegraph-test}/pom.xml | 2 +- .../apache/hugegraph/api/ApiTestSuite.java | 0 .../apache/hugegraph/api/ArthasApiTest.java | 0 .../org/apache/hugegraph/api/BaseApiTest.java | 0 .../apache/hugegraph/api/CypherApiTest.java | 0 .../org/apache/hugegraph/api/EdgeApiTest.java | 0 .../hugegraph/api/EdgeLabelApiTest.java | 0 .../apache/hugegraph/api/GremlinApiTest.java | 0 .../hugegraph/api/IndexLabelApiTest.java | 0 .../apache/hugegraph/api/LoginApiTest.java | 0 .../apache/hugegraph/api/MetricsApiTest.java | 0 .../apache/hugegraph/api/ProjectApiTest.java | 0 .../hugegraph/api/PropertyKeyApiTest.java | 0 .../apache/hugegraph/api/SchemaApiTest.java | 0 .../org/apache/hugegraph/api/TaskApiTest.java | 0 .../org/apache/hugegraph/api/UserApiTest.java | 0 .../apache/hugegraph/api/VertexApiTest.java | 0 .../hugegraph/api/VertexLabelApiTest.java | 0 .../api/traversers/AdamicAdarAPITest.java | 0 .../traversers/AllShortestPathsApiTest.java | 0 .../api/traversers/CountApiTest.java | 0 .../api/traversers/CrosspointsApiTest.java | 0 .../CustomizedCrosspointsApiTest.java | 0 .../api/traversers/EdgesApiTest.java | 0 .../traversers/FusiformSimilarityApiTest.java | 0 .../traversers/JaccardSimilarityApiTest.java | 0 .../api/traversers/KneighborApiTest.java | 0 .../hugegraph/api/traversers/KoutApiTest.java | 0 .../MultiNodeShortestPathApiTest.java | 0 .../api/traversers/NeighborRankApiTest.java | 0 .../api/traversers/PathsApiTest.java | 0 .../api/traversers/PersonalRankApiTest.java | 0 .../hugegraph/api/traversers/RaysApiTest.java | 0 .../traversers/ResourceAllocationAPITest.java | 0 .../api/traversers/RingsApiTest.java | 0 .../api/traversers/SameNeighborsApiTest.java | 0 .../api/traversers/ShortestPathApiTest.java | 0 .../SingleSourceShortestPathApiTest.java | 0 .../api/traversers/TemplatePathsApiTest.java | 0 .../traversers/TraversersApiTestSuite.java | 0 .../WeightedShortestPathApiTest.java | 0 .../org/apache/hugegraph/core/AuthTest.java | 0 .../apache/hugegraph/core/BaseCoreTest.java | 0 .../apache/hugegraph/core/CoreTestSuite.java | 0 .../apache/hugegraph/core/EdgeCoreTest.java | 0 .../hugegraph/core/EdgeLabelCoreTest.java | 0 .../hugegraph/core/IndexLabelCoreTest.java | 0 .../hugegraph/core/MultiGraphsTest.java | 0 .../hugegraph/core/PropertyCoreTest.java | 0 .../hugegraph/core/PropertyKeyCoreTest.java | 0 .../apache/hugegraph/core/RamTableTest.java | 0 .../hugegraph/core/RestoreCoreTest.java | 0 .../core/RoleElectionStateMachineTest.java | 0 .../apache/hugegraph/core/SchemaCoreTest.java | 0 .../apache/hugegraph/core/TaskCoreTest.java | 0 .../apache/hugegraph/core/VertexCoreTest.java | 0 .../hugegraph/core/VertexLabelCoreTest.java | 0 .../hugegraph/testutil/FakeObjects.java | 0 .../org/apache/hugegraph/testutil/Utils.java | 0 .../tinkerpop/ProcessBasicSuite.java | 0 .../tinkerpop/ProcessStandardTest.java | 0 .../tinkerpop/ProcessTestGraphProvider.java | 0 .../tinkerpop/StructureBasicSuite.java | 0 .../tinkerpop/StructureStandardTest.java | 0 .../tinkerpop/StructureTestGraphProvider.java | 0 .../apache/hugegraph/tinkerpop/TestGraph.java | 0 .../hugegraph/tinkerpop/TestGraphFactory.java | 0 .../tinkerpop/TestGraphProvider.java | 0 .../tinkerpop/tests/HugeGraphWriteTest.java | 0 .../apache/hugegraph/unit/BaseUnitTest.java | 0 .../apache/hugegraph/unit/FakeObjects.java | 0 .../apache/hugegraph/unit/UnitTestSuite.java | 0 .../unit/cache/CacheManagerTest.java | 0 .../hugegraph/unit/cache/CacheTest.java | 0 .../cache/CachedGraphTransactionTest.java | 0 .../cache/CachedSchemaTransactionTest.java | 0 .../hugegraph/unit/cache/RamTableTest.java | 0 .../unit/cassandra/CassandraTest.java | 0 .../hugegraph/unit/core/AnalyzerTest.java | 0 .../unit/core/BackendMutationTest.java | 0 .../unit/core/BackendStoreInfoTest.java | 0 .../unit/core/ConditionQueryFlattenTest.java | 0 .../hugegraph/unit/core/ConditionTest.java | 0 .../hugegraph/unit/core/DataTypeTest.java | 0 .../hugegraph/unit/core/DirectionsTest.java | 0 .../hugegraph/unit/core/ExceptionTest.java | 0 .../hugegraph/unit/core/LocksTableTest.java | 0 .../hugegraph/unit/core/PageStateTest.java | 0 .../apache/hugegraph/unit/core/QueryTest.java | 0 .../apache/hugegraph/unit/core/RangeTest.java | 0 .../unit/core/RolePermissionTest.java | 0 .../hugegraph/unit/core/RowLockTest.java | 0 .../unit/core/SecurityManagerTest.java | 0 .../hugegraph/unit/core/SerialEnumTest.java | 0 .../unit/core/SystemSchemaStoreTest.java | 0 .../unit/core/TraversalUtilTest.java | 0 .../apache/hugegraph/unit/id/EdgeIdTest.java | 0 .../org/apache/hugegraph/unit/id/IdTest.java | 0 .../apache/hugegraph/unit/id/IdUtilTest.java | 0 .../unit/id/SplicingIdGeneratorTest.java | 0 .../hugegraph/unit/mysql/MysqlUtilTest.java | 0 .../unit/mysql/WhereBuilderTest.java | 0 .../unit/rocksdb/BaseRocksDBUnitTest.java | 0 .../unit/rocksdb/RocksDBCountersTest.java | 0 .../unit/rocksdb/RocksDBPerfTest.java | 0 .../unit/rocksdb/RocksDBSessionTest.java | 0 .../unit/rocksdb/RocksDBSessionsTest.java | 0 .../serializer/BinaryBackendEntryTest.java | 0 .../BinaryScatterSerializerTest.java | 0 .../unit/serializer/BinarySerializerTest.java | 0 .../unit/serializer/BytesBufferTest.java | 0 .../serializer/SerializerFactoryTest.java | 0 .../unit/serializer/StoreSerializerTest.java | 0 .../serializer/TableBackendEntryTest.java | 0 .../unit/serializer/TextBackendEntryTest.java | 0 .../unit/store/RamIntObjectMapTest.java | 0 .../hugegraph/unit/util/CompressUtilTest.java | 0 .../hugegraph/unit/util/JsonUtilTest.java | 0 .../hugegraph/unit/util/RateLimiterTest.java | 0 .../unit/util/StringEncodingTest.java | 0 .../hugegraph/unit/util/VersionTest.java | 0 .../collection/CollectionFactoryTest.java | 0 .../unit/util/collection/IdSetTest.java | 0 .../unit/util/collection/Int2IntsMapTest.java | 0 .../unit/util/collection/IntMapTest.java | 0 .../unit/util/collection/IntSetTest.java | 0 .../util/collection/ObjectIntMappingTest.java | 0 .../src/main/resources/fast-methods.filter | 0 .../src/main/resources/hugegraph.properties | 0 .../src/main/resources/log4j2.xml | 0 .../src/main/resources/methods.filter | 0 .../benchmark/BenchmarkConstants.java | 0 .../hugegraph/benchmark/SimpleRandom.java | 0 .../map/MapRandomGetPutThroughputTest.java | 0 hugegraph-server/pom.xml | 484 +++++++++++++++++ hugegraph-store/README.md | 0 pom.xml | 502 ++---------------- 916 files changed, 572 insertions(+), 520 deletions(-) create mode 100644 hugegraph-pd/README.md rename {hugegraph-api => hugegraph-server/hugegraph-api}/pom.xml (99%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/API.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/cypher/CypherManager.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/cypher/CypherModel.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/RedirectFilterDynamicFeature.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/config/ServerOptions.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/core/GraphManager.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/define/Checkable.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/define/WorkLoad.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/serializer/Serializer.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/server/RestServer.java (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/java/org/apache/hugegraph/version/ApiVersion.java (99%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin (100%) rename {hugegraph-api => hugegraph-server/hugegraph-api}/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.server.OpProcessor (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/pom.xml (98%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/com/datastax/driver/core/querybuilder/Clauses.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java (100%) rename {hugegraph-cassandra => hugegraph-server/hugegraph-cassandra}/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/pom.xml (99%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/HugeException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/HugeFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/HugeGraph.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/HugeGraphParams.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/StandardHugeGraph.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/AuthConstant.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/AuthManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/EntityManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeAccess.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeBelong.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeGroup.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugePermission.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeProject.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeResource.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeTarget.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/HugeUser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/ResourceObject.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/ResourceType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/RolePermission.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/auth/UserWithRole.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/BackendException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/LocalCounter.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/Transaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/Cache.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/Id.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/PageIds.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/PageState.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/QueryList.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/Condition.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/Query.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/Shard.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/StoreCommand.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSnapshotFile.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/StoreStateMachine.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategyManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/compress/ParallelCompressStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/compress/SerialCompressStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/AddPeerProcessor.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/ListPeersProcessor.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RemovePeerProcessor.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RpcForwarder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/SetLeaderProcessor.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/StoreCommandProcessor.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/ram/IntIntMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/ram/IntLongMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/store/ram/RamTable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/AbstractTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/IndexableTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/SchemaIndexTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/backend/tx/SchemaTransaction.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/config/AuthOptions.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/config/CoreOptions.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/ConnectionException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/ExistedException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/HugeGremlinException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/LimitExceedException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/NoIndexException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/NotAllowException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/NotFoundException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/exception/NotSupportException.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/io/GraphSONSchemaSerializer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/io/HugeGraphIoRegistry.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/io/HugeGryoModule.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/AlgorithmJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/ComputerJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/EphemeralJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/EphemeralJobBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/GremlinJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/Job.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/JobBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/SysJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/UserJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/AbstractAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/AlgorithmPool.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/BfsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/Consumers.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/CountEdgeAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/CountVertexAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/SubgraphStatAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/AbstractCentAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithmV2.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithmV2.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/DegreeCentralityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/EigenvectorCentralityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/AbstractCommAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/ClusterCoefficientAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/KCoreAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/LpaAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/comm/WeakConnectedComponent.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/path/RingsDetectAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/rank/PageRankAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/Computer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/ComputerPool.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/LouvainComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/LpaComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/PageRankComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/TriangleCountComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/computer/WeakConnectedComponentComputer.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/EdgeLabelRemoveJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRebuildJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRemoveJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyClearJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyCreateJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyRemoveJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/schema/VertexLabelRemoveJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredElementJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredIndexJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredJob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/job/system/JobCounters.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/ClusterRole.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/ClusterRoleStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/Config.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/RoleElectionConfig.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/RoleElectionOptions.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/StandardClusterRoleStore.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/plugin/HugeGraphGremlinPlugin.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/plugin/HugeGraphPlugin.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/EdgeLabel.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/IndexLabel.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/PropertyKey.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/SchemaElement.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/SchemaLabel.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/SchemaManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/Userdata.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/VertexLabel.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/AbstractBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/EdgeLabelBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/IndexLabelBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/PropertyKeyBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/SchemaBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/schema/builder/VertexLabelBuilder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/GraphType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeEdge.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeElement.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeFeatures.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeIndex.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeProperty.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeVertex.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/structure/HugeVertexProperty.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/EphemeralJobQueue.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/HugeServerInfo.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/HugeTask.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/TaskCallable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/TaskManager.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/TaskScheduler.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/task/TaskStatus.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/NeighborRankTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/PersonalRankTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/PredictionTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/AbstractRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/DoubleWayMultiPathsRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/PathsRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/Records.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2ArrayRecord.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2IntRecord.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2SetRecord.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Record.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/SyncRecord.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/EdgeStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/RepeatEdgeStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/WeightedEdgeStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/ConcurrentTraverseStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/SingleTraverseStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/TraverseStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStepStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStepStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepByBatch.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/QueryHolder.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/Text.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/HugeType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/Idfiable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/Indexable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/Nameable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/Propertiable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/Typeable.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/Action.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/AggregateType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/Cardinality.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/CollectionType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/DataType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/Directions.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/Frequency.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/GraphMode.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/GraphReadMode.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/HugeKeys.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/IdStrategy.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/IndexType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/NodeRole.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/SchemaStatus.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/SerialEnum.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/type/define/WriteType.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/Blob.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/CompressUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/ConfigUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/Consumers.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/CopyUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/Events.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/FixedTimerWindowRateLimiter.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/FixedWatchWindowRateLimiter.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/GZipUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/JsonUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/KryoUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/LZ4Util.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/LockUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/ParameterUtil.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/RateLimiter.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/Reflection.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/StringEncoding.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/CollectionFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/IdSet.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/Int2IntsMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/IntIterator.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/IntMap.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/IntSet.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMapping.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMappingFactory.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/variables/HugeVariables.java (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/java/org/apache/hugegraph/version/CoreVersion.java (96%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/resources/hugegraph.properties (100%) rename {hugegraph-core => hugegraph-server/hugegraph-core}/src/main/resources/proto/raft.proto (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/README.md (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/dist.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/docker/docker-entrypoint.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/docker/example/docker-compose-cassandra.yml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/docker/scripts/detect-storage.groovy (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/docker/scripts/remote-connect.groovy (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/pom.xml (99%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/LICENSE (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/NOTICE (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-HdrHistogram.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-ST4.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-arthas-agent-attach.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-arthas-packaging.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-audience-annotations.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-byte-buddy-agent.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-byte-buddy.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-cassandra-all.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-beanutils.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-cli.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-codec.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-collections.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-compress.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-configuration.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-configuration2.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-io.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-lang.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-lang3.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-logging.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-math3.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-commons-text.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-compress-lzf.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-concurrent-trees.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-disruptor.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-error-prone.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-exp4j.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-expressions-9.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-fastutil.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-findbugs-annotations.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-front-end.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-console.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-driver.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-groovy.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-server.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-shaded.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-gremlin-test.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-2.5.14.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-cli-picocli.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-console.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-groovysh.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-json.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-jsr223.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-swing.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-templates.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-groovy-xml.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-hamcrest.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-hbase-shaded-endpoint.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-hppc.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-htrace-core4-4.2.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-httpclient.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-httpcore.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-ikanalyzer-2012_u6.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-ivy.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-annotations.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-databind.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-javax.json.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jcabi-log.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jcabi-manifests.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jcl-over-slf4j.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jersey-client.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jflex.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jieba-analysis.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-jna.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-json-simple.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-json-smart.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-admin.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-client.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-common.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-crypto.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-identity.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-server.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-simplekdc.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerb-util.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerby-asn1.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerby-config.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerby-pkix.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerby-util.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-kerby-xdr.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-log4j-api.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-log4j-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-objenesis.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-ohc-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-opencypher-ast-9.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-parboiled-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-parboiled-scala_2.12.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-parser-9.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-postgresql.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-rewriting-9.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-rocksdbjni.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-sigar.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-snakeyaml.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-snowball-stemmer.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-swagger-annotations.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-swagger-models.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-tinkergraph-gremlin.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-token-provider.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-tracer-core.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-util-9.0.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LICENSE-zt-zip.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/release-docs/licenses/LINCENSE-jopt-simple.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/scripts/apache-release.sh (96%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/scripts/dependency/check_dependencies.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/scripts/dependency/known-dependencies.txt (94%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/scripts/dependency/regenerate_known_dependencies.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/descriptor/assembly.xml (96%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/build.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/config.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/deploy.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/jenkins.sh (97%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/publish.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/jenkins/test.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/checksocket.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/docker-entrypoint.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/dump-conf.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/dump-store.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/gremlin-console.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/hugegraph (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/hugegraph-server.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/hugegraph.service (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/init-store.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/install.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/monitor-hugegraph.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/raft-tools.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/start-hugegraph.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/start-monitor.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/stop-hugegraph.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/stop-monitor.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/util.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/bin/wait-storage.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/computer.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/graphs/hugegraph.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/gremlin-driver-settings.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/gremlin-server.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/log4j2.xml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/remote-objects.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/remote.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/conf/rest-server.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/ext/README.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/ext/plugins.txt (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/scripts/empty-sample.groovy (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/static/scripts/example.groovy (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/build-report.sh (97%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft1/graphs/hugegraph.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft1/gremlin-server.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft1/rest-server.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft2/graphs/hugegraph.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft2/gremlin-server.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft2/rest-server.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft3/graphs/hugegraph.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft3/gremlin-server.yaml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/conf-raft3/rest-server.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/hbase-site.xml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-backend.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-cassandra.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-hbase.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-mysql-via-docker.sh (94%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-mysql.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-postgresql-via-docker.sh (94%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-postgresql.sh (94%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/install-scylladb.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/maven.xml (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/mysql.cnf (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/run-api-test-for-raft.sh (92%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/run-api-test.sh (92%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/run-core-test.sh (91%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/run-tinkerpop-test.sh (84%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/run-unit-test.sh (92%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/start-server.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/assembly/travis/stop-server.sh (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/cmd/ConfDumper.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/cmd/InitStore.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/cmd/StoreDumper.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/dist/DistOptions.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/dist/HugeGraphServer.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/dist/HugeRestServer.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/resources/backend.properties (100%) rename {hugegraph-dist => hugegraph-server/hugegraph-dist}/src/main/resources/log4j2.xml (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/pom.xml (98%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/Example1.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/Example2.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/Example3.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/ExampleUtil.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/GraphOfTheMoviesExample.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/PerfExample1.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/PerfExample2.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/PerfExample3.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/PerfExample4.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/TaskExample.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/java/org/apache/hugegraph/example/ThreadRangePerfTest.java (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/resources/hugegraph.properties (100%) rename {hugegraph-example => hugegraph-server/hugegraph-example}/src/main/resources/log4j2.xml (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/pom.xml (97%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseFeatures.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseMetrics.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseOptions.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSerializer.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStoreProvider.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java (100%) rename {hugegraph-hbase => hugegraph-server/hugegraph-hbase}/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTables.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/pom.xml (97%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlBackendEntry.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlEntryIterator.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlFeatures.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlMetrics.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSerializer.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStore.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStoreProvider.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTable.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTables.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlUtil.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java (100%) rename {hugegraph-mysql => hugegraph-server/hugegraph-mysql}/src/main/java/org/apache/hugegraph/backend/store/mysql/WhereBuilder.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/pom.xml (97%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFeatures.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFile.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloLoadInfo.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloOptions.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSerializer.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSessions.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStore.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStoreProvider.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTable.java (100%) rename {hugegraph-palo => hugegraph-server/hugegraph-palo}/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTables.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/pom.xml (95%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlOptions.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSerializer.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSessions.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStore.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStoreProvider.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTable.java (100%) rename {hugegraph-postgresql => hugegraph-server/hugegraph-postgresql}/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTables.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/pom.xml (97%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBFeatures.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java (100%) rename {hugegraph-rocksdb => hugegraph-server/hugegraph-rocksdb}/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStoreProvider.java (100%) rename {hugegraph-scylladb => hugegraph-server/hugegraph-scylladb}/pom.xml (96%) rename {hugegraph-scylladb => hugegraph-server/hugegraph-scylladb}/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBFeatures.java (100%) rename {hugegraph-scylladb => hugegraph-server/hugegraph-scylladb}/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBMetrics.java (100%) rename {hugegraph-scylladb => hugegraph-server/hugegraph-scylladb}/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBStoreProvider.java (100%) rename {hugegraph-scylladb => hugegraph-server/hugegraph-scylladb}/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBTablesWithMV.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/pom.xml (99%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/BaseApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/CypherApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/LoginApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/TaskApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/UserApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/VertexApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPITest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/CountApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/EdgesApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/PathsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPITest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/RingsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/TraversersApiTestSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathApiTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/AuthTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/EdgeLabelCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/IndexLabelCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/PropertyCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/PropertyKeyCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/RamTableTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/RestoreCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/SchemaCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/VertexCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/core/VertexLabelCoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/testutil/FakeObjects.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/testutil/Utils.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/ProcessStandardTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/ProcessTestGraphProvider.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/StructureStandardTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/StructureTestGraphProvider.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphFactory.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphProvider.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/tinkerpop/tests/HugeGraphWriteTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/BaseUnitTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/FakeObjects.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cache/CacheManagerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cache/CacheTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cache/CachedGraphTransactionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cache/CachedSchemaTransactionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cache/RamTableTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/cassandra/CassandraTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/AnalyzerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/BackendMutationTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/BackendStoreInfoTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/ConditionQueryFlattenTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/ConditionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/DataTypeTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/DirectionsTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/ExceptionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/LocksTableTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/PageStateTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/QueryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/RangeTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/RolePermissionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/RowLockTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/SerialEnumTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/SystemSchemaStoreTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/core/TraversalUtilTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/id/EdgeIdTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/id/IdTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/id/IdUtilTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/id/SplicingIdGeneratorTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/mysql/MysqlUtilTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/mysql/WhereBuilderTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/BytesBufferTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/SerializerFactoryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/StoreSerializerTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/TableBackendEntryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/serializer/TextBackendEntryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/CompressUtilTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/JsonUtilTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/RateLimiterTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/StringEncodingTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/VersionTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/CollectionFactoryTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/Int2IntsMapTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/IntSetTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/java/org/apache/hugegraph/unit/util/collection/ObjectIntMappingTest.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/resources/fast-methods.filter (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/resources/hugegraph.properties (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/resources/log4j2.xml (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/main/resources/methods.filter (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/test/java/org/apache/hugegraph/benchmark/SimpleRandom.java (100%) rename {hugegraph-test => hugegraph-server/hugegraph-test}/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java (100%) create mode 100644 hugegraph-server/pom.xml create mode 100644 hugegraph-store/README.md diff --git a/.github/outdated/.travis.yml b/.github/outdated/.travis.yml index 4b5c57ad72..485fe441f8 100644 --- a/.github/outdated/.travis.yml +++ b/.github/outdated/.travis.yml @@ -115,7 +115,7 @@ env: global: - RELEASE_BRANCH=^release-.*$ - RELEASE_TAG=^v[0-9]\..*$ - - TRAVIS_DIR=hugegraph-dist/src/assembly/travis + - TRAVIS_DIR=hugegraph-server/hugegraph-dist/src/assembly/travis - DEPLOYED=0 - secure: dYmFTVeEtRzLNaHp9ToTV/+CkTD0/rEj+K7dRN8wsv/yg4pbqwnyWbSXcqMlj6iNFzAz3nPbmFLCvAWON9/SMN9iJIT6x/xfcf+LqCT8QWczo2nc9xeX144ij2VHX1Drvtk5fRTMaTXRfWEQIrjqx2yrJTIdrXWzWSaZLFv1CRCUizEiGGCePnzUWxx9dBypNyC6IaH6lIv8uN5E6+10SYhb7UJGjWUMDg1bCeW9X7X2wg4QpsGDzlGFXT2EBPU/dAb5attTAtW8dKxrCZqZJTPWe0BarXDBR4PO15BC+a0V1g8LwexedtDjJeFRcGPaJ5NN4d3jDSusCzt5Jf4U0Wa1gDRMVTU3jT+KYkm5eoV4wOZMySobjh6VpQH/LyL0QTDy5apRPAxw+wO+tc91P+nkJmnlr3pN8abtMZ6NciZizUBYQRgR/m2Ir0stvtbZxBQOATuPtBgNDKiDgVdSYcRJzSqYEMFOn35AvsDZ9aUsyC8k29PCUZ0gQO2Is6cV1ClFBnM52hfU9XX0gu+NviSnYNGvcokod8z9VjGtnM7V3LYjqXSFqO9kkMbOmkME1tD2Bh/klw2/OM+2tBBZiAgxB89st5jSUHI4a2hpUyaQBezJUcU9t2vVT/zAVEIqzw2PDxkMU7t0n6L1x+qUIUTG/WynfIni5msxuR7HoiU= - secure: XbX6AX5zDPc2PcWYAMW+6fazqRRUqpgQkt4eXUugLuVIYZBmJ0WqncEhJ4+mdwOGPIhnP2HsOaSeK2eE/O+iLY2XpBFbugoBgm9VaZlCC4CY1gRNHaanYg64Lrm3NPY3n08IHRMazHqMpJwUqNO+OG/6QwkepULQLj5Rluf716AoXHa7IEJhAIrwr+OXQvdEaJdUXlS1lRycXVeYtOewl7qYxCO4dD4RMhPlNykh9KEK7fd5wnPkiUsp1SwF4g5XsaLvGXmT/qQ1nj8oa9Caej/iaj6HMKG3BO057mq4KK5JDxTPWhBueNpEkUwldAnrMhYWLRnNf4IyjUsaB/Pmi6HspzcaiORPLYwPmdvLGGSnYwbtO+fAHebgpgOnj/vGmRmY4YtIkYdFtbPBI0HpbGB77tqNRFCe/5deLrjx0hXJBfoKTy7d42SI1eBhNR0svZYUHkSfuXwly6hMTlH1DN/bumMFxfXDkY9PFHlzV1Mn3vb9BxKTaP88hJsWk7JqgniqUF7EWAc0EhHMbJct2gC0pDc95z4Yy9391n7/XWJErhIdYon1Ukds5+a43xFXoy76gR4LuMDpzzCnutMjhC2yDuGaZx/DfkPBb5JFU7SHtTKj05zb73Moogi7qqbH8jwcwoSfogAKyrIAWTcAgvJ2LVnRzwdsiLTc6MEagiM= diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index 0a7396ff80..fa28483a9d 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -13,7 +13,7 @@ jobs: dependency-check: runs-on: ubuntu-latest env: - SCRIPT_DEPENDENCY: hugegraph-dist/scripts/dependency + SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency steps: - name: Checkout source uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b67021fab9..670831aa03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-20.04 env: - TRAVIS_DIR: hugegraph-dist/src/assembly/travis + TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis REPORT_DIR: target/site/jacoco BACKEND: ${{ matrix.BACKEND }} TRIGGER_BRANCH_NAME: ${{ github.ref_name }} diff --git a/.licenserc.yaml b/.licenserc.yaml index db7af8d8d1..0c7e588bf4 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -68,7 +68,7 @@ header: # `header` section is configurations for source codes license header. - '**/*.properties' - '**/RaftRequests.java' - 'dist/**/*' - - 'hugegraph-dist' + - 'hugegraph-server/hugegraph-dist' - '**/assembly/static/bin/hugegraph.service' - 'scripts/dev/reviewers' - 'scripts/dev/reviewers' @@ -89,14 +89,14 @@ header: # `header` section is configurations for source codes license header. - '**/META-INF/MANIFEST.MF' - '.repository/**' - '**/.flattened-pom.xml' - - 'hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java' + - 'hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java' - '**/optimize/HugeScriptTraversal.java' - '**/type/Nameable.java' - '**/define/Cardinality.java' - '**/util/StringEncoding.java' - - 'hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java' - - 'hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java' - - 'hugegraph-dist/src/assembly/static/bin/wait-storage.sh' + - 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java' + - 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java' + - 'hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh' comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`. # license-location-threshold specifies the index threshold where the license header can be located, diff --git a/hugegraph-pd/README.md b/hugegraph-pd/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hugegraph-api/pom.xml b/hugegraph-server/hugegraph-api/pom.xml similarity index 99% rename from hugegraph-api/pom.xml rename to hugegraph-server/hugegraph-api/pom.xml index ad397f18ee..d365ce22f8 100644 --- a/hugegraph-api/pom.xml +++ b/hugegraph-server/hugegraph-api/pom.xml @@ -20,7 +20,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.hugegraph - hugegraph + hugegraph-server ${revision} ../pom.xml diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/API.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/arthas/ArthasAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/AccessAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/BelongAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/GroupAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/ProjectAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/TargetAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/UserAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherManager.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherManager.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherManager.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherManager.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherModel.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherModel.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherModel.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherModel.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/CompressInterceptor.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/DecompressInterceptor.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/ExceptionFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadDetectFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/LoadReleaseFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilterDynamicFeature.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilterDynamicFeature.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilterDynamicFeature.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilterDynamicFeature.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/StatusFilter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/BatchAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinQueryAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/AlgorithmAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/ComputerAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/RebuildAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/job/TaskAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/metrics/MetricsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/VersionAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/WhiteIpListAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/raft/RaftAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/EdgeLabelAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/IndexLabelAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/PropertyKeyAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/SchemaAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/schema/VertexLabelAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CountAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/CustomizedPathsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgesAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KoutAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PathsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RaysAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/RingsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/TraverserAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/Vertices.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/VerticesAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/variables/VariablesAPI.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ConfigAuthenticator.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeAuthenticator.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/StandardAuthenticator.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/Checkable.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/UpdateStrategy.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/define/WorkLoad.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsKeys.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsModule.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/MetricsUtil.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/ServerReporter.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SystemMetrics.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/rpc/RpcClientProviderWithAuth.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/Serializer.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java similarity index 100% rename from hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/RestServer.java diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java similarity index 99% rename from hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java rename to hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java index 117795c8d6..969e9a3d6a 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java @@ -123,6 +123,6 @@ public final class ApiVersion { public static void check() { // Check version of hugegraph-core. Firstly do check from version 0.3 - VersionUtil.check(CoreVersion.VERSION, "1.0", "1.1", CoreVersion.NAME); + VersionUtil.check(CoreVersion.VERSION, "1.0", "1.6", CoreVersion.NAME); } } diff --git a/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin b/hugegraph-server/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin similarity index 100% rename from hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin rename to hugegraph-server/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin diff --git a/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.server.OpProcessor b/hugegraph-server/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.server.OpProcessor similarity index 100% rename from hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.server.OpProcessor rename to hugegraph-server/hugegraph-api/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.server.OpProcessor diff --git a/hugegraph-cassandra/pom.xml b/hugegraph-server/hugegraph-cassandra/pom.xml similarity index 98% rename from hugegraph-cassandra/pom.xml rename to hugegraph-server/hugegraph-cassandra/pom.xml index 6e12b89935..888f6dd7f8 100644 --- a/hugegraph-cassandra/pom.xml +++ b/hugegraph-server/hugegraph-cassandra/pom.xml @@ -20,7 +20,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.apache.hugegraph - hugegraph + hugegraph-server ${revision} ../pom.xml diff --git a/hugegraph-cassandra/src/main/java/com/datastax/driver/core/querybuilder/Clauses.java b/hugegraph-server/hugegraph-cassandra/src/main/java/com/datastax/driver/core/querybuilder/Clauses.java similarity index 100% rename from hugegraph-cassandra/src/main/java/com/datastax/driver/core/querybuilder/Clauses.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/com/datastax/driver/core/querybuilder/Clauses.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraBackendEntry.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraEntryIterator.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraFeatures.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraMetrics.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraOptions.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSerializer.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraSessionPool.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStore.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraStoreProvider.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTable.java diff --git a/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java b/hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java similarity index 100% rename from hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java rename to hugegraph-server/hugegraph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraTables.java diff --git a/hugegraph-core/pom.xml b/hugegraph-server/hugegraph-core/pom.xml similarity index 99% rename from hugegraph-core/pom.xml rename to hugegraph-server/hugegraph-core/pom.xml index 8a0cb6b210..de312c9378 100644 --- a/hugegraph-core/pom.xml +++ b/hugegraph-server/hugegraph-core/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.apache.hugegraph - hugegraph + hugegraph-server ${revision} ../pom.xml diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraphParams.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/Analyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnalyzerFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/IKAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JcsegAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/JiebaAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/MMSeg4JAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/SmartCNAnalyzer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthConstant.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/AuthManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/EntityManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeAccess.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeBelong.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeGroup.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugePermission.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeProject.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeResource.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeTarget.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/HugeUser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RelationshipManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceObject.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/ResourceType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/RolePermission.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/SchemaDefine.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/StandardAuthManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/TokenGenerator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/auth/UserWithRole.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/BackendException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/LocalCounter.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/AbstractCache.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheNotifier.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedBackendStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/LevelCache.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/OffheapCache.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/EdgeId.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/Id.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SplicingIdGenerator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/IdHolderList.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageEntryIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageIds.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageInfo.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/PageState.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/QueryList.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/page/SortByCountIdHolderList.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Aggregate.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/BatchConditionQuery.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQueryFlatten.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdPrefixQuery.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdQuery.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/IdRangeQuery.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/QueryResults.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/AbstractSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryEntryIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryScatterSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BytesBuffer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/GraphSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/MergeIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SchemaSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/SerializerFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableBackendEntry.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TableSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextBackendEntry.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/TextSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/AbstractBackendStoreProvider.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendAction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntry.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendEntryIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendFeatures.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMetrics.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendMutation.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendProviderFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSession.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendSessionPool.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreProvider.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaDispatcher.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/MetaHandler.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/Shard.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/SystemSchemaStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/TableDefine.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBStoreProvider.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryDBTables.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/memory/InMemoryMetrics.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftAddPeerJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftBackendStoreProvider.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftClosure.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftContext.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftGroupManagerImpl.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftNode.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftRemovePeerJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftResult.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/RaftStoreClosure.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreCommand.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreCommand.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreCommand.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreCommand.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSnapshotFile.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSnapshotFile.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSnapshotFile.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreSnapshotFile.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreStateMachine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreStateMachine.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreStateMachine.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/StoreStateMachine.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategyManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategyManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategyManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/CompressStrategyManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/ParallelCompressStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/ParallelCompressStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/ParallelCompressStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/ParallelCompressStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/SerialCompressStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/SerialCompressStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/SerialCompressStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/compress/SerialCompressStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/AddPeerProcessor.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/AddPeerProcessor.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/AddPeerProcessor.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/AddPeerProcessor.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/ListPeersProcessor.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/ListPeersProcessor.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/ListPeersProcessor.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/ListPeersProcessor.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RemovePeerProcessor.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RemovePeerProcessor.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RemovePeerProcessor.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RemovePeerProcessor.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RpcForwarder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RpcForwarder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RpcForwarder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/RpcForwarder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/SetLeaderProcessor.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/SetLeaderProcessor.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/SetLeaderProcessor.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/SetLeaderProcessor.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/StoreCommandProcessor.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/StoreCommandProcessor.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/StoreCommandProcessor.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/raft/rpc/StoreCommandProcessor.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntIntMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntIntMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntIntMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntIntMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntLongMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntLongMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntLongMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntLongMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/IntObjectMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamTable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamTable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamTable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamTable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/AbstractTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/AbstractTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/AbstractTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/AbstractTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/IndexableTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/IndexableTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/IndexableTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/IndexableTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaIndexTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaIndexTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaIndexTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaIndexTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaTransaction.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaTransaction.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/SchemaTransaction.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/config/AuthOptions.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/AuthOptions.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/config/AuthOptions.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/AuthOptions.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/config/CoreOptions.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/CoreOptions.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/config/CoreOptions.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/config/CoreOptions.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ConnectionException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ConnectionException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/ConnectionException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ConnectionException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ExistedException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ExistedException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/ExistedException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/ExistedException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/HugeGremlinException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/HugeGremlinException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/HugeGremlinException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/HugeGremlinException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/LimitExceedException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/LimitExceedException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/LimitExceedException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/LimitExceedException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NoIndexException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NoIndexException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/NoIndexException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NoIndexException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotAllowException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotAllowException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotAllowException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotAllowException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotFoundException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotFoundException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotFoundException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotFoundException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotSupportException.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotSupportException.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotSupportException.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/exception/NotSupportException.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/io/GraphSONSchemaSerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/GraphSONSchemaSerializer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/io/GraphSONSchemaSerializer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/GraphSONSchemaSerializer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphIoRegistry.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphIoRegistry.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphIoRegistry.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphIoRegistry.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGryoModule.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGryoModule.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGryoModule.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGryoModule.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/AlgorithmJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/AlgorithmJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/AlgorithmJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/AlgorithmJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/ComputerJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/ComputerJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/ComputerJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/ComputerJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJobBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJobBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJobBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJobBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/GremlinJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/GremlinJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/GremlinJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/GremlinJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/Job.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/Job.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/Job.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/Job.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/JobBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/JobBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/JobBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/JobBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/SysJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/SysJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/SysJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/SysJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/UserJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/UserJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/UserJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/UserJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AbstractAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AbstractAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AbstractAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AbstractAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AlgorithmPool.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AlgorithmPool.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AlgorithmPool.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/AlgorithmPool.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/BfsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/BfsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/BfsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/BfsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Consumers.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Consumers.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Consumers.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Consumers.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountEdgeAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountEdgeAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountEdgeAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountEdgeAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountVertexAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountVertexAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountVertexAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/CountVertexAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/SubgraphStatAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/SubgraphStatAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/SubgraphStatAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/SubgraphStatAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/AbstractCentAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/AbstractCentAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/AbstractCentAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/AbstractCentAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithmV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithmV2.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithmV2.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/BetweennessCentralityAlgorithmV2.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithmV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithmV2.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithmV2.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/ClosenessCentralityAlgorithmV2.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/DegreeCentralityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/DegreeCentralityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/DegreeCentralityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/DegreeCentralityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/EigenvectorCentralityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/EigenvectorCentralityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/EigenvectorCentralityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/EigenvectorCentralityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/AbstractCommAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/AbstractCommAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/AbstractCommAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/AbstractCommAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/ClusterCoefficientAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/ClusterCoefficientAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/ClusterCoefficientAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/ClusterCoefficientAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/KCoreAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/KCoreAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/KCoreAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/KCoreAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LouvainTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LpaAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LpaAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LpaAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/LpaAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/TriangleCountAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/WeakConnectedComponent.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/WeakConnectedComponent.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/WeakConnectedComponent.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/comm/WeakConnectedComponent.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/path/RingsDetectAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/path/RingsDetectAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/path/RingsDetectAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/path/RingsDetectAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/rank/PageRankAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/rank/PageRankAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/rank/PageRankAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/rank/PageRankAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/Computer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/Computer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/Computer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/Computer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/ComputerPool.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/ComputerPool.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/ComputerPool.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/ComputerPool.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LouvainComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LouvainComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LouvainComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LouvainComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LpaComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LpaComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LpaComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/LpaComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/PageRankComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/PageRankComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/PageRankComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/PageRankComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/TriangleCountComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/TriangleCountComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/TriangleCountComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/TriangleCountComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/WeakConnectedComponentComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/WeakConnectedComponentComputer.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/WeakConnectedComponentComputer.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/WeakConnectedComponentComputer.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/EdgeLabelRemoveJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/EdgeLabelRemoveJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/EdgeLabelRemoveJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/EdgeLabelRemoveJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRebuildJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRebuildJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRebuildJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRebuildJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRemoveJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRemoveJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRemoveJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/IndexLabelRemoveJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyClearJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyClearJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyClearJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyClearJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyCreateJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyCreateJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyCreateJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyCreateJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyRemoveJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyRemoveJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyRemoveJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/OlapPropertyKeyRemoveJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/VertexLabelRemoveJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/VertexLabelRemoveJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/VertexLabelRemoveJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/VertexLabelRemoveJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredElementJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredElementJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredElementJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredElementJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredIndexJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredIndexJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredIndexJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredIndexJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredJob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredJob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/DeleteExpiredJob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/JobCounters.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/JobCounters.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/job/system/JobCounters.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/system/JobCounters.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRole.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRole.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRole.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRole.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRoleStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRoleStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRoleStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/ClusterRoleStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/Config.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/Config.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/Config.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/Config.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionConfig.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionConfig.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionConfig.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionConfig.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionOptions.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionOptions.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionOptions.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionOptions.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardClusterRoleStore.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardClusterRoleStore.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardClusterRoleStore.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardClusterRoleStore.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphGremlinPlugin.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphGremlinPlugin.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphGremlinPlugin.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphGremlinPlugin.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphPlugin.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphPlugin.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphPlugin.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/plugin/HugeGraphPlugin.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Client.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/EdgeLabel.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/EdgeLabel.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/EdgeLabel.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/EdgeLabel.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/IndexLabel.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/IndexLabel.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/IndexLabel.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/IndexLabel.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/PropertyKey.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/PropertyKey.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/PropertyKey.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/PropertyKey.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaElement.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaElement.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaElement.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaElement.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaLabel.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaLabel.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaLabel.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaLabel.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/SchemaManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/Userdata.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/Userdata.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/Userdata.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/Userdata.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/VertexLabel.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/VertexLabel.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/VertexLabel.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/VertexLabel.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/AbstractBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/AbstractBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/AbstractBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/AbstractBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/EdgeLabelBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/EdgeLabelBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/EdgeLabelBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/EdgeLabelBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/IndexLabelBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/IndexLabelBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/IndexLabelBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/IndexLabelBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/PropertyKeyBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/PropertyKeyBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/PropertyKeyBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/PropertyKeyBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/SchemaBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/SchemaBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/SchemaBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/SchemaBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/VertexLabelBuilder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/VertexLabelBuilder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/VertexLabelBuilder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/schema/builder/VertexLabelBuilder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/GraphType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/GraphType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/GraphType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/GraphType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeFeatures.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeFeatures.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeFeatures.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeFeatures.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeIndex.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeIndex.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeIndex.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeIndex.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeProperty.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeProperty.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeProperty.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeProperty.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertexProperty.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertexProperty.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertexProperty.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertexProperty.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/EphemeralJobQueue.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/EphemeralJobQueue.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/EphemeralJobQueue.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/EphemeralJobQueue.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeServerInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeServerInfo.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeServerInfo.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeServerInfo.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeTask.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeTask.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeTask.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeTask.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskCallable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskCallable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskCallable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskCallable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskScheduler.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskScheduler.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskScheduler.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskStatus.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskStatus.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskStatus.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskStatus.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CollectionPathsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CountTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizePathsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/CustomizedCrosspointsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/FusiformSimilarityTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/JaccardSimilarTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KoutTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/MultiNodeShortestPathTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/NeighborRankTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/NeighborRankTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/NeighborRankTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/NeighborRankTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PathsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PersonalRankTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PersonalRankTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PersonalRankTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PersonalRankTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PredictionTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PredictionTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PredictionTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/PredictionTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SameNeighborTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/ShortestPathTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/SubGraphTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/TemplatePathsTraverser.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/iterator/NestedIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/AbstractRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/AbstractRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/AbstractRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/AbstractRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/DoubleWayMultiPathsRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/DoubleWayMultiPathsRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/DoubleWayMultiPathsRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/DoubleWayMultiPathsRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KneighborRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/KoutRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/PathsRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/PathsRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/PathsRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/PathsRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/Records.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/Records.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/Records.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/Records.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/ShortestPathRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/SingleWayMultiPathsRecords.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2ArrayRecord.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2ArrayRecord.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2ArrayRecord.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2ArrayRecord.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2IntRecord.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2IntRecord.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2IntRecord.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2IntRecord.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2SetRecord.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2SetRecord.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2SetRecord.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Int2SetRecord.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Record.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Record.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Record.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/Record.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/RecordType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/SyncRecord.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/SyncRecord.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/SyncRecord.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/records/record/SyncRecord.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/EdgeStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/EdgeStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/EdgeStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/EdgeStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/RepeatEdgeStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/RepeatEdgeStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/RepeatEdgeStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/RepeatEdgeStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/Steps.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/WeightedEdgeStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/WeightedEdgeStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/WeightedEdgeStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/steps/WeightedEdgeStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/ConcurrentTraverseStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/ConcurrentTraverseStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/ConcurrentTraverseStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/ConcurrentTraverseStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/SingleTraverseStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/SingleTraverseStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/SingleTraverseStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/SingleTraverseStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/TraverseStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/TraverseStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/TraverseStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/strategy/TraverseStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStepStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStepStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStepStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeCountStepStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStepStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStepStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStepStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeGraphStepStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStep.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepByBatch.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepByBatch.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepByBatch.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepByBatch.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeVertexStepStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/QueryHolder.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/QueryHolder.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/QueryHolder.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/QueryHolder.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/Text.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/Text.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/Text.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/Text.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/HugeType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/HugeType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/HugeType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/HugeType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Idfiable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Idfiable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/Idfiable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Idfiable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Indexable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Indexable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/Indexable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Indexable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Propertiable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Propertiable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/Propertiable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Propertiable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/Typeable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Typeable.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/Typeable.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/Typeable.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Action.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Action.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Action.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Action.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/AggregateType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/AggregateType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/AggregateType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/AggregateType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/DataType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/DataType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/DataType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/DataType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Directions.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Directions.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Directions.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Directions.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Frequency.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Frequency.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Frequency.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Frequency.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphMode.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphMode.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphMode.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphMode.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphReadMode.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphReadMode.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphReadMode.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/GraphReadMode.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/HugeKeys.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/HugeKeys.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/HugeKeys.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/HugeKeys.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IdStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IdStrategy.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IdStrategy.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IdStrategy.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IndexType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IndexType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IndexType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/IndexType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/NodeRole.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/NodeRole.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/NodeRole.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/NodeRole.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SchemaStatus.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SchemaStatus.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SchemaStatus.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SchemaStatus.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SerialEnum.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SerialEnum.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SerialEnum.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/SerialEnum.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/WriteType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/WriteType.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/type/define/WriteType.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/WriteType.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Blob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Blob.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/Blob.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Blob.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/ConfigUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/ConfigUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/ConfigUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/ConfigUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/CopyUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/CopyUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/CopyUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/CopyUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Events.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Events.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/Events.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Events.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedTimerWindowRateLimiter.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedTimerWindowRateLimiter.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedTimerWindowRateLimiter.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedTimerWindowRateLimiter.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedWatchWindowRateLimiter.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedWatchWindowRateLimiter.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedWatchWindowRateLimiter.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/FixedWatchWindowRateLimiter.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/JsonUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/JsonUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/JsonUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/JsonUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/KryoUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/KryoUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/KryoUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/KryoUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/LZ4Util.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/LZ4Util.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/LZ4Util.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/LZ4Util.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/LockUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/LockUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/LockUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/LockUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/ParameterUtil.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/ParameterUtil.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/ParameterUtil.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/ParameterUtil.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/RateLimiter.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/RateLimiter.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/RateLimiter.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/RateLimiter.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/Reflection.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Reflection.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/Reflection.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/Reflection.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/CollectionFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/CollectionFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/CollectionFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/CollectionFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IdSet.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IdSet.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IdSet.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IdSet.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/Int2IntsMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/Int2IntsMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/Int2IntsMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/Int2IntsMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntIterator.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntIterator.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntIterator.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntIterator.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMap.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMap.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMap.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMap.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntSet.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntSet.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntSet.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntSet.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMapping.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMapping.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMapping.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMapping.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMappingFactory.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMappingFactory.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMappingFactory.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/ObjectIntMappingFactory.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/variables/HugeVariables.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/variables/HugeVariables.java similarity index 100% rename from hugegraph-core/src/main/java/org/apache/hugegraph/variables/HugeVariables.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/variables/HugeVariables.java diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java similarity index 96% rename from hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java index b47f944d8b..480236ffb6 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java @@ -29,7 +29,7 @@ public class CoreVersion { public static final String NAME = "hugegraph-core"; - public static final String DEFAULT_VERSION = "1.0.0"; + public static final String DEFAULT_VERSION = "1.5.0"; // The second parameter of Version.of() is for IDE running without JAR public static final Version VERSION = Version.of(CoreVersion.class, DEFAULT_VERSION); diff --git a/hugegraph-core/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin b/hugegraph-server/hugegraph-core/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin similarity index 100% rename from hugegraph-core/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin rename to hugegraph-server/hugegraph-core/src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin diff --git a/hugegraph-core/src/main/resources/hugegraph.properties b/hugegraph-server/hugegraph-core/src/main/resources/hugegraph.properties similarity index 100% rename from hugegraph-core/src/main/resources/hugegraph.properties rename to hugegraph-server/hugegraph-core/src/main/resources/hugegraph.properties diff --git a/hugegraph-core/src/main/resources/proto/raft.proto b/hugegraph-server/hugegraph-core/src/main/resources/proto/raft.proto similarity index 100% rename from hugegraph-core/src/main/resources/proto/raft.proto rename to hugegraph-server/hugegraph-core/src/main/resources/proto/raft.proto diff --git a/hugegraph-dist/README.md b/hugegraph-server/hugegraph-dist/README.md similarity index 100% rename from hugegraph-dist/README.md rename to hugegraph-server/hugegraph-dist/README.md diff --git a/hugegraph-dist/dist.sh b/hugegraph-server/hugegraph-dist/dist.sh similarity index 100% rename from hugegraph-dist/dist.sh rename to hugegraph-server/hugegraph-dist/dist.sh diff --git a/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh similarity index 100% rename from hugegraph-dist/docker/docker-entrypoint.sh rename to hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh diff --git a/hugegraph-dist/docker/example/docker-compose-cassandra.yml b/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml similarity index 100% rename from hugegraph-dist/docker/example/docker-compose-cassandra.yml rename to hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml diff --git a/hugegraph-dist/docker/scripts/detect-storage.groovy b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy similarity index 100% rename from hugegraph-dist/docker/scripts/detect-storage.groovy rename to hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy diff --git a/hugegraph-dist/docker/scripts/remote-connect.groovy b/hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy similarity index 100% rename from hugegraph-dist/docker/scripts/remote-connect.groovy rename to hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy diff --git a/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml similarity index 99% rename from hugegraph-dist/pom.xml rename to hugegraph-server/hugegraph-dist/pom.xml index 48ad2017b7..9a58ac767f 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-server/hugegraph-dist/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-dist/release-docs/LICENSE b/hugegraph-server/hugegraph-dist/release-docs/LICENSE similarity index 100% rename from hugegraph-dist/release-docs/LICENSE rename to hugegraph-server/hugegraph-dist/release-docs/LICENSE diff --git a/hugegraph-dist/release-docs/NOTICE b/hugegraph-server/hugegraph-dist/release-docs/NOTICE similarity index 100% rename from hugegraph-dist/release-docs/NOTICE rename to hugegraph-server/hugegraph-dist/release-docs/NOTICE diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-HdrHistogram.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-HdrHistogram.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-HdrHistogram.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-HdrHistogram.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-ST4.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ST4.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-ST4.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ST4.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-arthas-agent-attach.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-arthas-packaging.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-audience-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-audience-annotations.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-audience-annotations.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-audience-annotations.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent-1.11.6.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy-agent.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-byte-buddy.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-cassandra-all.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-cassandra-all.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-cassandra-all.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-cassandra-all.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-beanutils.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-beanutils.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-beanutils.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-beanutils.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-cli.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-cli.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-cli.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-cli.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-codec.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-codec.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-codec.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-codec.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-collections.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-collections.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-collections.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-collections.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-compress.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-compress.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-compress.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-compress.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration2.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration2.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration2.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-configuration2.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-io.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-io.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-io.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-io.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-lang.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang3.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang3.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-lang3.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-lang3.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-logging.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-logging.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-logging.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-logging.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-math3.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-math3.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-math3.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-math3.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-commons-text.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-text.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-commons-text.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-commons-text.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-concurrent-trees.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrent-trees.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-concurrent-trees.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrent-trees.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-disruptor.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-disruptor.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-disruptor.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-disruptor.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-error-prone.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error-prone.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-error-prone.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error-prone.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-exp4j.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-exp4j.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-exp4j.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-exp4j.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-expressions-9.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-expressions-9.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-expressions-9.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-expressions-9.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-fastutil.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-fastutil.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-fastutil.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-fastutil.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-findbugs-annotations.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-front-end.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-front-end.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-front-end.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-front-end.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-console.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-console.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-console.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-console.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-driver.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-driver.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-driver.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-driver.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-groovy.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-groovy.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-groovy.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-groovy.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-server.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-server.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-server.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-server.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-shaded.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-shaded.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-shaded.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-shaded.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-test.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-test.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-gremlin-test.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gremlin-test.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-2.5.14.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-2.5.14.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-2.5.14.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-2.5.14.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-cli-picocli.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-cli-picocli.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-cli-picocli.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-cli-picocli.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-console.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-console.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-console.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-console.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-groovysh.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-groovysh.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-groovysh.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-groovysh.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-json.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-json.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-json.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-json.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-jsr223.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-jsr223.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-jsr223.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-jsr223.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-swing.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-swing.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-swing.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-swing.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-templates.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-templates.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-templates.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-templates.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-groovy-xml.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-xml.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-groovy-xml.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-groovy-xml.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-hamcrest.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hamcrest.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-hamcrest.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hamcrest.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-hbase-shaded-endpoint.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hbase-shaded-endpoint.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-hbase-shaded-endpoint.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hbase-shaded-endpoint.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-hppc.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hppc.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-hppc.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-hppc.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-htrace-core4-4.2.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-htrace-core4-4.2.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-htrace-core4-4.2.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-htrace-core4-4.2.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-httpclient.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-httpclient.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-httpclient.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-httpclient.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-httpcore.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-httpcore.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-httpcore.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-httpcore.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer-2012_u6.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer-2012_u6.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer-2012_u6.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer-2012_u6.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-ivy.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ivy.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-ivy.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ivy.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-annotations.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-annotations.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-annotations.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-databind.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-databind.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-databind.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-databind.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-dataformat-yaml.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-datatype-jsr310.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-base.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jaxb-annotations.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-javax.json.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-javax.json.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-javax.json.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-javax.json.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-log.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-log.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jcabi-log.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-log.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-manifests.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-manifests.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jcabi-manifests.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcabi-manifests.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jcl-over-slf4j.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcl-over-slf4j.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jcl-over-slf4j.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcl-over-slf4j.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jersey-client.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jersey-client.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jersey-client.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jersey-client.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jflex.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jflex.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jflex.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jflex.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jieba-analysis.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jieba-analysis.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jieba-analysis.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jieba-analysis.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-jna.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jna.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-jna.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jna.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-json-simple.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-json-simple.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-json-simple.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-json-simple.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-json-smart.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-json-smart.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-json-smart.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-json-smart.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-admin.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-admin.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-admin.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-admin.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-client.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-client.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-client.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-client.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-common.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-common.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-common.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-common.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-crypto.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-crypto.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-crypto.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-crypto.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-identity.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-identity.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-identity.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-identity.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-server.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-server.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-server.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-server.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-simplekdc.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerb-util.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-util.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerb-util.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerb-util.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerby-asn1.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-asn1.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerby-asn1.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-asn1.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerby-config.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-config.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerby-config.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-config.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerby-pkix.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-pkix.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerby-pkix.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-pkix.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerby-util.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-util.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerby-util.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-util.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-kerby-xdr.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-xdr.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-kerby-xdr.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kerby-xdr.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-log4j-api.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-api.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-log4j-api.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-api.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-log4j-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-log4j-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-log4j-slf4j-impl.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-objenesis.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-objenesis.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-objenesis.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-objenesis.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-ohc-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ohc-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-ohc-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ohc-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-opencypher-ast-9.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-opencypher-ast-9.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-opencypher-ast-9.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-opencypher-ast-9.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-parboiled-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-scala_2.12.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-scala_2.12.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-parboiled-scala_2.12.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parboiled-scala_2.12.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-parser-9.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parser-9.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-parser-9.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-parser-9.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-postgresql.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-postgresql.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-postgresql.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-postgresql.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-rewriting-9.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-rewriting-9.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-rewriting-9.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-rewriting-9.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-rocksdbjni.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-rocksdbjni.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-rocksdbjni.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-rocksdbjni.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-sigar.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sigar.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-sigar.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sigar.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-snakeyaml.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snakeyaml.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-snakeyaml.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snakeyaml.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-snowball-stemmer.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snowball-stemmer.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-snowball-stemmer.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snowball-stemmer.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-swagger-models.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-tinkergraph-gremlin.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-tinkergraph-gremlin.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-tinkergraph-gremlin.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-tinkergraph-gremlin.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-token-provider.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-token-provider.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-token-provider.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-token-provider.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-tracer-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-tracer-core.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-tracer-core.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-tracer-core.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-util-9.0.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-util-9.0.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-util-9.0.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-util-9.0.txt diff --git a/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zt-zip.txt diff --git a/hugegraph-dist/release-docs/licenses/LINCENSE-jopt-simple.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LINCENSE-jopt-simple.txt similarity index 100% rename from hugegraph-dist/release-docs/licenses/LINCENSE-jopt-simple.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LINCENSE-jopt-simple.txt diff --git a/hugegraph-dist/scripts/apache-release.sh b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh similarity index 96% rename from hugegraph-dist/scripts/apache-release.sh rename to hugegraph-server/hugegraph-dist/scripts/apache-release.sh index 463373ccd0..a92a59b370 100755 --- a/hugegraph-dist/scripts/apache-release.sh +++ b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh @@ -41,7 +41,7 @@ rm -rf dist && mkdir -p dist/apache-${REPO} # step1: package the source code cd ../../ git archive --format=tar.gz \ - --output="hugegraph-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \ + --output="hugegraph-server/hugegraph-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 diff --git a/hugegraph-dist/scripts/dependency/check_dependencies.sh b/hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh similarity index 100% rename from hugegraph-dist/scripts/dependency/check_dependencies.sh rename to hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh diff --git a/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt similarity index 94% rename from hugegraph-dist/scripts/dependency/known-dependencies.txt rename to hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt index d40b204333..0069eea761 100644 --- a/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -1,8 +1,6 @@ -HdrHistogram-2.1.9.jar -ST4-4.0.8.jar accessors-smart-1.2.jar airline-0.8.jar -animal-sniffer-annotations-1.14.jar +animal-sniffer-annotations-1.19.jar annotations-4.1.1.4.jar ansj_seg-5.1.6.jar antlr-runtime-3.5.2.jar @@ -25,7 +23,8 @@ caffeine-2.3.1.jar caffeine-2.5.6.jar cassandra-all-4.0.10.jar cassandra-driver-core-3.6.0.jar -checker-qual-2.0.0.jar +checker-compat-qual-2.5.5.jar +checker-qual-3.12.0.jar checker-qual-3.5.0.jar chronicle-bytes-2.20.111.jar chronicle-core-2.20.126.jar @@ -55,10 +54,11 @@ cypher-gremlin-extensions-1.0.4.jar disruptor-3.3.7.jar eclipse-collections-11.1.0.jar eclipse-collections-api-11.1.0.jar -error_prone_annotations-2.1.3.jar error_prone_annotations-2.10.0.jar +error_prone_annotations-2.3.4.jar exp4j-0.4.8.jar expressions-9.0-9.0.20190305.jar +failureaccess-1.0.1.jar fastparse_2.12-2.0.4.jar fastutil-8.5.9.jar findbugs-annotations-1.3.9-1.jar @@ -88,12 +88,17 @@ grpc-api-1.47.0.jar grpc-context-1.47.0.jar grpc-core-1.47.0.jar grpc-netty-shaded-1.47.0.jar +grpc-protobuf-1.28.0.jar +grpc-protobuf-lite-1.28.0.jar gson-2.9.0.jar -guava-25.1-jre.jar +guava-27.0-jre.jar +guava-30.0-jre.jar +guava-31.0.1-android.jar hamcrest-2.2.jar hamcrest-core-1.3.jar hanlp-portable-1.8.3.jar hbase-shaded-endpoint-2.0.6.jar +HdrHistogram-2.1.9.jar hessian-3.3.6.jar high-scale-lib-1.0.6.jar hk2-api-3.0.1.jar @@ -106,7 +111,6 @@ httpclient-4.5.13.jar httpcore-4.4.13.jar ikanalyzer-2012_u6.jar ivy-2.4.0.jar -j2objc-annotations-1.1.jar j2objc-annotations-1.3.jar jackson-annotations-2.13.2.jar jackson-annotations-2.14.0-rc1.jar @@ -165,8 +169,8 @@ jersey-media-json-jackson-3.0.3.jar jersey-server-3.0.3.jar jersey-test-framework-core-3.0.3.jar jersey-test-framework-provider-grizzly2-3.0.3.jar -jffi-1.2.16-native.jar jffi-1.2.16.jar +jffi-1.2.16-native.jar jflex-1.8.2.jar jieba-analysis-1.0.2.jar jjwt-api-0.11.5.jar @@ -181,7 +185,7 @@ jraft-core-1.3.11.jar json-simple-1.1.jar json-smart-2.3.jar jsr305-3.0.1.jar -junit-4.12.jar +junit-4.13.1.jar jvm-attach-api-1.5.jar kerb-admin-2.0.0.jar kerb-client-2.0.0.jar @@ -197,6 +201,7 @@ kerby-config-2.0.0.jar kerby-pkix-2.0.0.jar kerby-util-2.0.0.jar kerby-xdr-2.0.0.jar +listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar log4j-api-2.17.1.jar log4j-core-2.17.1.jar log4j-slf4j-impl-2.17.1.jar @@ -237,11 +242,12 @@ parboiled-scala_2.12-1.2.0.jar parser-9.0-9.0.20190305.jar perfmark-api-0.25.0.jar picocli-4.3.2.jar -postgresql-42.4.1.jar +postgresql-42.4.3.jar protobuf-java-3.21.7.jar +proto-google-common-protos-1.17.0.jar psjava-0.1.19.jar -reporter-config-base-3.0.3.jar reporter-config3-3.0.3.jar +reporter-config-base-3.0.3.jar rewriting-9.0-9.0.20190305.jar rocksdbjni-7.2.2.jar scala-java8-compat_2.12-0.8.0.jar @@ -261,6 +267,7 @@ snowball-stemmer-1.3.0.581.1.jar sofa-common-tools-1.0.12.jar sofa-rpc-all-5.7.6.jar sourcecode_2.12-0.1.4.jar +ST4-4.0.8.jar stream-2.5.2.jar swagger-annotations-1.5.18.jar swagger-annotations-jakarta-2.2.18.jar diff --git a/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh b/hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh similarity index 100% rename from hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh rename to hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh diff --git a/hugegraph-dist/src/assembly/descriptor/assembly.xml b/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml similarity index 96% rename from hugegraph-dist/src/assembly/descriptor/assembly.xml rename to hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml index a5b300216b..4ae2286aa2 100644 --- a/hugegraph-dist/src/assembly/descriptor/assembly.xml +++ b/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml @@ -49,7 +49,7 @@ - ${top.level.dir}/hugegraph-dist/release-docs/ + ${top.level.dir}/hugegraph-server/hugegraph-dist/release-docs/ / diff --git a/hugegraph-dist/src/assembly/jenkins/build.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/build.sh similarity index 100% rename from hugegraph-dist/src/assembly/jenkins/build.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/build.sh diff --git a/hugegraph-dist/src/assembly/jenkins/config.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh similarity index 100% rename from hugegraph-dist/src/assembly/jenkins/config.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/config.sh diff --git a/hugegraph-dist/src/assembly/jenkins/deploy.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/deploy.sh similarity index 100% rename from hugegraph-dist/src/assembly/jenkins/deploy.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/deploy.sh diff --git a/hugegraph-dist/src/assembly/jenkins/jenkins.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh similarity index 97% rename from hugegraph-dist/src/assembly/jenkins/jenkins.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh index c177c03b73..559bf804bb 100644 --- a/hugegraph-dist/src/assembly/jenkins/jenkins.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/jenkins.sh @@ -18,7 +18,7 @@ # Backends contains [memory, rocksdb, cassandra, scylladb, mysql] export BACKEND=memory # The jenkins script store path -export SCRIPT_DIR="hugegraph-dist/src/assembly/jenkins" +export SCRIPT_DIR="hugegraph-server/hugegraph-dist/src/assembly/jenkins" # The jenkins job integrated behavior: [test, deploy, publish] export ACTION=${ACTION} diff --git a/hugegraph-dist/src/assembly/jenkins/publish.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/publish.sh similarity index 100% rename from hugegraph-dist/src/assembly/jenkins/publish.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/publish.sh diff --git a/hugegraph-dist/src/assembly/jenkins/test.sh b/hugegraph-server/hugegraph-dist/src/assembly/jenkins/test.sh similarity index 100% rename from hugegraph-dist/src/assembly/jenkins/test.sh rename to hugegraph-server/hugegraph-dist/src/assembly/jenkins/test.sh diff --git a/hugegraph-dist/src/assembly/static/bin/checksocket.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/checksocket.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/checksocket.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/checksocket.sh diff --git a/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh diff --git a/hugegraph-dist/src/assembly/static/bin/dump-conf.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/dump-conf.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/dump-conf.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/dump-conf.sh diff --git a/hugegraph-dist/src/assembly/static/bin/dump-store.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/dump-store.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/dump-store.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/dump-store.sh diff --git a/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/gremlin-console.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh diff --git a/hugegraph-dist/src/assembly/static/bin/hugegraph b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/hugegraph rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph diff --git a/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh diff --git a/hugegraph-dist/src/assembly/static/bin/hugegraph.service b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph.service similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/hugegraph.service rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph.service diff --git a/hugegraph-dist/src/assembly/static/bin/init-store.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/init-store.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh diff --git a/hugegraph-dist/src/assembly/static/bin/install.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/install.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/install.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/install.sh diff --git a/hugegraph-dist/src/assembly/static/bin/monitor-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/monitor-hugegraph.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/monitor-hugegraph.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/monitor-hugegraph.sh diff --git a/hugegraph-dist/src/assembly/static/bin/raft-tools.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/raft-tools.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh diff --git a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh diff --git a/hugegraph-dist/src/assembly/static/bin/start-monitor.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-monitor.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/start-monitor.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-monitor.sh diff --git a/hugegraph-dist/src/assembly/static/bin/stop-hugegraph.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/stop-hugegraph.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/stop-hugegraph.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/stop-hugegraph.sh diff --git a/hugegraph-dist/src/assembly/static/bin/stop-monitor.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/stop-monitor.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/stop-monitor.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/stop-monitor.sh diff --git a/hugegraph-dist/src/assembly/static/bin/util.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/util.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh diff --git a/hugegraph-dist/src/assembly/static/bin/wait-storage.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh similarity index 100% rename from hugegraph-dist/src/assembly/static/bin/wait-storage.sh rename to hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh diff --git a/hugegraph-dist/src/assembly/static/conf/computer.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/computer.yaml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/computer.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/computer.yaml diff --git a/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties diff --git a/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yaml diff --git a/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml diff --git a/hugegraph-dist/src/assembly/static/conf/log4j2.xml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/log4j2.xml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/log4j2.xml diff --git a/hugegraph-dist/src/assembly/static/conf/remote-objects.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/remote-objects.yaml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/remote-objects.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/remote-objects.yaml diff --git a/hugegraph-dist/src/assembly/static/conf/remote.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/remote.yaml similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/remote.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/remote.yaml diff --git a/hugegraph-dist/src/assembly/static/conf/rest-server.properties b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties similarity index 100% rename from hugegraph-dist/src/assembly/static/conf/rest-server.properties rename to hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties diff --git a/hugegraph-dist/src/assembly/static/ext/README.txt b/hugegraph-server/hugegraph-dist/src/assembly/static/ext/README.txt similarity index 100% rename from hugegraph-dist/src/assembly/static/ext/README.txt rename to hugegraph-server/hugegraph-dist/src/assembly/static/ext/README.txt diff --git a/hugegraph-dist/src/assembly/static/ext/plugins.txt b/hugegraph-server/hugegraph-dist/src/assembly/static/ext/plugins.txt similarity index 100% rename from hugegraph-dist/src/assembly/static/ext/plugins.txt rename to hugegraph-server/hugegraph-dist/src/assembly/static/ext/plugins.txt diff --git a/hugegraph-dist/src/assembly/static/scripts/empty-sample.groovy b/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/empty-sample.groovy similarity index 100% rename from hugegraph-dist/src/assembly/static/scripts/empty-sample.groovy rename to hugegraph-server/hugegraph-dist/src/assembly/static/scripts/empty-sample.groovy diff --git a/hugegraph-dist/src/assembly/static/scripts/example.groovy b/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy similarity index 100% rename from hugegraph-dist/src/assembly/static/scripts/example.groovy rename to hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy diff --git a/hugegraph-dist/src/assembly/travis/build-report.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/build-report.sh similarity index 97% rename from hugegraph-dist/src/assembly/travis/build-report.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/build-report.sh index 7d518334f6..5420b510fa 100755 --- a/hugegraph-dist/src/assembly/travis/build-report.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/build-report.sh @@ -27,7 +27,7 @@ if [ "$BACKEND" == "memory" ]; then OPTION_CLASS_FILES_BACKEND="" fi -cd hugegraph-test +cd hugegraph-server/hugegraph-test mvn jacoco:dump@pull-test-data -Dapp.host=localhost -Dapp.port=$JACOCO_PORT -Dskip.dump=false cd ../ diff --git a/hugegraph-dist/src/assembly/travis/conf-raft1/graphs/hugegraph.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/graphs/hugegraph.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft1/graphs/hugegraph.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/graphs/hugegraph.properties diff --git a/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml diff --git a/hugegraph-dist/src/assembly/travis/conf-raft1/rest-server.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/rest-server.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft1/rest-server.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/rest-server.properties diff --git a/hugegraph-dist/src/assembly/travis/conf-raft2/graphs/hugegraph.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/graphs/hugegraph.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft2/graphs/hugegraph.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/graphs/hugegraph.properties diff --git a/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml diff --git a/hugegraph-dist/src/assembly/travis/conf-raft2/rest-server.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/rest-server.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft2/rest-server.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/rest-server.properties diff --git a/hugegraph-dist/src/assembly/travis/conf-raft3/graphs/hugegraph.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/graphs/hugegraph.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft3/graphs/hugegraph.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/graphs/hugegraph.properties diff --git a/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml diff --git a/hugegraph-dist/src/assembly/travis/conf-raft3/rest-server.properties b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/rest-server.properties similarity index 100% rename from hugegraph-dist/src/assembly/travis/conf-raft3/rest-server.properties rename to hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/rest-server.properties diff --git a/hugegraph-dist/src/assembly/travis/hbase-site.xml b/hugegraph-server/hugegraph-dist/src/assembly/travis/hbase-site.xml similarity index 100% rename from hugegraph-dist/src/assembly/travis/hbase-site.xml rename to hugegraph-server/hugegraph-dist/src/assembly/travis/hbase-site.xml diff --git a/hugegraph-dist/src/assembly/travis/install-backend.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/install-backend.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh diff --git a/hugegraph-dist/src/assembly/travis/install-cassandra.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/install-cassandra.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh diff --git a/hugegraph-dist/src/assembly/travis/install-hbase.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/install-hbase.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh diff --git a/hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh similarity index 94% rename from hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh index ade8170d66..7239098cd7 100755 --- a/hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-mysql-via-docker.sh @@ -20,7 +20,7 @@ set -ev TRAVIS_DIR=$(dirname "$0") # Need speed up it -CONF=hugegraph-test/src/main/resources/hugegraph.properties +CONF=hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties MYSQL_USERNAME=root # Set MySQL configurations diff --git a/hugegraph-dist/src/assembly/travis/install-mysql.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-mysql.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/install-mysql.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-mysql.sh diff --git a/hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh similarity index 94% rename from hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh index d9354e470e..62d35d283a 100755 --- a/hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql-via-docker.sh @@ -18,7 +18,7 @@ set -ev TRAVIS_DIR=$(dirname "$0") -CONF=hugegraph-test/src/main/resources/hugegraph.properties +CONF=hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties POSTGRESQL_DRIVER=org.postgresql.Driver POSTGRESQL_URL=jdbc:postgresql://localhost:5432/ diff --git a/hugegraph-dist/src/assembly/travis/install-postgresql.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql.sh similarity index 94% rename from hugegraph-dist/src/assembly/travis/install-postgresql.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql.sh index 12185e8306..04562c18a8 100755 --- a/hugegraph-dist/src/assembly/travis/install-postgresql.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-postgresql.sh @@ -18,7 +18,7 @@ set -ev TRAVIS_DIR=$(dirname "$0") -CONF=hugegraph-test/src/main/resources/hugegraph.properties +CONF=hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties POSTGRESQL_DRIVER=org.postgresql.Driver POSTGRESQL_URL=jdbc:postgresql://localhost:5432/ diff --git a/hugegraph-dist/src/assembly/travis/install-scylladb.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-scylladb.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/install-scylladb.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/install-scylladb.sh diff --git a/hugegraph-dist/src/assembly/travis/maven.xml b/hugegraph-server/hugegraph-dist/src/assembly/travis/maven.xml similarity index 100% rename from hugegraph-dist/src/assembly/travis/maven.xml rename to hugegraph-server/hugegraph-dist/src/assembly/travis/maven.xml diff --git a/hugegraph-dist/src/assembly/travis/mysql.cnf b/hugegraph-server/hugegraph-dist/src/assembly/travis/mysql.cnf similarity index 100% rename from hugegraph-dist/src/assembly/travis/mysql.cnf rename to hugegraph-server/hugegraph-dist/src/assembly/travis/mysql.cnf diff --git a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh similarity index 92% rename from hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh index 1c0eaaf165..889b05e077 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh @@ -23,7 +23,7 @@ REPORT_FILE=$REPORT_DIR/jacoco-api-test.xml TRAVIS_DIR=`dirname $0` VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` -SERVER_DIR=apache-hugegraph-incubating-$VERSION +SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-$VERSION RAFT1_DIR=hugegraph-raft1 RAFT2_DIR=hugegraph-raft2 RAFT3_DIR=hugegraph-raft3 @@ -57,7 +57,7 @@ export HUGEGRAPH_PASSWORD=pa $RAFT_TOOLS --set-leader "hugegraph" "$RAFT_LEADER" # run api-test -mvn test -P api-test,$BACKEND || (cat $RAFT1_DIR/logs/hugegraph-server.log && exit 1) +mvn test -pl hugegraph-server/hugegraph-test -am -P api-test,$BACKEND || (cat $RAFT1_DIR/logs/hugegraph-server.log && exit 1) $TRAVIS_DIR/build-report.sh $BACKEND $JACOCO_PORT $REPORT_FILE diff --git a/hugegraph-dist/src/assembly/travis/run-api-test.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh similarity index 92% rename from hugegraph-dist/src/assembly/travis/run-api-test.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh index c856ac54b2..755bb4b99d 100755 --- a/hugegraph-dist/src/assembly/travis/run-api-test.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh @@ -23,7 +23,7 @@ REPORT_FILE=$REPORT_DIR/jacoco-api-test-for-raft.xml TRAVIS_DIR=$(dirname $0) VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -SERVER_DIR=apache-hugegraph-incubating-$VERSION +SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-$VERSION/ CONF=$SERVER_DIR/conf/graphs/hugegraph.properties REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml @@ -31,7 +31,6 @@ JACOCO_PORT=36320 mvn package -DskipTests -ntp - # add mysql dependency wget -P $SERVER_DIR/lib/ https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar @@ -58,7 +57,7 @@ authentication: { $TRAVIS_DIR/start-server.sh $SERVER_DIR $BACKEND $JACOCO_PORT || (cat $SERVER_DIR/logs/hugegraph-server.log && exit 1) # run api-test -mvn test -P api-test,$BACKEND || (cat $SERVER_DIR/logs/hugegraph-server.log && exit 1) +mvn test -pl hugegraph-server/hugegraph-test -am -P api-test,$BACKEND || (cat $SERVER_DIR/logs/hugegraph-server.log && exit 1) $TRAVIS_DIR/build-report.sh $BACKEND $JACOCO_PORT $REPORT_FILE diff --git a/hugegraph-dist/src/assembly/travis/run-core-test.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-core-test.sh similarity index 91% rename from hugegraph-dist/src/assembly/travis/run-core-test.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/run-core-test.sh index 6227692466..9ead2910c8 100755 --- a/hugegraph-dist/src/assembly/travis/run-core-test.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-core-test.sh @@ -19,4 +19,4 @@ set -ev BACKEND=$1 -mvn test -P core-test,$BACKEND +mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,$BACKEND diff --git a/hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh similarity index 84% rename from hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh index b7855d5ab3..e706e8b5f9 100755 --- a/hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh @@ -21,9 +21,9 @@ BACKEND=$1 SUITE=$2 if [[ "$SUITE" == "structure" || "$SUITE" == "tinkerpop" ]]; then - mvn test -P tinkerpop-structure-test,$BACKEND + mvn test -pl hugegraph-server/hugegraph-test -am -P tinkerpop-structure-test,$BACKEND fi if [[ "$SUITE" == "process" || "$SUITE" == "tinkerpop" ]]; then - mvn test -P tinkerpop-process-test,$BACKEND + mvn test -pl hugegraph-server/hugegraph-test -am -P tinkerpop-process-test,$BACKEND fi diff --git a/hugegraph-dist/src/assembly/travis/run-unit-test.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-unit-test.sh similarity index 92% rename from hugegraph-dist/src/assembly/travis/run-unit-test.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/run-unit-test.sh index 340bc6b8fe..f9d9a639be 100755 --- a/hugegraph-dist/src/assembly/travis/run-unit-test.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-unit-test.sh @@ -20,5 +20,5 @@ set -ev BACKEND=$1 if [[ "$BACKEND" == "memory" ]]; then - mvn test -P unit-test + mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test fi diff --git a/hugegraph-dist/src/assembly/travis/start-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/start-server.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh diff --git a/hugegraph-dist/src/assembly/travis/stop-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/stop-server.sh similarity index 100% rename from hugegraph-dist/src/assembly/travis/stop-server.sh rename to hugegraph-server/hugegraph-dist/src/assembly/travis/stop-server.sh diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/ConfDumper.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/ConfDumper.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/ConfDumper.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/ConfDumper.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/StoreDumper.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/StoreDumper.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/StoreDumper.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/StoreDumper.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/DistOptions.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/DistOptions.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/dist/DistOptions.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/DistOptions.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGraphServer.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGraphServer.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGraphServer.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGraphServer.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeRestServer.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeRestServer.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeRestServer.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeRestServer.java diff --git a/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java similarity index 100% rename from hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java rename to hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/RegisterUtil.java diff --git a/hugegraph-dist/src/main/resources/backend.properties b/hugegraph-server/hugegraph-dist/src/main/resources/backend.properties similarity index 100% rename from hugegraph-dist/src/main/resources/backend.properties rename to hugegraph-server/hugegraph-dist/src/main/resources/backend.properties diff --git a/hugegraph-dist/src/main/resources/log4j2.xml b/hugegraph-server/hugegraph-dist/src/main/resources/log4j2.xml similarity index 100% rename from hugegraph-dist/src/main/resources/log4j2.xml rename to hugegraph-server/hugegraph-dist/src/main/resources/log4j2.xml diff --git a/hugegraph-example/pom.xml b/hugegraph-server/hugegraph-example/pom.xml similarity index 98% rename from hugegraph-example/pom.xml rename to hugegraph-server/hugegraph-example/pom.xml index 1a96b2aa1f..3e75e2af67 100644 --- a/hugegraph-example/pom.xml +++ b/hugegraph-server/hugegraph-example/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example2.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example2.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/Example2.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example2.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example3.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example3.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/Example3.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example3.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/GraphOfTheMoviesExample.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/GraphOfTheMoviesExample.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/GraphOfTheMoviesExample.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/GraphOfTheMoviesExample.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample1.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample1.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample1.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample1.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample2.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample2.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample2.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample2.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample3.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample3.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample3.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample3.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample4.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample4.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample4.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExample4.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/TaskExample.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/TaskExample.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/TaskExample.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/TaskExample.java diff --git a/hugegraph-example/src/main/java/org/apache/hugegraph/example/ThreadRangePerfTest.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ThreadRangePerfTest.java similarity index 100% rename from hugegraph-example/src/main/java/org/apache/hugegraph/example/ThreadRangePerfTest.java rename to hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ThreadRangePerfTest.java diff --git a/hugegraph-example/src/main/resources/hugegraph.properties b/hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties similarity index 100% rename from hugegraph-example/src/main/resources/hugegraph.properties rename to hugegraph-server/hugegraph-example/src/main/resources/hugegraph.properties diff --git a/hugegraph-example/src/main/resources/log4j2.xml b/hugegraph-server/hugegraph-example/src/main/resources/log4j2.xml similarity index 100% rename from hugegraph-example/src/main/resources/log4j2.xml rename to hugegraph-server/hugegraph-example/src/main/resources/log4j2.xml diff --git a/hugegraph-hbase/pom.xml b/hugegraph-server/hugegraph-hbase/pom.xml similarity index 97% rename from hugegraph-hbase/pom.xml rename to hugegraph-server/hugegraph-hbase/pom.xml index 9c9edd3e58..d408459a2d 100644 --- a/hugegraph-hbase/pom.xml +++ b/hugegraph-server/hugegraph-hbase/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseFeatures.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseFeatures.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseFeatures.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseFeatures.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseMetrics.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseMetrics.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseMetrics.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseMetrics.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseOptions.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseOptions.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseOptions.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseOptions.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSerializer.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSerializer.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSerializer.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSerializer.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStore.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStoreProvider.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStoreProvider.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStoreProvider.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseStoreProvider.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java diff --git a/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTables.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTables.java similarity index 100% rename from hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTables.java rename to hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTables.java diff --git a/hugegraph-mysql/pom.xml b/hugegraph-server/hugegraph-mysql/pom.xml similarity index 97% rename from hugegraph-mysql/pom.xml rename to hugegraph-server/hugegraph-mysql/pom.xml index 0b2e7824e9..ddbf721703 100644 --- a/hugegraph-mysql/pom.xml +++ b/hugegraph-server/hugegraph-mysql/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlBackendEntry.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlBackendEntry.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlBackendEntry.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlBackendEntry.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlEntryIterator.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlEntryIterator.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlEntryIterator.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlEntryIterator.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlFeatures.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlFeatures.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlFeatures.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlFeatures.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlMetrics.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlMetrics.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlMetrics.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlMetrics.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSerializer.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSerializer.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSerializer.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSerializer.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStore.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStore.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStore.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStore.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStoreProvider.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStoreProvider.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStoreProvider.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlStoreProvider.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTable.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTable.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTable.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTable.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTables.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTables.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTables.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlTables.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlUtil.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlUtil.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlUtil.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlUtil.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java diff --git a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/WhereBuilder.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/WhereBuilder.java similarity index 100% rename from hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/WhereBuilder.java rename to hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/WhereBuilder.java diff --git a/hugegraph-palo/pom.xml b/hugegraph-server/hugegraph-palo/pom.xml similarity index 97% rename from hugegraph-palo/pom.xml rename to hugegraph-server/hugegraph-palo/pom.xml index cdeba95631..a1fecc482b 100644 --- a/hugegraph-palo/pom.xml +++ b/hugegraph-server/hugegraph-palo/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFeatures.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFeatures.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFeatures.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFeatures.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFile.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFile.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFile.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloFile.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloLoadInfo.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloLoadInfo.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloLoadInfo.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloLoadInfo.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloOptions.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloOptions.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloOptions.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloOptions.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSerializer.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSerializer.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSerializer.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSerializer.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSessions.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSessions.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSessions.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloSessions.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStore.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStore.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStore.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStore.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStoreProvider.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStoreProvider.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStoreProvider.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloStoreProvider.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTable.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTable.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTable.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTable.java diff --git a/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTables.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTables.java similarity index 100% rename from hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTables.java rename to hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloTables.java diff --git a/hugegraph-postgresql/pom.xml b/hugegraph-server/hugegraph-postgresql/pom.xml similarity index 95% rename from hugegraph-postgresql/pom.xml rename to hugegraph-server/hugegraph-postgresql/pom.xml index 343c226137..57c9ad840f 100644 --- a/hugegraph-postgresql/pom.xml +++ b/hugegraph-server/hugegraph-postgresql/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml @@ -42,7 +42,7 @@ org.postgresql postgresql - 42.4.1 + 42.4.3 diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlOptions.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlOptions.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlOptions.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlOptions.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSerializer.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSerializer.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSerializer.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSerializer.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSessions.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSessions.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSessions.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlSessions.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStore.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStore.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStore.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStore.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStoreProvider.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStoreProvider.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStoreProvider.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlStoreProvider.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTable.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTable.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTable.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTable.java diff --git a/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTables.java b/hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTables.java similarity index 100% rename from hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTables.java rename to hugegraph-server/hugegraph-postgresql/src/main/java/org/apache/hugegraph/backend/store/postgresql/PostgresqlTables.java diff --git a/hugegraph-rocksdb/pom.xml b/hugegraph-server/hugegraph-rocksdb/pom.xml similarity index 97% rename from hugegraph-rocksdb/pom.xml rename to hugegraph-server/hugegraph-rocksdb/pom.xml index 2c27392ba8..444e9a48a3 100644 --- a/hugegraph-rocksdb/pom.xml +++ b/hugegraph-server/hugegraph-rocksdb/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBFeatures.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBFeatures.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBFeatures.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBFeatures.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java diff --git a/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStoreProvider.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStoreProvider.java similarity index 100% rename from hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStoreProvider.java rename to hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStoreProvider.java diff --git a/hugegraph-scylladb/pom.xml b/hugegraph-server/hugegraph-scylladb/pom.xml similarity index 96% rename from hugegraph-scylladb/pom.xml rename to hugegraph-server/hugegraph-scylladb/pom.xml index e7f1f6ce21..c9676808fb 100644 --- a/hugegraph-scylladb/pom.xml +++ b/hugegraph-server/hugegraph-scylladb/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBFeatures.java b/hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBFeatures.java similarity index 100% rename from hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBFeatures.java rename to hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBFeatures.java diff --git a/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBMetrics.java b/hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBMetrics.java similarity index 100% rename from hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBMetrics.java rename to hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBMetrics.java diff --git a/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBStoreProvider.java b/hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBStoreProvider.java similarity index 100% rename from hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBStoreProvider.java rename to hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBStoreProvider.java diff --git a/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBTablesWithMV.java b/hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBTablesWithMV.java similarity index 100% rename from hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBTablesWithMV.java rename to hugegraph-server/hugegraph-scylladb/src/main/java/org/apache/hugegraph/backend/store/scylladb/ScyllaDBTablesWithMV.java diff --git a/hugegraph-test/pom.xml b/hugegraph-server/hugegraph-test/pom.xml similarity index 99% rename from hugegraph-test/pom.xml rename to hugegraph-server/hugegraph-test/pom.xml index 75e8caf664..d4ba1defd0 100644 --- a/hugegraph-test/pom.xml +++ b/hugegraph-server/hugegraph-test/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - hugegraph + hugegraph-server org.apache.hugegraph ${revision} ../pom.xml diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/CypherApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/CypherApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/CypherApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/CypherApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPITest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPITest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPITest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AdamicAdarAPITest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/AllShortestPathsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CountApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CountApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CountApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CountApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CrosspointsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/CustomizedCrosspointsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/EdgesApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/EdgesApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/EdgesApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/EdgesApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/FusiformSimilarityApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/JaccardSimilarityApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KneighborApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/KoutApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/MultiNodeShortestPathApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/NeighborRankApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PathsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PathsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PathsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PathsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/PersonalRankApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPITest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPITest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPITest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ResourceAllocationAPITest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RingsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RingsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RingsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RingsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/ShortestPathApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TemplatePathsApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TraversersApiTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TraversersApiTestSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TraversersApiTestSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/TraversersApiTestSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathApiTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathApiTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/WeightedShortestPathApiTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/AuthTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/AuthTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/AuthTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/AuthTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeLabelCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeLabelCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeLabelCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeLabelCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/IndexLabelCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/IndexLabelCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/IndexLabelCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/IndexLabelCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyKeyCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyKeyCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyKeyCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/PropertyKeyCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/RamTableTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RamTableTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/RamTableTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RamTableTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/RestoreCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RestoreCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/RestoreCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RestoreCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/SchemaCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/SchemaCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/SchemaCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/SchemaCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexLabelCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexLabelCoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexLabelCoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/VertexLabelCoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/FakeObjects.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/FakeObjects.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/testutil/FakeObjects.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/FakeObjects.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/Utils.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/Utils.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/testutil/Utils.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/testutil/Utils.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessStandardTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessStandardTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessStandardTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessStandardTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessTestGraphProvider.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessTestGraphProvider.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessTestGraphProvider.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessTestGraphProvider.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureStandardTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureStandardTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureStandardTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureStandardTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureTestGraphProvider.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureTestGraphProvider.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureTestGraphProvider.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureTestGraphProvider.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphFactory.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphFactory.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphFactory.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphFactory.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphProvider.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphProvider.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphProvider.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraphProvider.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/tests/HugeGraphWriteTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/tests/HugeGraphWriteTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/tests/HugeGraphWriteTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/tests/HugeGraphWriteTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/BaseUnitTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/BaseUnitTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/BaseUnitTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/BaseUnitTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/FakeObjects.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/FakeObjects.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/FakeObjects.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/FakeObjects.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheManagerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheManagerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheManagerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheManagerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CacheTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedGraphTransactionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedGraphTransactionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedGraphTransactionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedGraphTransactionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedSchemaTransactionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedSchemaTransactionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedSchemaTransactionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/CachedSchemaTransactionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/RamTableTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/RamTableTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/RamTableTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/RamTableTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cassandra/CassandraTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cassandra/CassandraTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/cassandra/CassandraTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/cassandra/CassandraTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/AnalyzerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/AnalyzerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/AnalyzerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/AnalyzerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendMutationTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendMutationTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendMutationTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendMutationTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendStoreInfoTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendStoreInfoTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendStoreInfoTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/BackendStoreInfoTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionQueryFlattenTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionQueryFlattenTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionQueryFlattenTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionQueryFlattenTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ConditionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DataTypeTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DataTypeTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DataTypeTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DataTypeTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DirectionsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DirectionsTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DirectionsTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/DirectionsTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ExceptionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ExceptionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ExceptionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/ExceptionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/LocksTableTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/LocksTableTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/LocksTableTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/LocksTableTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/PageStateTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/PageStateTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/PageStateTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/PageStateTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/QueryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/QueryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/QueryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/QueryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RangeTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RangeTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RangeTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RangeTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RolePermissionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RolePermissionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RolePermissionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RolePermissionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RowLockTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RowLockTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RowLockTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/RowLockTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SerialEnumTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SerialEnumTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SerialEnumTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SerialEnumTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SystemSchemaStoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SystemSchemaStoreTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SystemSchemaStoreTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SystemSchemaStoreTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/TraversalUtilTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/TraversalUtilTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/TraversalUtilTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/TraversalUtilTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/EdgeIdTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/EdgeIdTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/EdgeIdTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/EdgeIdTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdUtilTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdUtilTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdUtilTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/IdUtilTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/SplicingIdGeneratorTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/SplicingIdGeneratorTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/SplicingIdGeneratorTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/id/SplicingIdGeneratorTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/MysqlUtilTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/MysqlUtilTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/MysqlUtilTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/MysqlUtilTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/WhereBuilderTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/WhereBuilderTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/WhereBuilderTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/mysql/WhereBuilderTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BytesBufferTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BytesBufferTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BytesBufferTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BytesBufferTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/SerializerFactoryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/SerializerFactoryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/SerializerFactoryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/SerializerFactoryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/StoreSerializerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/StoreSerializerTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/StoreSerializerTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/StoreSerializerTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TableBackendEntryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TableBackendEntryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TableBackendEntryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TableBackendEntryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TextBackendEntryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TextBackendEntryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TextBackendEntryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/TextBackendEntryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/store/RamIntObjectMapTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/CompressUtilTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/CompressUtilTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/CompressUtilTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/CompressUtilTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/JsonUtilTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/JsonUtilTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/JsonUtilTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/JsonUtilTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/RateLimiterTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/RateLimiterTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/RateLimiterTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/RateLimiterTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/StringEncodingTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/StringEncodingTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/StringEncodingTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/StringEncodingTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/VersionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/VersionTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/VersionTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/VersionTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/CollectionFactoryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/CollectionFactoryTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/CollectionFactoryTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/CollectionFactoryTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/Int2IntsMapTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/Int2IntsMapTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/Int2IntsMapTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/Int2IntsMapTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntSetTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntSetTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntSetTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntSetTest.java diff --git a/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/ObjectIntMappingTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/ObjectIntMappingTest.java similarity index 100% rename from hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/ObjectIntMappingTest.java rename to hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/ObjectIntMappingTest.java diff --git a/hugegraph-test/src/main/resources/fast-methods.filter b/hugegraph-server/hugegraph-test/src/main/resources/fast-methods.filter similarity index 100% rename from hugegraph-test/src/main/resources/fast-methods.filter rename to hugegraph-server/hugegraph-test/src/main/resources/fast-methods.filter diff --git a/hugegraph-test/src/main/resources/hugegraph.properties b/hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties similarity index 100% rename from hugegraph-test/src/main/resources/hugegraph.properties rename to hugegraph-server/hugegraph-test/src/main/resources/hugegraph.properties diff --git a/hugegraph-test/src/main/resources/log4j2.xml b/hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml similarity index 100% rename from hugegraph-test/src/main/resources/log4j2.xml rename to hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml diff --git a/hugegraph-test/src/main/resources/methods.filter b/hugegraph-server/hugegraph-test/src/main/resources/methods.filter similarity index 100% rename from hugegraph-test/src/main/resources/methods.filter rename to hugegraph-server/hugegraph-test/src/main/resources/methods.filter diff --git a/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java similarity index 100% rename from hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java rename to hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java diff --git a/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/SimpleRandom.java b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/SimpleRandom.java similarity index 100% rename from hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/SimpleRandom.java rename to hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/SimpleRandom.java diff --git a/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java similarity index 100% rename from hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java rename to hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java diff --git a/hugegraph-server/pom.xml b/hugegraph-server/pom.xml new file mode 100644 index 0000000000..6ab44d9bd0 --- /dev/null +++ b/hugegraph-server/pom.xml @@ -0,0 +1,484 @@ + + + + 4.0.0 + hugegraph-server + ${revision} + pom + + ${project.artifactId} + https://github.com/apache/hugegraph/tree/master/hugegraph-server + + HugeGraph server is the graph engine layer of HugeGraph, including REST-API, OLTP engine and backends interface. + + + + org.apache.hugegraph + hugegraph + ${revision} + ../pom.xml + + + + UTF-8 + ${project.basedir}/.. + hugegraph + apache-${release.name}-incubating-${project.version} + ${top.level.dir}/${final.name}.tar.gz + 1.8 + 1.8 + 1.7.5 + 1.2.17 + 2.17.1 + 4.13.1 + 3.5.1 + 2.7 + 25.1-jre + 4.5.13 + 3.0.3 + 4.2.4 + 3.21.0-GA + bash + 3.1.2 + 8.45 + 1.0.0 + 1.47.0 + 3.21.7 + 1.36 + 3.7.1 + 2.2.18 + + + + hugegraph-core + hugegraph-api + hugegraph-example + hugegraph-dist + hugegraph-test + hugegraph-cassandra + hugegraph-scylladb + hugegraph-rocksdb + hugegraph-mysql + hugegraph-palo + hugegraph-hbase + hugegraph-postgresql + + + + + + + org.apache.hugegraph + hugegraph-rpc + ${hugegraph-commons.version} + + + org.apache.hugegraph + hugegraph-common + ${hugegraph-commons.version} + + + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + org.apache.logging.log4j + log4j-core + ${log4j2.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j2.version} + + + + + junit + junit + ${junit.version} + + + + + org.apache.tinkerpop + gremlin-core + ${tinkerpop.version} + + + org.apache.tinkerpop + gremlin-server + ${tinkerpop.version} + + + com.github.jeremyh + jBCrypt + + + + + org.apache.tinkerpop + gremlin-console + ${tinkerpop.version} + + + com.github.jeremyh + jBCrypt + + + + + org.apache.tinkerpop + gremlin-groovy + ${tinkerpop.version} + + + com.github.jeremyh + jBCrypt + + + + + org.apache.tinkerpop + tinkergraph-gremlin + ${tinkerpop.version} + + + org.apache.tinkerpop + gremlin-test + ${tinkerpop.version} + + + org.apache.tinkerpop + gremlin-groovy-test + 3.2.11 + + + org.apache.tinkerpop + gremlin-driver + ${tinkerpop.version} + + + + + commons-io + commons-io + ${commons.io.version} + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + + + + + org.glassfish.jersey.core + jersey-server + ${jersey.version} + + + org.glassfish.jersey.containers + jersey-container-grizzly2-http + ${jersey.version} + + + org.glassfish.jersey.containers + jersey-container-grizzly2-servlet + ${jersey.version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey.version} + + + org.glassfish.jersey.test-framework.providers + jersey-test-framework-provider-grizzly2 + ${jersey.version} + + + + + io.dropwizard.metrics + metrics-json + ${metrics.version} + + + io.dropwizard.metrics + metrics-jersey3 + ${metrics.version} + + + + + org.javassist + javassist + ${javassist.version} + + + + + io.grpc + grpc-netty + ${grpc.version} + provided + + + io.grpc + grpc-stub + ${grpc.version} + provided + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + org.apache.commons + commons-text + 1.10.0 + + + org.openjdk.jmh + jmh-core + ${jmh.version} + test + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + test + + + + + + + + + maven-compiler-plugin + 3.1 + + ${compiler.source} + ${compiler.target} + + 500 + + + -Xlint:unchecked + + + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${project.basedir}/ + + *.tar + *.tar.gz + .flattened-pom.xml + ${final.name}/** + + false + + + ${final.name} + + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle.plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + style/checkstyle.xml + UTF-8 + true + true + false + false + + + + validate + validate + + check + + + + + + + org.codehaus.mojo + flatten-maven-plugin + 1.2.7 + + true + resolveCiFriendliesOnly + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + + + + + + + + core-test + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + core-test + + test + + test + + + + + + + + unit-test + + + + org.apache.maven.plugins + maven-surefire-plugin + + + unit-test + + test + + test + + + + + + + + api-test + + + + org.apache.maven.plugins + maven-surefire-plugin + + + api-test + + test + + test + + + + + + + + tinkerpop-structure-test + + + + org.apache.maven.plugins + maven-surefire-plugin + + + tinkerpop-structure-test + + test + + test + + + + + + + + tinkerpop-process-test + + + + org.apache.maven.plugins + maven-surefire-plugin + + + tinkerpop-process-test + + test + + test + + + + + + + + diff --git a/hugegraph-store/README.md b/hugegraph-store/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pom.xml b/pom.xml index 270182e0fa..308d2ff754 100644 --- a/pom.xml +++ b/pom.xml @@ -23,10 +23,10 @@ ${revision} pom - hugegraph + ${project.artifactId} https://github.com/apache/hugegraph - hugegraph is a fast-speed, highly-scalable, transactional graph database developed by baidu + HugeGraph is a fast-speed and highly-scalable graph database. @@ -45,37 +45,37 @@ - - Apache Hugegraph(incubating) - dev-subscribe@hugegraph.apache.org - https://hugegraph.apache.org/ - + + Apache Hugegraph(incubating) + dev-subscribe@hugegraph.apache.org + https://hugegraph.apache.org/ + - - Development Mailing List - dev-subscribe@hugegraph.apache.org - dev-unsubscribe@hugegraph.apache.org - dev@hugegraph.incubator.apache.org - - - Commits List - commits-subscribe@hugegraph.apache.org - commits-unsubscribe@hugegraph.apache.org - commits@hugegraph.apache.org - - - Issues List - issues-subscribe@hugegraph.apache.org - issues-unsubscribe@hugegraph.apache.org - issues@hugegraph.apache.org - + + Development Mailing List + dev-subscribe@hugegraph.apache.org + dev-unsubscribe@hugegraph.apache.org + dev@hugegraph.incubator.apache.org + + + Commits List + commits-subscribe@hugegraph.apache.org + commits-unsubscribe@hugegraph.apache.org + commits@hugegraph.apache.org + + + Issues List + issues-subscribe@hugegraph.apache.org + issues-unsubscribe@hugegraph.apache.org + issues@hugegraph.apache.org + - Github Issues - https://github.com/apache/hugegraph/issues + Github Issues + https://github.com/apache/hugegraph/issues @@ -89,257 +89,16 @@ - 1.0.0 - UTF-8 - ${project.basedir}/.. - hugegraph - apache-${release.name}-incubating-${project.version} - ${top.level.dir}/${final.name}.tar.gz - 1.8 - 1.8 - 1.7.5 - 1.2.17 - 2.17.1 - 4.12 - 3.5.1 - 2.7 - 25.1-jre - 4.5.13 - 3.0.3 - 4.2.4 - 3.21.0-GA - bash - 3.1.2 - 8.45 - 1.0.0 - 1.47.0 - 3.21.7 - 1.36 - 3.7.1 - 2.2.18 + 1.5.0 - hugegraph-core - hugegraph-api - hugegraph-example - hugegraph-dist - hugegraph-test - hugegraph-cassandra - hugegraph-scylladb - hugegraph-rocksdb - hugegraph-mysql - hugegraph-palo - hugegraph-hbase - hugegraph-postgresql + hugegraph-server + + + - - - - - org.apache.hugegraph - hugegraph-rpc - ${hugegraph-commons.version} - - - org.apache.hugegraph - hugegraph-common - ${hugegraph-commons.version} - - - - - org.apache.logging.log4j - log4j-api - ${log4j2.version} - - - org.apache.logging.log4j - log4j-core - ${log4j2.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j2.version} - - - - - junit - junit - ${junit.version} - - - - - org.apache.tinkerpop - gremlin-core - ${tinkerpop.version} - - - org.apache.tinkerpop - gremlin-server - ${tinkerpop.version} - - - com.github.jeremyh - jBCrypt - - - - - org.apache.tinkerpop - gremlin-console - ${tinkerpop.version} - - - com.github.jeremyh - jBCrypt - - - - - org.apache.tinkerpop - gremlin-groovy - ${tinkerpop.version} - - - com.github.jeremyh - jBCrypt - - - - - org.apache.tinkerpop - tinkergraph-gremlin - ${tinkerpop.version} - - - org.apache.tinkerpop - gremlin-test - ${tinkerpop.version} - - - org.apache.tinkerpop - gremlin-groovy-test - 3.2.11 - - - org.apache.tinkerpop - gremlin-driver - ${tinkerpop.version} - - - - - commons-io - commons-io - ${commons.io.version} - - - com.google.guava - guava - ${guava.version} - - - org.apache.httpcomponents - httpclient - ${httpclient.version} - - - - - org.glassfish.jersey.core - jersey-server - ${jersey.version} - - - org.glassfish.jersey.containers - jersey-container-grizzly2-http - ${jersey.version} - - - org.glassfish.jersey.containers - jersey-container-grizzly2-servlet - ${jersey.version} - - - org.glassfish.jersey.media - jersey-media-json-jackson - ${jersey.version} - - - org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-grizzly2 - ${jersey.version} - - - - - io.dropwizard.metrics - metrics-json - ${metrics.version} - - - io.dropwizard.metrics - metrics-jersey3 - ${metrics.version} - - - - - org.javassist - javassist - ${javassist.version} - - - - - io.grpc - grpc-netty - ${grpc.version} - provided - - - io.grpc - grpc-protobuf - ${grpc.version} - provided - - - io.grpc - grpc-stub - ${grpc.version} - provided - - - com.google.protobuf - protobuf-java - ${protobuf.version} - - - - org.apache.commons - commons-text - 1.10.0 - - - org.openjdk.jmh - jmh-core - ${jmh.version} - test - - - org.openjdk.jmh - jmh-generator-annprocess - ${jmh.version} - test - - - - @@ -375,41 +134,6 @@ - - maven-compiler-plugin - 3.1 - - ${compiler.source} - ${compiler.target} - - 500 - - - -Xlint:unchecked - - - - - org.apache.maven.plugins - maven-clean-plugin - - - - ${project.basedir}/ - - *.tar - *.tar.gz - .flattened-pom.xml - ${final.name}/** - - false - - - ${final.name} - - - - org.apache.rat @@ -483,171 +207,9 @@ - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${checkstyle.plugin.version} - - - com.puppycrawl.tools - checkstyle - ${checkstyle.version} - - - - style/checkstyle.xml - UTF-8 - true - true - false - false - - - - validate - validate - - check - - - - - - - org.codehaus.mojo - flatten-maven-plugin - 1.2.7 - - true - resolveCiFriendliesOnly - - - - flatten - process-resources - - flatten - - - - flatten.clean - clean - - clean - - - - - - - - core-test - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - core-test - - test - - test - - - - - - - - unit-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - unit-test - - test - - test - - - - - - - - api-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - api-test - - test - - test - - - - - - - - tinkerpop-structure-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - tinkerpop-structure-test - - test - - test - - - - - - - - tinkerpop-process-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - tinkerpop-process-test - - test - - test - - - - - - apache-release From a9445ca3c31d5d8e165bbe6097388409082e543a Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 13 Nov 2023 10:50:30 +0800 Subject: [PATCH 23/51] fix(api): clean some code for release separate from slow log --- .../apache/hugegraph/api/auth/LoginAPI.java | 56 ++++++++--------- .../backend/tx/GraphTransaction.java | 6 +- .../hugegraph/structure/HugeEdgeProperty.java | 7 +-- .../optimize/HugePrimaryKeyStrategy.java | 22 ++++--- .../hugegraph/type/define/CollectionType.java | 1 + .../hugegraph/example/PerfExampleBase.java | 13 ++-- .../backend/store/mysql/ResultSetWrapper.java | 5 +- .../apache/hugegraph/api/ApiTestSuite.java | 3 +- .../apache/hugegraph/api/ArthasApiTest.java | 5 +- .../org/apache/hugegraph/api/BaseApiTest.java | 3 +- .../org/apache/hugegraph/api/EdgeApiTest.java | 24 +++---- .../hugegraph/api/EdgeLabelApiTest.java | 23 +++---- .../hugegraph/api/IndexLabelApiTest.java | 27 ++++---- .../apache/hugegraph/api/LoginApiTest.java | 33 +++++----- .../apache/hugegraph/api/MetricsApiTest.java | 39 +++++------- .../apache/hugegraph/api/ProjectApiTest.java | 63 ++++++++----------- .../hugegraph/api/PropertyKeyApiTest.java | 20 +++--- .../apache/hugegraph/api/SchemaApiTest.java | 7 ++- .../org/apache/hugegraph/api/TaskApiTest.java | 36 +++++------ .../org/apache/hugegraph/api/UserApiTest.java | 26 ++++---- .../apache/hugegraph/api/VertexApiTest.java | 19 +++--- .../hugegraph/api/VertexLabelApiTest.java | 23 +++---- .../hugegraph/api/traversers/RaysApiTest.java | 11 ++-- .../api/traversers/SameNeighborsApiTest.java | 14 ++--- .../SingleSourceShortestPathApiTest.java | 11 ++-- .../apache/hugegraph/unit/UnitTestSuite.java | 31 +++++---- 26 files changed, 247 insertions(+), 281 deletions(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java index a227fd0b50..0982e01c1e 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/auth/LoginAPI.java @@ -17,39 +17,40 @@ package org.apache.hugegraph.api.auth; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.inject.Singleton; import javax.security.sasl.AuthenticationException; -import jakarta.ws.rs.BadRequestException; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.DELETE; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.HeaderParam; -import jakarta.ws.rs.NotAuthorizedException; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; -import jakarta.ws.rs.core.HttpHeaders; import org.apache.commons.lang3.StringUtils; -import org.apache.hugegraph.core.GraphManager; -import org.apache.hugegraph.define.Checkable; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.api.API; import org.apache.hugegraph.api.filter.AuthenticationFilter; import org.apache.hugegraph.api.filter.StatusFilter.Status; import org.apache.hugegraph.auth.AuthConstant; import org.apache.hugegraph.auth.UserWithRole; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.define.Checkable; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; + import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableMap; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.BadRequestException; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.NotAuthorizedException; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; + @Path("graphs/{graph}/auth") @Singleton @Tag(name = "LoginAPI") @@ -63,8 +64,7 @@ public class LoginAPI extends API { @Status(Status.OK) @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON_WITH_CHARSET) - public String login(@Context GraphManager manager, - @PathParam("graph") String graph, + public String login(@Context GraphManager manager, @PathParam("graph") String graph, JsonLogin jsonLogin) { LOG.debug("Graph [{}] user login: {}", graph, jsonLogin); checkCreatingBody(jsonLogin); @@ -94,13 +94,10 @@ public void logout(@Context GraphManager manager, LOG.debug("Graph [{}] user logout: {}", graph, auth); if (!auth.startsWith(AuthenticationFilter.BEARER_TOKEN_PREFIX)) { - throw new BadRequestException( - "Only HTTP Bearer authentication is supported"); + throw new BadRequestException("Only HTTP Bearer authentication is supported"); } - String token = auth.substring(AuthenticationFilter.BEARER_TOKEN_PREFIX - .length()); - + String token = auth.substring(AuthenticationFilter.BEARER_TOKEN_PREFIX.length()); manager.authManager().logoutUser(token); } @@ -119,12 +116,10 @@ public String verifyToken(@Context GraphManager manager, LOG.debug("Graph [{}] get user: {}", graph, token); if (!token.startsWith(AuthenticationFilter.BEARER_TOKEN_PREFIX)) { - throw new BadRequestException( - "Only HTTP Bearer authentication is supported"); + throw new BadRequestException("Only HTTP Bearer authentication is supported"); } - token = token.substring(AuthenticationFilter.BEARER_TOKEN_PREFIX - .length()); + token = token.substring(AuthenticationFilter.BEARER_TOKEN_PREFIX.length()); UserWithRole userWithRole = manager.authManager().validateUser(token); HugeGraph g = graph(manager, graph); @@ -144,8 +139,7 @@ private static class JsonLogin implements Checkable { @Override public void checkCreate(boolean isBatch) { - E.checkArgument(!StringUtils.isEmpty(this.name), - "The name of user can't be null"); + E.checkArgument(!StringUtils.isEmpty(this.name), "The name of user can't be null"); E.checkArgument(!StringUtils.isEmpty(this.password), "The password of user can't be null"); } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java index 0574318d74..3607129a6c 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java @@ -1712,7 +1712,7 @@ private Iterator filterUnmatchedRecords( Iterator results, Query query) { // Filter unused or incorrect records - return new FilterIterator(results, elem -> { + return new FilterIterator<>(results, elem -> { // TODO: Left vertex/edge should to be auto removed via async task if (elem.schemaLabel().undefined()) { LOG.warn("Left record is found: id={}, label={}, properties={}", @@ -1861,7 +1861,7 @@ private Iterator joinTxEdges(Query query, Iterator edges, return edges; } // Filter edges that belong to deleted vertex - return new FilterIterator(edges, edge -> { + return new FilterIterator<>(edges, edge -> { for (HugeVertex v : removingVertices.values()) { if (edge.belongToVertex(v)) { return false; @@ -1917,7 +1917,7 @@ private Iterator joinTxRecords( !removedTxRecords.containsKey(id); }); - return new ExtendableIterator(txResults.iterator(), backendResults); + return new ExtendableIterator<>(txResults.iterator(), backendResults); } private void checkTxVerticesCapacity() throws LimitExceedException { diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java index 3f1f021535..787c66f448 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdgeProperty.java @@ -20,11 +20,10 @@ import org.apache.hugegraph.schema.EdgeLabel; import org.apache.hugegraph.schema.PropertyKey; import org.apache.hugegraph.type.HugeType; +import org.apache.hugegraph.util.E; import org.apache.tinkerpop.gremlin.structure.Property; import org.apache.tinkerpop.gremlin.structure.util.ElementHelper; -import org.apache.hugegraph.util.E; - public class HugeEdgeProperty extends HugeProperty { public HugeEdgeProperty(HugeElement owner, PropertyKey key, V value) { @@ -67,7 +66,7 @@ public int hashCode() { public HugeEdgeProperty switchEdgeOwner() { assert this.owner instanceof HugeEdge; - return new HugeEdgeProperty(((HugeEdge) this.owner).switchOwner(), - this.pkey, this.value); + return new HugeEdgeProperty<>(((HugeEdge) this.owner).switchOwner(), + this.pkey, this.value); } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java index e00e4caf80..d9f6654a52 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugePrimaryKeyStrategy.java @@ -17,21 +17,21 @@ package org.apache.hugegraph.traversal.optimize; +import java.util.LinkedList; +import java.util.List; + import org.apache.tinkerpop.gremlin.process.traversal.Step; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.ProviderOptimizationStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating; import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep; import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AddPropertyStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy; import org.apache.tinkerpop.gremlin.structure.T; -import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep; import org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality; -import java.util.LinkedList; -import java.util.List; - public class HugePrimaryKeyStrategy extends AbstractTraversalStrategy implements ProviderOptimizationStrategy { @@ -53,17 +53,19 @@ public void apply(Traversal.Admin traversal) { for (int i = 0, s = stepList.size(); i < s; i++) { Step step = stepList.get(i); - if (i == 0 && AddVertexStartStep.class.isInstance(step)) { + if (i == 0 && step instanceof AddVertexStartStep) { curAddStep = (Mutating) step; continue; - } else if (curAddStep == null && AddVertexStep.class.isInstance((step))) { + } else if (curAddStep == null && (step) instanceof AddVertexStep) { curAddStep = (Mutating) step; continue; } - if (curAddStep == null) continue; + if (curAddStep == null) { + continue; + } - if (!AddPropertyStep.class.isInstance(step)) { + if (!(step instanceof AddPropertyStep)) { curAddStep = null; continue; } @@ -89,8 +91,8 @@ public void apply(Traversal.Admin traversal) { curAddStep.configure(kvs); - if (kvList.size() > 0) { - curAddStep.configure(kvList.toArray(new Object[kvList.size()])); + if (!kvList.isEmpty()) { + curAddStep.configure(kvList.toArray(new Object[0])); } removeSteps.add(step); diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java index 3de1c850a6..3b011a0ba1 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/type/define/CollectionType.java @@ -41,6 +41,7 @@ public enum CollectionType implements SerialEnum { this.name = name; } + @Override public byte code() { return this.code; } diff --git a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java index dfd72a763f..629c2ed568 100644 --- a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java +++ b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java @@ -26,12 +26,6 @@ import java.util.concurrent.CyclicBarrier; import java.util.function.Consumer; -import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Transaction; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.backend.cache.Cache; import org.apache.hugegraph.backend.cache.CacheManager; @@ -45,6 +39,11 @@ import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.type.define.HugeKeys; import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Transaction; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.slf4j.Logger; public abstract class PerfExampleBase { @@ -55,7 +54,7 @@ public abstract class PerfExampleBase { protected static final Logger LOG = Log.logger(PerfExampleBase.class); protected Set vertices = Collections.newSetFromMap( - new ConcurrentHashMap()); + new ConcurrentHashMap<>()); protected boolean profile = false; public int test(String[] args) throws Exception { diff --git a/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java index eb98a1150a..6d4a2f0e49 100644 --- a/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java +++ b/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/ResultSetWrapper.java @@ -17,12 +17,12 @@ package org.apache.hugegraph.backend.store.mysql; -import org.apache.hugegraph.backend.BackendException; - import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import org.apache.hugegraph.backend.BackendException; + public class ResultSetWrapper implements AutoCloseable { private final ResultSet resultSet; @@ -37,6 +37,7 @@ public boolean next() throws SQLException { return !this.resultSet.isClosed() && this.resultSet.next(); } + @Override public void close() { try { if (this.resultSet != null) { diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java index 26e00e227a..0eed3e7049 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ApiTestSuite.java @@ -18,12 +18,11 @@ package org.apache.hugegraph.api; import org.apache.hugegraph.api.traversers.TraversersApiTestSuite; +import org.apache.hugegraph.dist.RegisterUtil; import org.junit.BeforeClass; import org.junit.runner.RunWith; import org.junit.runners.Suite; -import org.apache.hugegraph.dist.RegisterUtil; - @RunWith(Suite.class) @Suite.SuiteClasses({ PropertyKeyApiTest.class, diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java index 174b665fea..c73276b38d 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java @@ -46,8 +46,9 @@ public void testArthasApi() { " \"execTimeout\": \"10000\"\n" + "}"; RestClient arthasApiClient = new RestClient(ARTHAS_API_BASE_URL, false); - // If request header contains basic auth, and if we are not set auth when arthas attach hg, - // arthas will auth it and return 401. ref:https://arthas.aliyun.com/en/doc/auth.html#configure-username-and-password + // If the request header contains basic auth, + // and if we are not set auth when arthas attach hg, arthas will auth it and return 401. + // ref:https://arthas.aliyun.com/en/doc/auth.html#configure-username-and-password Response r = arthasApiClient.post(ARTHAS_API_PATH, body); String result = assertResponseStatus(200, r); assertJsonContains(result, "state"); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java index 24b19ba1ea..a964a7236d 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java @@ -139,8 +139,7 @@ public Response get(String path, String id) { return this.target.path(path).path(id).request().get(); } - public Response get(String path, - MultivaluedMap headers) { + public Response get(String path, MultivaluedMap headers) { return this.target.path(path).request().headers(headers).get(); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java index 98390fc0ab..b55896f564 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeApiTest.java @@ -19,17 +19,17 @@ import java.io.IOException; +import org.apache.hugegraph.testutil.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.testutil.Assert; import com.google.common.collect.ImmutableMap; import jakarta.ws.rs.core.Response; public class EdgeApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/graph/edges/"; + private static final String PATH = "/graphs/hugegraph/graph/edges/"; @Before public void prepareSchema() { @@ -54,7 +54,7 @@ public void testCreate() throws IOException { "\"date\": \"20170324\"," + "\"weight\": 0.5}" + "}", outVId, inVId); - Response r = client().post(path, edge); + Response r = client().post(PATH, edge); assertResponseStatus(201, r); } @@ -73,7 +73,7 @@ public void testBatchUpdate() throws IOException { "\"date\": \"2013-02-20\"," + "\"weight\": 1.0}" + "}", outVId, inVId); - Response r = client().post(path, edge); + Response r = client().post(PATH, edge); // The edge id is 'S1:marko>1>7JooBil0>S1:josh' String content = assertResponseStatus(201, r); String edgeId = parseId(content); @@ -101,7 +101,7 @@ public void testBatchUpdate() throws IOException { "\"check_vertex\":false," + "\"create_if_not_exist\":true" + "}", edgeId, outVId, inVId); - r = client().put(path, "batch", edge, ImmutableMap.of()); + r = client().put(PATH, "batch", edge, ImmutableMap.of()); // Now allowed to modify sortkey values, the property 'date' has changed content = assertResponseStatus(400, r); Assert.assertTrue(content.contains( @@ -130,7 +130,7 @@ public void testBatchUpdate() throws IOException { "\"check_vertex\":false," + "\"create_if_not_exist\":true" + "}", outVId, inVId); - r = client().put(path, "batch", edge, ImmutableMap.of()); + r = client().put(PATH, "batch", edge, ImmutableMap.of()); // Add a new edge when sortkey value has changed content = assertResponseStatus(200, r); String newEdgeId = parseId(content); @@ -152,11 +152,11 @@ public void testGet() throws IOException { "\"date\": \"20170324\"," + "\"weight\": 0.5}" + "}", outVId, inVId); - Response r = client().post(path, edge); + Response r = client().post(PATH, edge); String content = assertResponseStatus(201, r); String id = parseId(content); - r = client().get(path, id); + r = client().get(PATH, id); assertResponseStatus(200, r); } @@ -175,10 +175,10 @@ public void testList() throws IOException { "\"date\": \"20170324\"," + "\"weight\": 0.5}" + "}", outVId, inVId); - Response r = client().post(path, edge); + Response r = client().post(PATH, edge); assertResponseStatus(201, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -197,11 +197,11 @@ public void testDelete() throws IOException { "\"date\": \"20170324\"," + "\"weight\": 0.5}" + "}", outVId, inVId); - Response r = client().post(path, edge); + Response r = client().post(PATH, edge); String content = assertResponseStatus(201, r); String id = parseId(content); - r = client().delete(path, id); + r = client().delete(PATH, id); assertResponseStatus(204, r); } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java index b03a435086..2cd1b5ede4 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/EdgeLabelApiTest.java @@ -19,15 +19,16 @@ import java.util.Map; -import jakarta.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class EdgeLabelApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/schema/edgelabels/"; + private static final String PATH = "/graphs/hugegraph/schema/edgelabels/"; @Before public void prepareSchema() { @@ -46,7 +47,7 @@ public void testCreate() { "\"nullable_keys\":[\"city\"]," + "\"sort_keys\":[]" + "}"; - Response r = client().post(path, edgeLabel); + Response r = client().post(PATH, edgeLabel); assertResponseStatus(201, r); } @@ -61,7 +62,7 @@ public void testAppend() { "\"nullable_keys\":[\"city\"]," + "\"sort_keys\":[]" + "}"; - Response r = client().post(path, edgeLabel); + Response r = client().post(PATH, edgeLabel); assertResponseStatus(201, r); edgeLabel = "{" + @@ -74,7 +75,7 @@ public void testAppend() { "\"sort_keys\":[]" + "}"; Map params = ImmutableMap.of("action", "append"); - r = client().put(path, "created", edgeLabel, params); + r = client().put(PATH, "created", edgeLabel, params); assertResponseStatus(200, r); } @@ -89,11 +90,11 @@ public void testGet() { "\"nullable_keys\":[\"city\"]," + "\"sort_keys\":[]" + "}"; - Response r = client().post(path, edgeLabel); + Response r = client().post(PATH, edgeLabel); assertResponseStatus(201, r); String name = "created"; - r = client().get(path, name); + r = client().get(PATH, name); assertResponseStatus(200, r); } @@ -108,10 +109,10 @@ public void testList() { "\"nullable_keys\":[\"city\"]," + "\"sort_keys\":[]" + "}"; - Response r = client().post(path, edgeLabel); + Response r = client().post(PATH, edgeLabel); assertResponseStatus(201, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -126,11 +127,11 @@ public void testDelete() { "\"nullable_keys\":[\"city\"]," + "\"sort_keys\":[]" + "}"; - Response r = client().post(path, edgeLabel); + Response r = client().post(PATH, edgeLabel); assertResponseStatus(201, r); String name = "created"; - r = client().delete(path, name); + r = client().delete(PATH, name); String content = assertResponseStatus(202, r); int task = assertJsonContains(content, "task_id"); waitTaskSuccess(task); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java index 68920c177d..b3eb89eb14 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/IndexLabelApiTest.java @@ -19,15 +19,16 @@ import java.util.Map; -import jakarta.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class IndexLabelApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/schema/indexlabels/"; + private static final String PATH = "/graphs/hugegraph/schema/indexlabels/"; @Before public void prepareSchema() { @@ -45,7 +46,7 @@ public void testCreate() { "\"index_type\": \"RANGE\"," + "\"fields\":[\"age\"]" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); } @@ -59,7 +60,7 @@ public void testAppend() { "\"fields\":[\"age\"]" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); indexLabel = "{" + @@ -70,7 +71,7 @@ public void testAppend() { "}" + "}"; Map params = ImmutableMap.of("action", "append"); - r = client().put(path, "personByAge", indexLabel, params); + r = client().put(PATH, "personByAge", indexLabel, params); assertResponseStatus(200, r); } @@ -87,7 +88,7 @@ public void testEliminate() { "\"max\": 100" + "}" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); indexLabel = "{" + @@ -97,7 +98,7 @@ public void testEliminate() { "}" + "}"; Map params = ImmutableMap.of("action", "eliminate"); - r = client().put(path, "personByAge", indexLabel, params); + r = client().put(PATH, "personByAge", indexLabel, params); assertResponseStatus(200, r); } @@ -110,11 +111,11 @@ public void testGet() { "\"index_type\": \"RANGE\"," + "\"fields\":[\"age\"]" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); String name = "personByAge"; - r = client().get(path, name); + r = client().get(PATH, name); assertResponseStatus(200, r); } @@ -127,10 +128,10 @@ public void testList() { "\"index_type\": \"RANGE\"," + "\"fields\":[\"age\"]" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -143,11 +144,11 @@ public void testDelete() { "\"index_type\": \"RANGE\"," + "\"fields\":[\"age\"]" + "}"; - Response r = client().post(path, indexLabel); + Response r = client().post(PATH, indexLabel); assertResponseStatus(202, r); String name = "personByAge"; - r = client().delete(path, name); + r = client().delete(PATH, name); String content = assertResponseStatus(202, r); int task = assertJsonContains(content, "task_id"); waitTaskSuccess(task); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java index 40c83d5115..30775cb729 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/LoginApiTest.java @@ -20,18 +20,18 @@ import java.nio.file.Paths; import java.util.Map; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MultivaluedHashMap; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.util.JsonUtil; import org.apache.tinkerpop.shaded.jackson.core.type.TypeReference; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.util.JsonUtil; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; public class LoginApiTest extends BaseApiTest { @@ -42,8 +42,7 @@ public class LoginApiTest extends BaseApiTest { @Before public void setup() { Response r = this.createUser("test", "test"); - Map user = r.readEntity( - new GenericType>(){}); + Map user = r.readEntity(new GenericType>(){}); this.userId4Test = (String) user.get("id"); } @@ -115,9 +114,8 @@ public void testVerify() { assertJsonContains(result, "user_id"); assertJsonContains(result, "user_name"); - Map user = JsonUtil.fromJson( - result, - new TypeReference>(){}); + Map user = JsonUtil.fromJson(result, + new TypeReference>(){}); Assert.assertEquals(this.userId4Test, user.get("user_id")); Assert.assertEquals("test", user.get("user_name")); @@ -142,8 +140,7 @@ private Response createUser(String name, String password) { "\",\"user_email\":\"user1@baidu.com\"," + "\"user_phone\":\"123456789\",\"user_avatar\":\"image1" + ".jpg\"}"; - return this.client().post(USER_PATH, - String.format(user, name, password)); + return this.client().post(USER_PATH, String.format(user, name, password)); } private Response deleteUser(String id) { @@ -155,14 +152,12 @@ private Response login(String name, String password) { String loginUser = "{\"user_name\":\"%s\"," + "\"user_password\":\"%s\"}"; - return client().post(login, String.format(loginUser, - name, password)); + return client().post(login, String.format(loginUser, name, password)); } private String tokenFromResponse(String content) { - Map data = JsonUtil.fromJson( - content, - new TypeReference>(){}); + Map data = JsonUtil.fromJson(content, + new TypeReference>(){}); return (String) data.get("token"); } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java index cce5af30cc..86759483c2 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/MetricsApiTest.java @@ -27,14 +27,14 @@ public class MetricsApiTest extends BaseApiTest { - private static final String path = "/metrics"; - private static final String statisticsPath = path + "/statistics"; + private static final String PATH = "/metrics"; + private static final String STATISTICS_PATH = PATH + "/statistics"; @Test public void testBaseMetricsAll() { Map params = new HashMap<>(); params.put("type", "json"); - Response r = client().get(path, params); + Response r = client().get(PATH, params); String result = assertResponseStatus(200, r); assertJsonContains(result, "gauges"); assertJsonContains(result, "counters"); @@ -45,7 +45,7 @@ public void testBaseMetricsAll() { @Test public void testBaseMetricsPromAll() { - Response r = client().get(path); + Response r = client().get(PATH); assertResponseStatus(200, r); } @@ -53,19 +53,19 @@ public void testBaseMetricsPromAll() { public void testStatisticsMetricsAll() { Map params = new HashMap<>(); params.put("type", "json"); - Response r = client().get(path); + Response r = client().get(PATH); assertResponseStatus(200, r); } @Test public void testStatisticsMetricsPromAll() { - Response r = client().get(statisticsPath); + Response r = client().get(STATISTICS_PATH); assertResponseStatus(200, r); } @Test public void testMetricsSystem() { - Response r = client().get(path, "system"); + Response r = client().get(PATH, "system"); String result = assertResponseStatus(200, r); assertJsonContains(result, "basic"); assertJsonContains(result, "heap"); @@ -77,7 +77,7 @@ public void testMetricsSystem() { @Test public void testMetricsBackend() { - Response r = client().get(path, "backend"); + Response r = client().get(PATH, "backend"); String result = assertResponseStatus(200, r); Object value = assertJsonContains(result, "hugegraph"); @@ -125,10 +125,8 @@ public void testMetricsBackend() { for (Map.Entry e : servers.entrySet()) { String key = (String) e.getKey(); value = e.getValue(); - Assert.assertTrue(String.format( - "Expect map value for key %s but got %s", - key, value), - value instanceof Map); + Assert.assertTrue(String.format("Expect map value for key %s but got %s", + key, value), value instanceof Map); host = (Map) value; assertMapContains(host, "mem_max"); assertMapContains(host, "mem_committed"); @@ -188,10 +186,8 @@ public void testMetricsBackend() { for (Map.Entry e : servers.entrySet()) { String key = (String) e.getKey(); value = e.getValue(); - Assert.assertTrue(String.format( - "Expect map value for key %s but got %s", - key, value), - value instanceof Map); + Assert.assertTrue(String.format("Expect map value for key %s but got %s", + key, value), value instanceof Map); host = (Map) value; assertMapContains(host, "mem_max"); assertMapContains(host, "mem_committed"); @@ -257,10 +253,8 @@ public void testMetricsBackend() { for (Map.Entry e : servers.entrySet()) { String key = (String) e.getKey(); value = e.getValue(); - Assert.assertTrue(String.format( - "Expect map value for key %s but got %s", - key, value), - value instanceof Map); + Assert.assertTrue(String.format("Expect map value for key %s but got %s", + key, value), value instanceof Map); Map regionServer = (Map) value; assertMapContains(regionServer, "mem_max"); assertMapContains(regionServer, "mem_used"); @@ -275,8 +269,7 @@ public void testMetricsBackend() { assertMapContains(regionServer, "request_count_per_second"); assertMapContains(regionServer, "coprocessor_names"); - Map regions = assertMapContains(regionServer, - "regions"); + Map regions = assertMapContains(regionServer, "regions"); Assert.assertGte(1, regions.size()); for (Map.Entry e2 : regions.entrySet()) { Map region = (Map) e2.getValue(); @@ -307,7 +300,7 @@ public void testMetricsBackend() { } break; default: - Assert.assertTrue("Unexpected backend " + backend, false); + Assert.fail("Unexpected backend " + backend); break; } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java index 3f4239dfc6..b93b38f6b1 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ProjectApiTest.java @@ -20,17 +20,18 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.client.Entity; -import jakarta.ws.rs.core.Response; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; +import org.apache.hugegraph.util.JsonUtil; import org.junit.After; import org.junit.Assert; import org.junit.Test; -import org.apache.hugegraph.util.JsonUtil; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.Response; + public class ProjectApiTest extends BaseApiTest { private static final String PATH = "graphs/hugegraph/auth/projects"; @@ -45,11 +46,10 @@ public void teardown() throws Exception { @SuppressWarnings("unchecked") Map projectMap = ((Map) project); String projectId = (String) projectMap.get("id"); - // remove graphs from project if needed + // remove graphs from a project if needed List projectGraphs = (List) projectMap.get("project_graphs"); - if (projectGraphs != null && projectGraphs.size() > 0) { - Map graphs = ImmutableMap.of("project_graphs", - projectGraphs); + if (projectGraphs != null && !projectGraphs.isEmpty()) { + Map graphs = ImmutableMap.of("project_graphs", projectGraphs); resp = client().target() .path(PATH) .path(projectId) @@ -70,30 +70,26 @@ public void teardown() throws Exception { @Test public void testCreate() { - String project = String.format("{\"project_name\": \"test_project\"," + - "\"project_description\": " + - "\"this is a good project\"}"); + String project = "{\"project_name\": \"test_project\"," + + "\"project_description\": " + + "\"this is a good project\"}"; Response resp = client().post(PATH, project); String respBody = assertResponseStatus(201, resp); String projectName = assertJsonContains(respBody, "project_name"); Assert.assertEquals("test_project", projectName); - String projectDescription = assertJsonContains(respBody, - "project_description"); + String projectDescription = assertJsonContains(respBody, "project_description"); Assert.assertEquals("this is a good project", projectDescription); String projectTarget = assertJsonContains(respBody, "project_target"); Assert.assertFalse(StringUtils.isEmpty(projectTarget)); - String projectAdminGroup = assertJsonContains(respBody, - "project_admin_group"); + String projectAdminGroup = assertJsonContains(respBody, "project_admin_group"); Assert.assertFalse(StringUtils.isEmpty(projectAdminGroup)); - String projectOpGroup = assertJsonContains(respBody, - "project_op_group"); + String projectOpGroup = assertJsonContains(respBody, "project_op_group"); Assert.assertFalse(StringUtils.isEmpty(projectOpGroup)); } @Test public void testDelete() { - String project = this.createProject("test_project1", - "this is a good project"); + String project = this.createProject("test_project1", "this is a good project"); String projectId = assertJsonContains(project, "id"); Response resp = client().target() .path(PATH) @@ -105,8 +101,7 @@ public void testDelete() { @Test public void testGet() { - String project = this.createProject("test_project", - "this is a good project"); + String project = this.createProject("test_project", "this is a good project"); String projectId = assertJsonContains(project, "id"); String project2 = this.getProject(projectId); Assert.assertEquals(project, project2); @@ -133,17 +128,14 @@ public void testUpdate() { .put(Entity.json(project)); assertResponseStatus(400, resp); - String projectId = assertJsonContains(createProject("test_project", - "desc"), - "id"); + String projectId = assertJsonContains(createProject("test_project", "desc"), "id"); resp = client().target() .path(PATH) .path(projectId) .request() .put(Entity.json(project)); String respBody = assertResponseStatus(200, resp); - String description = assertJsonContains(respBody, - "project_description"); + String description = assertJsonContains(respBody, "project_description"); Assert.assertEquals("update desc", description); } @@ -170,8 +162,7 @@ public void testAddGraphs() { @Test public void testRemoveGraphs() { - String projectId = this.createProjectAndAddGraph("project_test", - "graph_test"); + String projectId = this.createProjectAndAddGraph("project_test", "graph_test"); String graphs = "{\"project_graphs\":[\"graph_test\"]}"; Response resp = client().target() .path(PATH) @@ -215,18 +206,16 @@ private String createProject(String name, String desc) { Assert.assertEquals(desc, description); } Assert.assertFalse(StringUtils.isEmpty( - assertJsonContains(respBody, "project_target"))); + assertJsonContains(respBody, "project_target"))); Assert.assertFalse(StringUtils.isEmpty( - assertJsonContains(respBody, "project_admin_group"))); + assertJsonContains(respBody, "project_admin_group"))); Assert.assertFalse(StringUtils.isEmpty( - assertJsonContains(respBody, "project_op_group"))); + assertJsonContains(respBody, "project_op_group"))); return respBody; } - private String createProjectAndAddGraph(String projectName, - String graph) { - String projectId = assertJsonContains(createProject(projectName, null), - "id"); + private String createProjectAndAddGraph(String projectName, String graph) { + String projectId = assertJsonContains(createProject(projectName, null), "id"); this.addGraphsToProject(projectId, graph); return projectId; } @@ -237,8 +226,7 @@ private void addGraphsToProject(String projectId, String... graphNames) { for (int i = 0; i < graphNames.length - 1; i++) { graphNamesBuilder.append(String.format("\"%s\",", graphNames[i])); } - graphNamesBuilder.append(String.format("\"%s\"", - graphNames[graphNames.length - 1])); + graphNamesBuilder.append(String.format("\"%s\"", graphNames[graphNames.length - 1])); String graphs = String.format("{\"project_graphs\":[%s]}", graphNamesBuilder); Response resp = client().target() @@ -256,7 +244,6 @@ private String getProject(String projectId) { .path(projectId) .request() .get(); - String respBody = assertResponseStatus(200, resp); - return respBody; + return assertResponseStatus(200, resp); } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java index 914c58f60a..9cb715b018 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/PropertyKeyApiTest.java @@ -17,14 +17,14 @@ package org.apache.hugegraph.api; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.testutil.Assert; import org.junit.Test; -import org.apache.hugegraph.testutil.Assert; +import jakarta.ws.rs.core.Response; public class PropertyKeyApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/schema/propertykeys/"; + private static final String PATH = "/graphs/hugegraph/schema/propertykeys/"; @Test public void testCreate() { @@ -34,7 +34,7 @@ public void testCreate() { "\"cardinality\": \"SINGLE\"," + "\"properties\":[]" + "}"; - Response r = client().post(path, propertyKey); + Response r = client().post(PATH, propertyKey); assertResponseStatus(202, r); } @@ -46,11 +46,11 @@ public void testGet() { "\"cardinality\": \"SINGLE\"," + "\"properties\":[]" + "}"; - Response r = client().post(path, propertyKey); + Response r = client().post(PATH, propertyKey); assertResponseStatus(202, r); String name = "id"; - r = client().get(path, name); + r = client().get(PATH, name); assertResponseStatus(200, r); } @@ -62,10 +62,10 @@ public void testList() { "\"cardinality\": \"SINGLE\"," + "\"properties\":[]" + "}"; - Response r = client().post(path, propertyKey); + Response r = client().post(PATH, propertyKey); assertResponseStatus(202, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -77,11 +77,11 @@ public void testDelete() { "\"cardinality\": \"SINGLE\"," + "\"properties\":[]" + "}"; - Response r = client().post(path, propertyKey); + Response r = client().post(PATH, propertyKey); assertResponseStatus(202, r); String name = "id"; - r = client().delete(path, name); + r = client().delete(PATH, name); String content = assertResponseStatus(202, r); int task = assertJsonContains(content, "task_id"); Assert.assertEquals(0, task); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java index 370facea77..7d701eed59 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/SchemaApiTest.java @@ -17,16 +17,17 @@ package org.apache.hugegraph.api; -import jakarta.ws.rs.core.Response; import org.junit.Test; +import jakarta.ws.rs.core.Response; + public class SchemaApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/schema"; + private static final String PATH = "/graphs/hugegraph/schema"; @Test public void testGet() { - Response r = client().get(path); + Response r = client().get(PATH); String content = assertResponseStatus(200, r); assertJsonContains(content, "propertykeys"); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java index 57659f6771..968a5d1c82 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/TaskApiTest.java @@ -20,16 +20,17 @@ import java.util.List; import java.util.Map; -import com.google.common.collect.ImmutableMap; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.testutil.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.testutil.Assert; +import com.google.common.collect.ImmutableMap; + +import jakarta.ws.rs.core.Response; public class TaskApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/tasks/"; + private static final String PATH = "/graphs/hugegraph/tasks/"; @Before public void prepareSchema() { @@ -43,14 +44,14 @@ public void testList() { // create a task int taskId = this.rebuild(); - Response r = client().get(path, ImmutableMap.of("limit", -1)); + Response r = client().get(PATH, ImmutableMap.of("limit", -1)); String content = assertResponseStatus(200, r); List> tasks = assertJsonContains(content, "tasks"); assertArrayContains(tasks, "id", taskId); waitTaskSuccess(taskId); - r = client().get(path, String.valueOf(taskId)); + r = client().get(PATH, String.valueOf(taskId)); content = assertResponseStatus(200, r); String status = assertJsonContains(content, "task_status"); Assert.assertEquals("success", status); @@ -62,11 +63,10 @@ public void testList() { * NOTE: seems the master node won't store task status in memory, * because only worker nodes store task status in memory. */ - r = client().get(path, ImmutableMap.of("status", "RUNNING")); + r = client().get(PATH, ImmutableMap.of("status", "RUNNING")); content = assertResponseStatus(200, r); tasks = assertJsonContains(content, "tasks"); - String message = String.format("Expect none RUNNING tasks(%d), " + - "but got %s", taskId, tasks); + String message = String.format("Expect none RUNNING tasks(%d), but got %s", taskId, tasks); Assert.assertTrue(message, tasks.isEmpty()); } @@ -75,13 +75,13 @@ public void testGet() { // create a task int taskId = this.rebuild(); - Response r = client().get(path, String.valueOf(taskId)); + Response r = client().get(PATH, String.valueOf(taskId)); String content = assertResponseStatus(200, r); assertJsonContains(content, "id"); waitTaskSuccess(taskId); - r = client().get(path, String.valueOf(taskId)); + r = client().get(PATH, String.valueOf(taskId)); content = assertResponseStatus(200, r); String status = assertJsonContains(content, "task_status"); Assert.assertEquals("success", status); @@ -96,27 +96,25 @@ public void testCancel() { // cancel task Map params = ImmutableMap.of("action", "cancel"); - Response r = client().put(path, String.valueOf(taskId), "", params); + Response r = client().put(PATH, String.valueOf(taskId), "", params); String content = r.readEntity(String.class); Assert.assertTrue(content, r.getStatus() == 202 || r.getStatus() == 400); if (r.getStatus() == 202) { String status = assertJsonContains(content, "task_status"); - Assert.assertTrue(status, status.equals("cancelling") || - status.equals("cancelled")); + Assert.assertTrue(status, "cancelling".equals(status) || "cancelled".equals(status)); /* * NOTE: should be waitTaskStatus(taskId, "cancelled"), but worker - * node may ignore the CANCELLING status due to now we can't atomic + * node may ignore the CANCELLING status due to now we can't atomically * update task status, and then the task is running to SUCCESS. */ waitTaskCompleted(taskId); } else { assert r.getStatus() == 400; - String error = String.format( - "Can't cancel task '%s' which is completed", taskId); + String error = String.format("Can't cancel task '%s' which is completed", taskId); Assert.assertContains(error, content); - r = client().get(path, String.valueOf(taskId)); + r = client().get(PATH, String.valueOf(taskId)); content = assertResponseStatus(200, r); String status = assertJsonContains(content, "task_status"); Assert.assertEquals("success", status); @@ -130,7 +128,7 @@ public void testDelete() { waitTaskSuccess(taskId); // delete task - Response r = client().delete(path, String.valueOf(taskId)); + Response r = client().delete(PATH, String.valueOf(taskId)); assertResponseStatus(204, r); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java index e2759b6368..ff457242b0 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/UserApiTest.java @@ -20,16 +20,17 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.util.JsonUtil; import org.apache.tinkerpop.shaded.jackson.core.type.TypeReference; import org.hamcrest.CoreMatchers; import org.junit.After; import org.junit.Assert; import org.junit.Test; -import org.apache.hugegraph.util.JsonUtil; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class UserApiTest extends BaseApiTest { private static final String PATH = "graphs/hugegraph/auth/users"; @@ -39,16 +40,14 @@ public class UserApiTest extends BaseApiTest { @After public void teardown() throws Exception { super.teardown(); - Response r = this.client().get(PATH, - ImmutableMap.of("limit", NO_LIMIT)); + Response r = this.client().get(PATH, ImmutableMap.of("limit", NO_LIMIT)); String result = r.readEntity(String.class); Map>> resultMap = - JsonUtil.fromJson(result, - new TypeReference>>>() {}); + JsonUtil.fromJson(result, + new TypeReference>>>() {}); List> users = resultMap.get("users"); for (Map user : users) { - if (user.get("user_name").equals("admin")) { + if ("admin".equals(user.get("user_name"))) { continue; } this.client().delete(PATH, (String) user.get("id")); @@ -124,7 +123,7 @@ public void testUpdate() { createUser("test2"); List> users = listUsers(); for (Map user : users) { - if (user.get("user_name").equals("admin")) { + if ("admin".equals(user.get("user_name"))) { continue; } String user1 = "{\"user_password\":\"p1\"," + @@ -146,7 +145,7 @@ public void testDelete() { List> users = listUsers(); for (Map user : users) { - if (user.get("user_name").equals("admin")) { + if ("admin".equals(user.get("user_name"))) { continue; } Response r = client().delete(PATH, (String) user.get("id")); @@ -169,13 +168,12 @@ protected void createUser(String name) { } protected List> listUsers() { - Response r = this.client().get(PATH, ImmutableMap.of("limit", - NO_LIMIT)); + Response r = this.client().get(PATH, ImmutableMap.of("limit", NO_LIMIT)); String result = assertResponseStatus(200, r); Map>> resultMap = - JsonUtil.fromJson(result, new TypeReference>>>() {}); + JsonUtil.fromJson(result, + new TypeReference>>>() {}); return resultMap.get("users"); } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java index a24f6cd167..aa93354fe0 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexApiTest.java @@ -19,13 +19,14 @@ import java.io.IOException; -import jakarta.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; +import jakarta.ws.rs.core.Response; + public class VertexApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/graph/vertices/"; + private static final String PATH = "/graphs/hugegraph/graph/vertices/"; @Before public void prepareSchema() { @@ -42,7 +43,7 @@ public void testCreate() { "\"city\":\"Beijing\"," + "\"age\":19}" + "}"; - Response r = client().post(path, vertex); + Response r = client().post(PATH, vertex); assertResponseStatus(201, r); } @@ -55,12 +56,12 @@ public void testGet() throws IOException { "\"city\":\"Beijing\"," + "\"age\":19}" + "}"; - Response r = client().post(path, vertex); + Response r = client().post(PATH, vertex); String content = assertResponseStatus(201, r); String id = parseId(content); id = String.format("\"%s\"", id); - r = client().get(path, id); + r = client().get(PATH, id); assertResponseStatus(200, r); } @@ -73,10 +74,10 @@ public void testList() { "\"city\":\"Beijing\"," + "\"age\":19}" + "}"; - Response r = client().post(path, vertex); + Response r = client().post(PATH, vertex); assertResponseStatus(201, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -89,12 +90,12 @@ public void testDelete() throws IOException { "\"city\":\"Beijing\"," + "\"age\":19}" + "}"; - Response r = client().post(path, vertex); + Response r = client().post(PATH, vertex); String content = assertResponseStatus(201, r); String id = parseId(content); id = String.format("\"%s\"", id); - r = client().delete(path, id); + r = client().delete(PATH, id); assertResponseStatus(204, r); } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java index 3746deaece..a0fa10d5be 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/VertexLabelApiTest.java @@ -19,15 +19,16 @@ import java.util.Map; -import jakarta.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class VertexLabelApiTest extends BaseApiTest { - private static String path = "/graphs/hugegraph/schema/vertexlabels/"; + private static final String PATH = "/graphs/hugegraph/schema/vertexlabels/"; @Before public void prepareSchema() { @@ -43,7 +44,7 @@ public void testCreate() { "\"primary_keys\":[\"name\"]," + "\"nullable_keys\":[\"city\"]" + "}"; - Response r = client().post(path, vertexLabel); + Response r = client().post(PATH, vertexLabel); assertResponseStatus(201, r); } @@ -56,7 +57,7 @@ public void testAppend() { "\"primary_keys\":[\"name\"]," + "\"nullable_keys\":[\"city\"]" + "}"; - Response r = client().post(path, vertexLabel); + Response r = client().post(PATH, vertexLabel); assertResponseStatus(201, r); vertexLabel = "{" + @@ -67,7 +68,7 @@ public void testAppend() { "\"nullable_keys\":[\"lang\"]" + "}"; Map params = ImmutableMap.of("action", "append"); - r = client().put(path, "person", vertexLabel, params); + r = client().put(PATH, "person", vertexLabel, params); assertResponseStatus(200, r); } @@ -80,11 +81,11 @@ public void testGet() { "\"primary_keys\":[\"name\"]," + "\"nullable_keys\":[\"city\"]" + "}"; - Response r = client().post(path, vertexLabel); + Response r = client().post(PATH, vertexLabel); assertResponseStatus(201, r); String name = "person"; - r = client().get(path, name); + r = client().get(PATH, name); assertResponseStatus(200, r); } @@ -97,10 +98,10 @@ public void testList() { "\"primary_keys\":[\"name\"]," + "\"nullable_keys\":[\"city\"]" + "}"; - Response r = client().post(path, vertexLabel); + Response r = client().post(PATH, vertexLabel); assertResponseStatus(201, r); - r = client().get(path); + r = client().get(PATH); assertResponseStatus(200, r); } @@ -113,11 +114,11 @@ public void testDelete() { "\"primary_keys\":[\"name\"]," + "\"nullable_keys\":[\"city\"]" + "}"; - Response r = client().post(path, vertexLabel); + Response r = client().post(PATH, vertexLabel); assertResponseStatus(201, r); String name = "person"; - r = client().delete(path, name); + r = client().delete(PATH, name); String content = assertResponseStatus(202, r); int task = assertJsonContains(content, "task_id"); waitTaskSuccess(task); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java index c0156ebad5..15c81ae67e 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/RaysApiTest.java @@ -20,14 +20,15 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class RaysApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/rays"; @@ -46,12 +47,10 @@ public void testGet() { Map name2Ids = listAllVertexName2Ids(); String markoId = name2Ids.get("marko"); String vadasId = name2Ids.get("vadas"); - Response r = client().get(PATH, ImmutableMap.of("source", - id2Json(markoId), + Response r = client().get(PATH, ImmutableMap.of("source", id2Json(markoId), "max_depth", 10)); String content = assertResponseStatus(200, r); - List>> rays = assertJsonContains(content, - "rays"); + List>> rays = assertJsonContains(content, "rays"); Assert.assertNotNull(rays); Assert.assertEquals(2, rays.size()); Object[] valuesArray = rays.get(0).values().toArray(); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java index e4b3a6bfda..7e2670f10e 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SameNeighborsApiTest.java @@ -20,14 +20,15 @@ import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class SameNeighborsApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/sameneighbors"; @@ -47,13 +48,10 @@ public void testGet() { String markoId = name2Ids.get("marko"); String joshId = name2Ids.get("josh"); String peterId = name2Ids.get("peter"); - Response r = client().get(PATH, ImmutableMap.of("vertex", - id2Json(markoId), - "other", - id2Json(joshId))); + Response r = client().get(PATH, ImmutableMap.of("vertex", id2Json(markoId), + "other", id2Json(joshId))); String content = assertResponseStatus(200, r); - List sameNeighbors = assertJsonContains(content, - "same_neighbors"); + List sameNeighbors = assertJsonContains(content, "same_neighbors"); Assert.assertFalse(sameNeighbors.isEmpty()); Assert.assertTrue(sameNeighbors.contains(peterId)); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java index 39a5474255..663dd18380 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers/SingleSourceShortestPathApiTest.java @@ -19,14 +19,15 @@ import java.util.Map; -import jakarta.ws.rs.core.Response; +import org.apache.hugegraph.api.BaseApiTest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.apache.hugegraph.api.BaseApiTest; import com.google.common.collect.ImmutableMap; +import jakarta.ws.rs.core.Response; + public class SingleSourceShortestPathApiTest extends BaseApiTest { static final String PATH = TRAVERSERS_API + "/singlesourceshortestpath"; @@ -44,10 +45,8 @@ public void prepareSchema() { public void testGet() { Map name2Ids = listAllVertexName2Ids(); String markoId = name2Ids.get("marko"); - Response r = client().get(PATH, ImmutableMap.of("source", - id2Json(markoId), - "with_vertex", - true)); + Response r = client().get(PATH, ImmutableMap.of("source", id2Json(markoId), + "with_vertex", true)); String content = assertResponseStatus(200, r); Map> paths = assertJsonContains(content, "paths"); Assert.assertEquals(4, paths.size()); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java index d72269a4f5..eb1fb6ad3b 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java @@ -17,27 +17,12 @@ package org.apache.hugegraph.unit; -import org.apache.hugegraph.unit.cassandra.CassandraTest; -import org.apache.hugegraph.unit.id.EdgeIdTest; -import org.apache.hugegraph.unit.id.IdTest; -import org.apache.hugegraph.unit.id.IdUtilTest; -import org.apache.hugegraph.unit.id.SplicingIdGeneratorTest; -import org.apache.hugegraph.unit.mysql.MysqlUtilTest; -import org.apache.hugegraph.unit.mysql.WhereBuilderTest; -import org.apache.hugegraph.unit.rocksdb.RocksDBCountersTest; -import org.apache.hugegraph.unit.rocksdb.RocksDBSessionTest; -import org.apache.hugegraph.unit.rocksdb.RocksDBSessionsTest; -import org.apache.hugegraph.unit.store.RamIntObjectMapTest; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -import org.apache.hugegraph.unit.core.SystemSchemaStoreTest; -import org.apache.hugegraph.unit.util.RateLimiterTest; import org.apache.hugegraph.unit.cache.CacheManagerTest; import org.apache.hugegraph.unit.cache.CacheTest; import org.apache.hugegraph.unit.cache.CachedGraphTransactionTest; import org.apache.hugegraph.unit.cache.CachedSchemaTransactionTest; import org.apache.hugegraph.unit.cache.RamTableTest; +import org.apache.hugegraph.unit.cassandra.CassandraTest; import org.apache.hugegraph.unit.core.AnalyzerTest; import org.apache.hugegraph.unit.core.BackendMutationTest; import org.apache.hugegraph.unit.core.BackendStoreInfoTest; @@ -54,7 +39,17 @@ import org.apache.hugegraph.unit.core.RowLockTest; import org.apache.hugegraph.unit.core.SecurityManagerTest; import org.apache.hugegraph.unit.core.SerialEnumTest; +import org.apache.hugegraph.unit.core.SystemSchemaStoreTest; import org.apache.hugegraph.unit.core.TraversalUtilTest; +import org.apache.hugegraph.unit.id.EdgeIdTest; +import org.apache.hugegraph.unit.id.IdTest; +import org.apache.hugegraph.unit.id.IdUtilTest; +import org.apache.hugegraph.unit.id.SplicingIdGeneratorTest; +import org.apache.hugegraph.unit.mysql.MysqlUtilTest; +import org.apache.hugegraph.unit.mysql.WhereBuilderTest; +import org.apache.hugegraph.unit.rocksdb.RocksDBCountersTest; +import org.apache.hugegraph.unit.rocksdb.RocksDBSessionTest; +import org.apache.hugegraph.unit.rocksdb.RocksDBSessionsTest; import org.apache.hugegraph.unit.serializer.BinaryBackendEntryTest; import org.apache.hugegraph.unit.serializer.BinaryScatterSerializerTest; import org.apache.hugegraph.unit.serializer.BinarySerializerTest; @@ -63,8 +58,10 @@ import org.apache.hugegraph.unit.serializer.StoreSerializerTest; import org.apache.hugegraph.unit.serializer.TableBackendEntryTest; import org.apache.hugegraph.unit.serializer.TextBackendEntryTest; +import org.apache.hugegraph.unit.store.RamIntObjectMapTest; import org.apache.hugegraph.unit.util.CompressUtilTest; import org.apache.hugegraph.unit.util.JsonUtilTest; +import org.apache.hugegraph.unit.util.RateLimiterTest; import org.apache.hugegraph.unit.util.StringEncodingTest; import org.apache.hugegraph.unit.util.VersionTest; import org.apache.hugegraph.unit.util.collection.CollectionFactoryTest; @@ -73,6 +70,8 @@ import org.apache.hugegraph.unit.util.collection.IntMapTest; import org.apache.hugegraph.unit.util.collection.IntSetTest; import org.apache.hugegraph.unit.util.collection.ObjectIntMappingTest; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ From a7ad7ea100f6e1a4e66259454e4f9532d859445c Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 13 Nov 2023 10:59:22 +0800 Subject: [PATCH 24/51] Update PerfExampleBase.java --- .../hugegraph/example/PerfExampleBase.java | 85 +++++++------------ 1 file changed, 30 insertions(+), 55 deletions(-) diff --git a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java index 629c2ed568..b5ec0506f4 100644 --- a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java +++ b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/PerfExampleBase.java @@ -53,8 +53,7 @@ public abstract class PerfExampleBase { protected static final Logger LOG = Log.logger(PerfExampleBase.class); - protected Set vertices = Collections.newSetFromMap( - new ConcurrentHashMap<>()); + protected Set vertices = Collections.newSetFromMap(new ConcurrentHashMap<>()); protected boolean profile = false; public int test(String[] args) throws Exception { @@ -68,8 +67,8 @@ public int test(String[] args) throws Exception { int multiple = Integer.parseInt(args[2]); this.profile = Boolean.parseBoolean(args[3]); - // NOTE: this test with HugeGraph is for local, change it into - // client if test with restful server from remote + // NOTE: this test with HugeGraph is for local, + // change it into a client if test with restful server from remote HugeGraph hugegraph = ExampleUtil.loadGraph(true, this.profile); GraphManager graph = new GraphManager(hugegraph); @@ -87,24 +86,19 @@ public int test(String[] args) throws Exception { /** * Multi-threaded and multi-commits and batch insertion test - * @param graph graph - * @param threadCount - * The count of threads that perform the insert operation at the - * same time - * @param times - * The transaction commit times for each thread - * @param multiple - * The coefficient to multiple number of vertices(100) and edges(100) - * for each transaction commit - * @throws Exception execute may throw Exception + * + * @param graph graph + * @param threadCount The count of threads that perform the insert operation at the + * same time + * @param times The transaction commit times for each thread + * @param multiple The coefficient to multiple number of vertices(100) and edges(100) + * for each transaction commit + * @throws Exception execute may throw Exception */ - public void testInsertPerf(GraphManager graph, - int threadCount, - int times, - int multiple) - throws Exception { + public void testInsertPerf(GraphManager graph, int threadCount, int times, int multiple) + throws Exception { // Total vertices/edges - long n = threadCount * times * multiple; + long n = (long) threadCount * times * multiple; long vertices = (PERSON_NUM + SOFTWARE_NUM) * n; long edges = EDGE_NUM * n; @@ -114,37 +108,29 @@ public void testInsertPerf(GraphManager graph, LOG.info("Insert rate with threads: {} vertices/s & {} edges/s, " + "insert total {} vertices & {} edges, cost time: {}ms", - vertices * 1000 / cost, edges * 1000 / cost, - vertices, edges, cost); - + vertices * 1000 / cost, edges * 1000 / cost, vertices, edges, cost); graph.clearVertexCache(); } - public void testQueryVertexPerf(GraphManager graph, - int threadCount, - int times, - int multiple) - throws Exception { + public void testQueryVertexPerf(GraphManager graph, int threadCount, int times, int multiple) + throws Exception { long cost = this.execute(graph, i -> { this.testQueryVertex(graph, threadCount, i, multiple); }, threadCount); - final long size = (PERSON_NUM + SOFTWARE_NUM) * threadCount * times; + final long size = (long) (PERSON_NUM + SOFTWARE_NUM) * threadCount * times; LOG.info("Query rate with threads: {} vertices/s, " + "query total vertices {}, cost time: {}ms", size * 1000 / cost, size, cost); } - public void testQueryEdgePerf(GraphManager graph, - int threadCount, - int times, - int multiple) - throws Exception { + public void testQueryEdgePerf(GraphManager graph, int threadCount, int times, int multiple) + throws Exception { long cost = this.execute(graph, i -> { this.testQueryEdge(graph, threadCount, i, multiple); }, threadCount); - final long size = (PERSON_NUM + SOFTWARE_NUM) * threadCount * times; + final long size = (long) (PERSON_NUM + SOFTWARE_NUM) * threadCount * times; LOG.info("Query rate with threads: {} vedges/s, " + "query total vedges {}, cost time: {}ms", size * 1000 / cost, size, cost); @@ -152,8 +138,8 @@ public void testQueryEdgePerf(GraphManager graph, protected long execute(GraphManager graph, Consumer task, int threadCount) throws Exception { - CyclicBarrier startBarrier = new CyclicBarrier(threadCount + 1); - CyclicBarrier endBarrier = new CyclicBarrier(threadCount + 1); + CyclicBarrier startBarrier = new CyclicBarrier(threadCount + 1); + CyclicBarrier endBarrier = new CyclicBarrier(threadCount + 1); List threads = new ArrayList<>(threadCount); for (int i = 0; i < threadCount; i++) { int j = i; @@ -200,14 +186,9 @@ protected long execute(GraphManager graph, Consumer task, protected abstract void initSchema(SchemaManager schema); - protected abstract void testInsert(GraphManager graph, - int times, - int multiple); + protected abstract void testInsert(GraphManager graph, int times, int multiple); - protected void testQueryVertex(GraphManager graph, - int threads, - int thread, - int multiple) { + protected void testQueryVertex(GraphManager graph, int threads, int thread, int multiple) { int i = 0; int j = 0; int total = 0; @@ -229,10 +210,7 @@ protected void testQueryVertex(GraphManager graph, LOG.debug("Query vertices with thread({}): {}", thread, total); } - protected void testQueryEdge(GraphManager graph, - int threads, - int thread, - int multiple) { + protected void testQueryEdge(GraphManager graph, int threads, int thread, int multiple) { int i = 0; int j = 0; int totalV = 0; @@ -258,9 +236,8 @@ protected void testQueryEdge(GraphManager graph, } protected static class GraphManager { - private HugeGraph hugegraph; - private Cache cache = CacheManager.instance() - .cache("perf-test"); + private final HugeGraph hugegraph; + private final Cache cache = CacheManager.instance().cache("perf-test"); public GraphManager(HugeGraph hugegraph) { this.hugegraph = hugegraph; @@ -268,13 +245,11 @@ public GraphManager(HugeGraph hugegraph) { public void initEnv() { // Cost about 6s - Whitebox.invoke(this.hugegraph.getClass(), - "graphTransaction", this.hugegraph); + Whitebox.invoke(this.hugegraph.getClass(), "graphTransaction", this.hugegraph); } public void destroyEnv() { - Whitebox.invoke(this.hugegraph.getClass(), - "closeTx", this.hugegraph); + Whitebox.invoke(this.hugegraph.getClass(), "closeTx", this.hugegraph); } public Transaction tx() { From a6e1f232c22b1628c2351366609a58a2e575041b Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 13 Nov 2023 18:03:21 +0800 Subject: [PATCH 25/51] fix(api): refactor/downgrade record logic for slow log (#2347) * fix(api): refactor/downgrade record logic for slow log add some TODOs & assign @SunnyBoy-WYH to address it * fix typo * enhance the perf --- .../hugegraph/api/filter/AccessLogFilter.java | 82 +++++++++---------- .../hugegraph/api/filter/PathFilter.java | 24 ++---- .../hugegraph/metrics/SlowQueryLog.java | 34 +++++--- 3 files changed, 71 insertions(+), 69 deletions(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java index 3b529cf0a3..0b864e4b22 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java @@ -17,7 +17,6 @@ package org.apache.hugegraph.api.filter; -import static org.apache.hugegraph.api.filter.PathFilter.REQUEST_PARAMS_JSON; import static org.apache.hugegraph.api.filter.PathFilter.REQUEST_TIME; import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_FAILED_COUNTER; import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_RESPONSE_TIME_HISTOGRAM; @@ -25,12 +24,11 @@ import static org.apache.hugegraph.metrics.MetricsUtil.METRICS_PATH_TOTAL_COUNTER; import java.io.IOException; +import java.net.URI; import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.config.ServerOptions; import org.apache.hugegraph.metrics.MetricsUtil; -import org.apache.hugegraph.metrics.SlowQueryLog; -import org.apache.hugegraph.util.JsonUtil; import org.apache.hugegraph.util.Log; import org.slf4j.Logger; @@ -42,21 +40,39 @@ import jakarta.ws.rs.core.Context; import jakarta.ws.rs.ext.Provider; - +// TODO: should add test for this class @Provider @Singleton public class AccessLogFilter implements ContainerResponseFilter { - private static final String DELIMETER = "/"; + private static final Logger LOG = Log.logger(AccessLogFilter.class); + + private static final String DELIMITER = "/"; private static final String GRAPHS = "graphs"; private static final String GREMLIN = "gremlin"; private static final String CYPHER = "cypher"; - private static final Logger LOG = Log.logger(AccessLogFilter.class); - @Context private jakarta.inject.Provider configProvider; + public static boolean needRecordLog(ContainerRequestContext context) { + // TODO: add test for 'path' result ('/gremlin' or 'gremlin') + String path = context.getUriInfo().getPath(); + + // GraphsAPI/CypherAPI/Job GremlinAPI + if (path.startsWith(GRAPHS)) { + if (HttpMethod.GET.equals(context.getMethod()) || path.endsWith(CYPHER)) { + return true; + } + } + // Direct GremlinAPI + return path.endsWith(GREMLIN); + } + + private String join(String path1, String path2) { + return String.join(DELIMITER, path1, path2); + } + /** * Use filter to log request info * @@ -64,10 +80,12 @@ public class AccessLogFilter implements ContainerResponseFilter { * @param responseContext responseContext */ @Override - public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { + public void filter(ContainerRequestContext requestContext, + ContainerResponseContext responseContext) throws IOException { // Grab corresponding request / response info from context; - String method = requestContext.getRequest().getMethod(); - String path = requestContext.getUriInfo().getPath(); + URI uri = requestContext.getUriInfo().getRequestUri(); + String path = uri.getRawPath(); + String method = requestContext.getMethod(); String metricsName = join(path, method); MetricsUtil.registerCounter(join(metricsName, METRICS_PATH_TOTAL_COUNTER)).inc(); @@ -77,48 +95,28 @@ public void filter(ContainerRequestContext requestContext, ContainerResponseCont MetricsUtil.registerCounter(join(metricsName, METRICS_PATH_FAILED_COUNTER)).inc(); } - // get responseTime Object requestTime = requestContext.getProperty(REQUEST_TIME); - if(requestTime != null){ + if (requestTime != null) { long now = System.currentTimeMillis(); long start = (Long) requestTime; - long responseTime = now - start; + long executeTime = now - start; - MetricsUtil.registerHistogram( - join(metricsName, METRICS_PATH_RESPONSE_TIME_HISTOGRAM)) - .update(responseTime); + MetricsUtil.registerHistogram(join(metricsName, METRICS_PATH_RESPONSE_TIME_HISTOGRAM)) + .update(executeTime); HugeConfig config = configProvider.get(); long timeThreshold = config.get(ServerOptions.SLOW_QUERY_LOG_TIME_THRESHOLD); - - // record slow query log - if (timeThreshold > 0 && isSlowQueryLogWhiteAPI(requestContext) && responseTime > timeThreshold) { - SlowQueryLog log = new SlowQueryLog(responseTime, start, (String) requestContext.getProperty(REQUEST_PARAMS_JSON), - method, timeThreshold, path); - LOG.info("Slow query: {}", JsonUtil.toJson(log)); + // Record slow query if meet needs, watch out the perf + if (timeThreshold > 0 && executeTime > timeThreshold && + needRecordLog(requestContext)) { + // TODO: set RequestBody null, handle it later & should record "client IP" + LOG.info("[Slow Query] execTime={}ms, body={}, method={}, path={}, query={}", + executeTime, null, method, path, uri.getQuery()); } } } - private String join(String path1, String path2) { - return String.join(DELIMETER, path1, path2); - } - - private boolean statusOk(int status){ - return status == 200 || status == 201 || status == 202; - } - - public static boolean isSlowQueryLogWhiteAPI(ContainerRequestContext context) { - String path = context.getUriInfo().getPath(); - String method = context.getRequest().getMethod(); - - // GraphsAPI/CypherAPI/Job GremlinAPI - if (path.startsWith(GRAPHS)) { - if (method.equals(HttpMethod.GET) || path.endsWith(CYPHER) || path.endsWith(GREMLIN) ){ - return true; - } - } - // Raw GremlinAPI - return path.startsWith(GREMLIN); + private boolean statusOk(int status) { + return status >= 200 && status < 300; } } diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java index e1e449ef26..e7520f84fb 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/PathFilter.java @@ -17,20 +17,12 @@ package org.apache.hugegraph.api.filter; -import static org.apache.hugegraph.api.API.CHARSET; - import java.io.IOException; -import java.io.InputStream; - -import org.apache.commons.io.Charsets; -import org.apache.commons.io.IOUtils; import jakarta.inject.Singleton; -import jakarta.ws.rs.HttpMethod; import jakarta.ws.rs.container.ContainerRequestContext; import jakarta.ws.rs.container.ContainerRequestFilter; import jakarta.ws.rs.container.PreMatching; -import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.ext.Provider; @Provider @@ -42,23 +34,25 @@ public class PathFilter implements ContainerRequestFilter { public static final String REQUEST_PARAMS_JSON = "request_params_json"; @Override - public void filter(ContainerRequestContext context) - throws IOException { + public void filter(ContainerRequestContext context) throws IOException { context.setProperty(REQUEST_TIME, System.currentTimeMillis()); - // record the request json + // TODO: temporarily comment it to fix loader bug, handle it later + /*// record the request json String method = context.getMethod(); String requestParamsJson = ""; if (method.equals(HttpMethod.POST)) { - requestParamsJson = IOUtils.toString(context.getEntityStream(), Charsets.toCharset(CHARSET)); + requestParamsJson = IOUtils.toString(context.getEntityStream(), + Charsets.toCharset(CHARSET)); // replace input stream because we have already read it InputStream in = IOUtils.toInputStream(requestParamsJson, Charsets.toCharset(CHARSET)); context.setEntityStream(in); - } else if(method.equals(HttpMethod.GET)){ - MultivaluedMap pathParameters = context.getUriInfo().getPathParameters(); + } else if (method.equals(HttpMethod.GET)) { + MultivaluedMap pathParameters = context.getUriInfo() + .getPathParameters(); requestParamsJson = pathParameters.toString(); } - context.setProperty(REQUEST_PARAMS_JSON, requestParamsJson); + context.setProperty(REQUEST_PARAMS_JSON, requestParamsJson);*/ } } diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java index cb3f1c7125..e55316c39e 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/metrics/SlowQueryLog.java @@ -16,28 +16,38 @@ */ package org.apache.hugegraph.metrics; - public class SlowQueryLog { - public Long executeTime; - - public Long startTime; - public String rawQuery; public String method; - public Long threshold; - public String path; - public SlowQueryLog(Long executeTime, Long startTime, String rawQuery, String method, Long threshold, - String path) { - this.executeTime = executeTime; - this.startTime = startTime; + public long executeTime; + + public long startTime; + + public long thresholdTime; + + public SlowQueryLog(String rawQuery, String method, String path, + long executeTime, long startTime, long thresholdTime) { this.rawQuery = rawQuery; this.method = method; - this.threshold = threshold; this.path = path; + this.executeTime = executeTime; + this.startTime = startTime; + this.thresholdTime = thresholdTime; + } + + @Override + public String toString() { + return "SlowQueryLog{executeTime=" + executeTime + + ", startTime=" + startTime + + ", rawQuery='" + rawQuery + '\'' + + ", method='" + method + '\'' + + ", threshold=" + thresholdTime + + ", path='" + path + '\'' + + '}'; } } From 25301f62288293e53c852f9c4eeb116a3a201594 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:30:24 +0800 Subject: [PATCH 26/51] feat: adapt Dockerfile for new project structure (#2344) * feat: dockerfile adapt the project structure * change the version --------- Co-authored-by: imbajin --- Dockerfile => hugegraph-server/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename Dockerfile => hugegraph-server/Dockerfile (81%) diff --git a/Dockerfile b/hugegraph-server/Dockerfile similarity index 81% rename from Dockerfile rename to hugegraph-server/Dockerfile index 7dcbf2131f..93368487a9 100644 --- a/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -26,8 +26,8 @@ RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l # 2nd stage: runtime env FROM openjdk:11-slim # TODO: get the version from the pom.xml -ENV version=1.0.0 -COPY --from=build /pkg/apache-hugegraph-incubating-$version/ /hugegraph +ENV version=1.5.0 +COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-$version/ /hugegraph-server LABEL maintainer="HugeGraph Docker Maintainers " # TODO: use g1gc or zgc as default @@ -35,7 +35,7 @@ ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:Max HUGEGRAPH_HOME="hugegraph" #COPY . /hugegraph/hugegraph-server -WORKDIR /hugegraph/ +WORKDIR /hugegraph-server/ # 1. Install environment RUN set -x \ @@ -50,17 +50,17 @@ RUN set -x \ # 2. Init HugeGraph Sever RUN set -e \ - && pwd && cd /hugegraph/ \ + && pwd && cd /hugegraph-server/ \ && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties # 3. Init docker script -COPY hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts -COPY hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts -COPY hugegraph-dist/docker/docker-entrypoint.sh . +COPY hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts +COPY hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts +COPY hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh . RUN chmod 755 ./docker-entrypoint.sh EXPOSE 8080 -VOLUME /hugegraph +VOLUME /hugegraph-server ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["./docker-entrypoint.sh"] From 12b494056329cb1d0eb0071384535e85fe291aa0 Mon Sep 17 00:00:00 2001 From: Chong Shen Date: Wed, 22 Nov 2023 09:33:04 +0800 Subject: [PATCH 27/51] fix(api): remove redirect-to-master from synchronous Gremlin (#2356) * fix: remove redirect master role to align with behaviour of VertexApi and EdgeApi * chore: add back necessary annotation --- .../main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java index 50df7e93d4..fae75ca95d 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinAPI.java @@ -52,7 +52,6 @@ public class GremlinAPI extends GremlinQueryAPI { @Compress @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON_WITH_CHARSET) - @RedirectFilter.RedirectMasterRole public Response post(@Context HugeConfig conf, @Context HttpHeaders headers, String request) { From c0ea21eed690dd2598dec2a2ee0bd14ab00b2192 Mon Sep 17 00:00:00 2001 From: imbajin Date: Fri, 24 Nov 2023 19:59:24 +0800 Subject: [PATCH 28/51] chore: disable raft test in normal PR due to timeout problem (#2349) And replace it in pd/store module --- .github/workflows/ci.yml | 6 ++++-- .../hugegraph-dist/src/assembly/static/bin/raft-tools.sh | 8 ++++---- .../src/assembly/travis/run-api-test-for-raft.sh | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 670831aa03..9451fc655a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,12 @@ jobs: BASE_BRANCH_NAME: ${{ github.base_ref }} TARGET_BRANCH_NAME: ${{ github.base_ref != '' && github.base_ref || github.ref_name }} RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') }} + RAFT_MODE: ${{ startsWith(github.head_ref, 'test') || startsWith(github.head_ref, 'raft') }} strategy: fail-fast: false matrix: - BACKEND: [ memory, cassandra, scylladb, hbase, rocksdb, mysql, postgresql ] + BACKEND: [ memory, rocksdb, hbase, cassandra, mysql, postgresql, scylladb ] JAVA_VERSION: [ '8', '11' ] steps: @@ -77,8 +78,9 @@ jobs: run: | $TRAVIS_DIR/run-api-test.sh $BACKEND $REPORT_DIR + # TODO: disable raft test in normal PR due to the always timeout problem - name: Run raft test - if: ${{ env.BACKEND == 'rocksdb' }} + if: ${{ env.RAFT_MODE == 'true' && env.BACKEND == 'rocksdb' }} run: | $TRAVIS_DIR/run-api-test-for-raft.sh $BACKEND $REPORT_DIR diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh index a5df8fb08b..329361baa2 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/raft-tools.sh @@ -18,9 +18,9 @@ export LANG=zh_CN.UTF-8 set -e -HOME_PATH=`dirname $0` -HOME_PATH=`cd ${HOME_PATH}/.. && pwd` -cd ${HOME_PATH} +HOME_PATH=$(dirname "$0") +HOME_PATH=$(cd "${HOME_PATH}"/.. && pwd) +cd "${HOME_PATH}" BIN_PATH=${HOME_PATH}/bin CONF_PATH=${HOME_PATH}/conf @@ -98,7 +98,7 @@ function remove_peer() { } if [ "${HUGEGRAPH_URL}" = "" ]; then - HUGEGRAPH_URL=`read_property ${CONF_PATH}/rest-server.properties restserver.url` + HUGEGRAPH_URL=$(read_property ${CONF_PATH}/rest-server.properties restserver.url) fi if [ "${HUGEGRAPH_GRAPH}" = "" ]; then diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh index 889b05e077..c8647d997f 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test-for-raft.sh @@ -21,8 +21,8 @@ BACKEND=$1 REPORT_DIR=$2 REPORT_FILE=$REPORT_DIR/jacoco-api-test.xml -TRAVIS_DIR=`dirname $0` -VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout` +TRAVIS_DIR=$(dirname $0) +VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) SERVER_DIR=hugegraph-server/apache-hugegraph-incubating-$VERSION RAFT1_DIR=hugegraph-raft1 RAFT2_DIR=hugegraph-raft2 From 0c014758433cd757e07bd0f3a54533d572548faa Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:01:54 +0800 Subject: [PATCH 29/51] feat(server):swagger support auth for standardAuth mode (#2360) * feat(server):swagger support auth for standardAuth mode and try to fix arthas odd test * chore(api): update api version & swagger token auth mode --- .../api/filter/AuthenticationFilter.java | 3 ++- .../hugegraph/server/ApplicationConfig.java | 16 +++++++++++++++- .../org/apache/hugegraph/version/ApiVersion.java | 4 +++- .../org/apache/hugegraph/api/ArthasApiTest.java | 7 +------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java index 464e695fef..d3da3af6d0 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AuthenticationFilter.java @@ -72,7 +72,8 @@ public class AuthenticationFilter implements ContainerRequestFilter { private static final List WHITE_API_LIST = ImmutableList.of( "auth/login", - "versions" + "versions", + "openapi.json" ); private static String whiteIpStatus; diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java index d70e6e0b29..a60510178c 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/server/ApplicationConfig.java @@ -44,8 +44,21 @@ import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.info.Contact; import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.security.SecurityScheme; import jakarta.ws.rs.ApplicationPath; +@SecurityScheme( + name = "basic", + type = SecuritySchemeType.HTTP, + scheme = "basic" +) +@SecurityScheme( + name = "bearer", + type = SecuritySchemeType.HTTP, + scheme = "bearer" +) @ApplicationPath("/") @OpenAPIDefinition( info = @Info( @@ -53,7 +66,8 @@ version = CoreVersion.DEFAULT_VERSION, description = "All management API for HugeGraph", contact = @Contact(url = "https://github.com/apache/hugegraph", name = "HugeGraph") - ) + ), + security = {@SecurityRequirement(name = "basic"), @SecurityRequirement(name = "bearer")} ) public class ApplicationConfig extends ResourceConfig { diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java index 969e9a3d6a..8170827631 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java @@ -114,12 +114,14 @@ public final class ApiVersion { * [0.67] Issue-1065: Support dynamically add/remove graph * [0.68] Issue-1763: Support adamic-adar & resource-allocation API * [0.69] Issue-1748: Support Cypher query RESTful API + * [0.70] Issue-2242: Optimising adjacency edge queries + * [0.71] PR-2286: Support Arthas API & Metric API prometheus format */ /** * The second parameter of Version.of() is for IDE running without JAR */ - public static final Version VERSION = Version.of(ApiVersion.class, "0.69"); + public static final Version VERSION = Version.of(ApiVersion.class, "0.71"); public static void check() { // Check version of hugegraph-core. Firstly do check from version 0.3 diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java index c73276b38d..52d0d7405c 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java @@ -40,10 +40,7 @@ public void testArthasStart() { public void testArthasApi() { String body = "{\n" + " \"action\": \"exec\",\n" + - " \"requestId\": \"req112\",\n" + - " \"consumerId\": \"955dbd1325334a84972b0f3ac19de4f7_2\",\n" + - " \"command\": \"version\",\n" + - " \"execTimeout\": \"10000\"\n" + + " \"command\": \"version\"\n" + "}"; RestClient arthasApiClient = new RestClient(ARTHAS_API_BASE_URL, false); // If the request header contains basic auth, @@ -52,8 +49,6 @@ public void testArthasApi() { Response r = arthasApiClient.post(ARTHAS_API_PATH, body); String result = assertResponseStatus(200, r); assertJsonContains(result, "state"); - assertJsonContains(result, "requestId"); - assertJsonContains(result, "sessionId"); assertJsonContains(result, "body"); RestClient arthasApiClientWithAuth = new RestClient(ARTHAS_API_BASE_URL); From 197e8a00ed6034c57fcf0493c43e67c861969974 Mon Sep 17 00:00:00 2001 From: lzyxx <94185075+lzyxx77@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:33:56 +0800 Subject: [PATCH 30/51] chore(ci): add stage profile settings (#2361) * Update LICENSE * Update install-cassandra.sh * add stage profile settings * Update ci.yml * Update ci.yml * Update ci.yml * Update licence-checker.yml --------- Co-authored-by: imbajin --- .github/configs/settings.xml | 58 ++++++++++++++++++++++++ .github/workflows/check-dependencies.yml | 8 ++++ .github/workflows/ci.yml | 7 +++ .github/workflows/codeql-analysis.yml | 8 ++++ .github/workflows/licence-checker.yml | 7 +-- pom.xml | 11 +++++ 6 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 .github/configs/settings.xml diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml new file mode 100644 index 0000000000..3fcc52dea3 --- /dev/null +++ b/.github/configs/settings.xml @@ -0,0 +1,58 @@ + + + + + + github + ${env.GITHUB_ACTOR} + ${env.GITHUB_TOKEN} + + + + + + local-repo + + + central + https://repo.maven.apache.org/maven2 + + true + + + false + + + + staged-releases + https://repository.apache.org/content/groups/staging/ + + + + + staged-releases + https://repository.apache.org/content/groups/staging/ + + + + + + + local-repo + + diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index fa28483a9d..119d55bb52 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -13,6 +13,7 @@ jobs: dependency-check: runs-on: ubuntu-latest env: + USE_STAGE: 'true' # Whether to include the stage repository. SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency steps: - name: Checkout source @@ -22,6 +23,13 @@ jobs: with: java-version: '11' distribution: 'adopt' + + - name: use staged maven repo settings + if: ${{ env.USE_STAGE == 'true' }} + run: | + cp $HOME/.m2/settings.xml /tmp/settings.xml + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml + - name: mvn install run: | mvn install -DskipTests=true -ntp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9451fc655a..f6d276e90a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: build: runs-on: ubuntu-20.04 env: + USE_STAGE: 'true' # Whether to include the stage repository. TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis REPORT_DIR: target/site/jacoco BACKEND: ${{ matrix.BACKEND }} @@ -66,6 +67,12 @@ jobs: java-version: ${{ matrix.JAVA_VERSION }} distribution: 'zulu' + - name: use staged maven repo settings + if: ${{ env.USE_STAGE == 'true' }} + run: | + cp $HOME/.m2/settings.xml /tmp/settings.xml + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml + - name: Run unit test run: | $TRAVIS_DIR/run-unit-test.sh $BACKEND diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a8e40be83a..958e5b1bdc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,6 +11,8 @@ on: jobs: analyze: + env: + USE_STAGE: 'true' # Whether to include the stage repository. name: Analyze runs-on: ubuntu-latest permissions: @@ -33,6 +35,12 @@ jobs: distribution: 'zulu' java-version: '11' + - name: use staged maven repo settings + if: ${{ env.USE_STAGE == 'true' }} + run: | + cp $HOME/.m2/settings.xml /tmp/settings.xml + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/licence-checker.yml b/.github/workflows/licence-checker.yml index 163e59e1de..3d14cc0620 100644 --- a/.github/workflows/licence-checker.yml +++ b/.github/workflows/licence-checker.yml @@ -11,7 +11,7 @@ jobs: check-license: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check License Header uses: apache/skywalking-eyes@main @@ -22,11 +22,6 @@ jobs: token: ${{ github.token }} config: .licenserc.yaml - - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' - - name: License check(RAT) run: | mvn apache-rat:check -ntp diff --git a/pom.xml b/pom.xml index 308d2ff754..f5e44e42dd 100644 --- a/pom.xml +++ b/pom.xml @@ -269,5 +269,16 @@ + + + + stage + + + staged-releases + https://repository.apache.org/content/groups/staging/ + + + From d376b02dc552dfbfcc32937aef684436196bc511 Mon Sep 17 00:00:00 2001 From: haohao0103 <956322745@qq.com> Date: Wed, 29 Nov 2023 19:11:28 +0800 Subject: [PATCH 31/51] fix HBase PrefixFilter bug (#2364) * #2177 * #2177 * #2177 * #2177 * #2177 * #2177 --- .../hugegraph/backend/store/hbase/HbaseSessions.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java index 06cbf9ab73..6f0bf3714a 100644 --- a/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java +++ b/hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java @@ -415,11 +415,18 @@ default R scan(String table, Set prefixes) { /** * Scan records by rowkey start and prefix from a table + * TODO: setRowPrefixFilter deprecated since HBase 2.5.0, will be removed in 4.0.0, + * use setStartStopRowForPrefixScan(byte[]) instead. */ default R scan(String table, byte[] startRow, boolean inclusiveStart, byte[] prefix) { - Scan scan = new Scan().withStartRow(startRow, inclusiveStart) - .setFilter(new PrefixFilter(prefix)); + final Scan scan = new Scan(); + if(startRow == prefix) { + scan.setRowPrefixFilter(prefix); + } else { + scan.withStartRow(startRow, inclusiveStart) + .setFilter(new PrefixFilter(prefix)); + } return this.scan(table, scan); } From ed493f3093eab293a75cd2f539e29ca11fa6cd81 Mon Sep 17 00:00:00 2001 From: M <87920097+msgui@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:44:29 +0800 Subject: [PATCH 32/51] feat: optimize perf for adjacency-edges query (#2242) --- hugegraph-server/hugegraph-api/pom.xml | 2 +- .../api/traversers/EdgeExistenceAPI.java | 84 +++++++++++++++++++ .../apache/hugegraph/version/ApiVersion.java | 13 +-- .../algorithm/EdgeExistenceTraverser.java | 66 +++++++++++++++ 4 files changed, 158 insertions(+), 7 deletions(-) create mode 100644 hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java create mode 100644 hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java diff --git a/hugegraph-server/hugegraph-api/pom.xml b/hugegraph-server/hugegraph-api/pom.xml index d365ce22f8..459a22e0ea 100644 --- a/hugegraph-server/hugegraph-api/pom.xml +++ b/hugegraph-server/hugegraph-api/pom.xml @@ -188,7 +188,7 @@ - 0.69.0.0 + 0.71.0.0 diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java new file mode 100644 index 0000000000..6ffec166e1 --- /dev/null +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.traversers; + +import static org.apache.hugegraph.traversal.algorithm.HugeTraverser.DEFAULT_LIMIT; + +import java.util.Iterator; + +import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.core.GraphManager; +import org.apache.hugegraph.structure.HugeVertex; +import org.apache.hugegraph.traversal.algorithm.EdgeExistenceTraverser; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.slf4j.Logger; + +import com.codahale.metrics.annotation.Timed; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.inject.Singleton; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; + +@Path("graphs/{graph}/traversers/edgeexist") +@Singleton +@Tag(name = "EdgeExistenceAPI") +public class EdgeExistenceAPI extends TraverserAPI { + + private static final Logger LOG = Log.logger(EdgeExistenceAPI.class); + private static final String DEFAULT_EMPTY = ""; + + @GET + @Timed + @Produces(APPLICATION_JSON_WITH_CHARSET) + @Operation(summary = "get edges from 'source' to 'target' vertex") + public String get(@Context GraphManager manager, + @PathParam("graph") String graph, + @QueryParam("source") String source, + @QueryParam("target") String target, + @QueryParam("label") String edgeLabel, + @QueryParam("sort_values") + @DefaultValue(DEFAULT_EMPTY) String sortValues, + @QueryParam("limit") + @DefaultValue(DEFAULT_LIMIT) long limit) { + LOG.debug("Graph [{}] get edgeExistence with " + + "source '{}', target '{}', edgeLabel '{}', sortValue '{}', limit '{}'", + graph, source, target, edgeLabel, sortValues, limit); + + E.checkArgumentNotNull(source, "The source can't be null"); + E.checkArgumentNotNull(target, "The target can't be null"); + + Id sourceId = HugeVertex.getIdValue(source); + Id targetId = HugeVertex.getIdValue(target); + HugeGraph hugegraph = graph(manager, graph); + EdgeExistenceTraverser traverser = new EdgeExistenceTraverser(hugegraph); + Iterator edges = traverser.queryEdgeExistence(sourceId, targetId, edgeLabel, + sortValues, limit); + + return manager.serializer(hugegraph).writeEdges(edges, false); + } +} diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java index 8170827631..a6b7f7c241 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java @@ -29,7 +29,7 @@ public final class ApiVersion { * [0.2] HugeGraph-527: First add the version to the hugegraph module * [0.3] HugeGraph-525: Add versions check of components and api * [0.4] HugeGraph-162: Add schema builder to separate client and inner interface. - * [0.5] HugeGraph-498: Support three kind of id strategy + * [0.5] HugeGraph-498: Support three kinds of id strategy *

* version 0.3: *

@@ -41,12 +41,12 @@ public final class ApiVersion { *

* version 0.4: * [0.11] HugeGraph-938: Remove useless index-names field in VL/EL API - * [0.12] HugeGraph-589: Add schema id for all schema element + * [0.12] HugeGraph-589: Add schema id for all schema elements * [0.13] HugeGraph-956: Support customize string/number id strategy *

* version 0.5: * [0.14] HugeGraph-1085: Add enable_label_index to VL/EL - * [0.15] HugeGraph-1105: Support paging for large amounts of records + * [0.15] HugeGraph-1105: Support paging for large numbers of records * [0.16] HugeGraph-944: Support rest shortest path, k-out, k-neighbor * [0.17] HugeGraph-944: Support rest shortest path, k-out, k-neighbor * [0.18] HugeGraph-81: Change argument "checkVertex" to "check_vertex" @@ -75,7 +75,7 @@ public final class ApiVersion { * [0.34] Issue-307: Let VertexAPI use simplified property serializer * [0.35] Issue-287: Support pagination when do index query * [0.36] Issue-360: Support paging for scan api - * [0.37] Issue-391: Add skip_super_node for shortest path + * [0.37] Issue-391: Add skip_super_node for the shortest path * [0.38] Issue-274: Add personal-rank and neighbor-rank RESTful API *

* version 0.10: @@ -114,17 +114,18 @@ public final class ApiVersion { * [0.67] Issue-1065: Support dynamically add/remove graph * [0.68] Issue-1763: Support adamic-adar & resource-allocation API * [0.69] Issue-1748: Support Cypher query RESTful API - * [0.70] Issue-2242: Optimising adjacency edge queries + * [0.70] PR-2242: Add edge-existence RESTful API * [0.71] PR-2286: Support Arthas API & Metric API prometheus format */ /** * The second parameter of Version.of() is for IDE running without JAR + * Note: Also update the version number in hugegraph-api/pom.xml */ public static final Version VERSION = Version.of(ApiVersion.class, "0.71"); public static void check() { - // Check version of hugegraph-core. Firstly do check from version 0.3 + // Check the version of hugegraph-core. Do first check from version 0.3 VersionUtil.check(CoreVersion.VERSION, "1.0", "1.6", CoreVersion.NAME); } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java new file mode 100644 index 0000000000..a7005ad867 --- /dev/null +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.traversal.algorithm; + +import java.util.Iterator; + +import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.backend.query.ConditionQuery; +import org.apache.hugegraph.iterator.FilterIterator; +import org.apache.hugegraph.schema.EdgeLabel; +import org.apache.hugegraph.type.HugeType; +import org.apache.hugegraph.type.define.Directions; +import org.apache.hugegraph.type.define.HugeKeys; +import org.apache.tinkerpop.gremlin.structure.Edge; + +public class EdgeExistenceTraverser extends HugeTraverser { + + public EdgeExistenceTraverser(HugeGraph graph) { + super(graph); + } + + public Iterator queryEdgeExistence(Id sourceId, Id targetId, String label, + String sortValues, long limit) { + // If no label provided, fallback to a slow query by filtering + if (label == null || label.isEmpty()) { + return queryByNeighbors(sourceId, targetId, limit); + } + + Id edgeLabelId = getEdgeLabelId(label); + EdgeLabel edgeLabel = graph().edgeLabel(edgeLabelId); + ConditionQuery conditionQuery = new ConditionQuery(HugeType.EDGE); + conditionQuery.eq(HugeKeys.OWNER_VERTEX, sourceId); + conditionQuery.eq(HugeKeys.OTHER_VERTEX, targetId); + conditionQuery.eq(HugeKeys.LABEL, edgeLabelId); + conditionQuery.eq(HugeKeys.DIRECTION, Directions.OUT); + conditionQuery.limit(limit); + + if (edgeLabel.existSortKeys()) { + conditionQuery.eq(HugeKeys.SORT_VALUES, sortValues); + } else { + conditionQuery.eq(HugeKeys.SORT_VALUES, ""); + } + return graph().edges(conditionQuery); + } + + private Iterator queryByNeighbors(Id sourceId, Id targetId, long limit) { + return new FilterIterator<>(edgesOfVertex(sourceId, Directions.OUT, (Id) null, limit), + edge -> targetId.equals(edge.inVertex().id())); + } +} From 20d1e5228e39bd974079891fc713574fb14798c5 Mon Sep 17 00:00:00 2001 From: Jermy Li Date: Mon, 4 Dec 2023 12:43:32 +0800 Subject: [PATCH 33/51] chore: move server info into GlobalMasterInfo (#2370) * chore: move server info into GlobalMasterInfo Change-Id: Id854892333115fd45d7c8b9799d255627541b2ad * fix testClearAndInit() and export GlobalMasterInfo Change-Id: Ic2878c5359e7f55fcd11986aa0bf79241c7ee9ab * enhence ServerInfoManager.heartbeat() Change-Id: I6932893c4be8331547f3b721083ca00430f85e58 * move RoleElectionStateMachineTest to UnitTestSuite Change-Id: I7b3e8e2867dcf1063a726c8005f1c34dbd218f7c --- .../hugegraph/api/filter/RedirectFilter.java | 12 +- .../hugegraph/auth/HugeGraphAuthProxy.java | 10 +- .../apache/hugegraph/core/GraphManager.java | 94 +++++------ .../java/org/apache/hugegraph/HugeGraph.java | 8 +- .../apache/hugegraph/StandardHugeGraph.java | 44 ++--- .../job/computer/AbstractComputer.java | 8 +- .../masterelection/GlobalMasterInfo.java | 89 ++++++++--- .../RoleElectionStateMachine.java | 2 +- ...MachineCallback.java => RoleListener.java} | 2 +- .../StandardRoleElectionStateMachine.java | 53 +++--- ...allback.java => StandardRoleListener.java} | 63 ++++---- .../masterelection/StateMachineContext.java | 2 +- .../hugegraph/task/ServerInfoManager.java | 151 +++++++++++------- .../hugegraph/task/StandardTaskScheduler.java | 49 +++--- .../apache/hugegraph/task/TaskManager.java | 58 +++---- .../assembly/static/conf/gremlin-server.yaml | 3 +- .../travis/conf-raft1/gremlin-server.yaml | 6 +- .../travis/conf-raft2/gremlin-server.yaml | 6 +- .../travis/conf-raft3/gremlin-server.yaml | 6 +- .../apache/hugegraph/example/ExampleUtil.java | 7 +- .../apache/hugegraph/api/GremlinApiTest.java | 2 +- .../apache/hugegraph/core/BaseCoreTest.java | 5 +- .../apache/hugegraph/core/CoreTestSuite.java | 4 +- .../hugegraph/core/MultiGraphsTest.java | 11 +- .../core/RoleElectionStateMachineTest.java | 54 ++++--- .../apache/hugegraph/tinkerpop/TestGraph.java | 22 ++- .../apache/hugegraph/unit/UnitTestSuite.java | 2 + .../unit/core/SecurityManagerTest.java | 13 +- 28 files changed, 438 insertions(+), 348 deletions(-) rename hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/{StateMachineCallback.java => RoleListener.java} (96%) rename hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/{StandardStateMachineCallback.java => StandardRoleListener.java} (67%) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java index e675dd9554..3fdfd7689c 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/RedirectFilter.java @@ -82,16 +82,16 @@ public void filter(ContainerRequestContext context) throws IOException { return; } - GlobalMasterInfo globalMasterInfo = manager.globalMasterInfo(); - if (globalMasterInfo == null || !globalMasterInfo.isFeatureSupport()) { + GlobalMasterInfo globalNodeInfo = manager.globalNodeRoleInfo(); + if (globalNodeInfo == null || !globalNodeInfo.supportElection()) { return; } - GlobalMasterInfo.NodeInfo masterNodeInfo = globalMasterInfo.nodeInfo(); - if (masterNodeInfo == null || masterNodeInfo.isMaster() || - StringUtils.isEmpty(masterNodeInfo.url())) { + GlobalMasterInfo.NodeInfo masterInfo = globalNodeInfo.masterInfo(); + if (masterInfo == null || masterInfo.isMaster() || + StringUtils.isEmpty(masterInfo.nodeUrl())) { return; } - String url = masterNodeInfo.url(); + String url = masterInfo.nodeUrl(); URI redirectUri; try { diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java index 2435e2667a..d22b86bab4 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeGraphAuthProxy.java @@ -55,6 +55,7 @@ import org.apache.hugegraph.exception.NotSupportException; import org.apache.hugegraph.iterator.FilterIterator; import org.apache.hugegraph.iterator.MapperIterator; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.masterelection.RoleElectionStateMachine; import org.apache.hugegraph.rpc.RpcServiceConfig4Client; import org.apache.hugegraph.rpc.RpcServiceConfig4Server; @@ -78,7 +79,6 @@ import org.apache.hugegraph.type.Nameable; import org.apache.hugegraph.type.define.GraphMode; import org.apache.hugegraph.type.define.GraphReadMode; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; import org.apache.hugegraph.util.RateLimiter; @@ -669,9 +669,9 @@ public void waitReady(RpcServer rpcServer) { } @Override - public void serverStarted(Id serverId, NodeRole serverRole) { + public void serverStarted(GlobalMasterInfo nodeInfo) { this.verifyAdminPermission(); - this.hugegraph.serverStarted(serverId, serverRole); + this.hugegraph.serverStarted(nodeInfo); } @Override @@ -776,9 +776,9 @@ public void resumeSnapshot() { } @Override - public void create(String configPath, Id server, NodeRole role) { + public void create(String configPath, GlobalMasterInfo nodeInfo) { this.verifyPermission(HugePermission.WRITE, ResourceType.STATUS); - this.hugegraph.create(configPath, server, role); + this.hugegraph.create(configPath, nodeInfo); } @Override diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java index 2c73b5ee93..b8770ca7df 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/core/GraphManager.java @@ -23,8 +23,6 @@ import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Executor; -import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; @@ -41,7 +39,6 @@ import org.apache.hugegraph.backend.BackendException; import org.apache.hugegraph.backend.cache.Cache; import org.apache.hugegraph.backend.cache.CacheManager; -import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.backend.store.BackendStoreInfo; import org.apache.hugegraph.config.CoreOptions; @@ -53,7 +50,7 @@ import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.masterelection.RoleElectionOptions; import org.apache.hugegraph.masterelection.RoleElectionStateMachine; -import org.apache.hugegraph.masterelection.StandardStateMachineCallback; +import org.apache.hugegraph.masterelection.StandardRoleListener; import org.apache.hugegraph.metrics.MetricsUtil; import org.apache.hugegraph.metrics.ServerReporter; import org.apache.hugegraph.rpc.RpcClientProvider; @@ -88,14 +85,11 @@ public final class GraphManager { private final HugeAuthenticator authenticator; private final RpcServer rpcServer; private final RpcClientProvider rpcClient; - private final HugeConfig conf; - - private RoleElectionStateMachine roleStateWorker; - private GlobalMasterInfo globalMasterInfo; - private Id server; - private NodeRole role; + private RoleElectionStateMachine roleStateMachine; + private GlobalMasterInfo globalNodeRoleInfo; + private final HugeConfig conf; private final EventHub eventHub; public GraphManager(HugeConfig conf, EventHub hub) { @@ -104,6 +98,10 @@ public GraphManager(HugeConfig conf, EventHub hub) { this.authenticator = HugeAuthenticator.loadAuthenticator(conf); this.rpcServer = new RpcServer(conf); this.rpcClient = new RpcClientProvider(conf); + + this.roleStateMachine = null; + this.globalNodeRoleInfo = new GlobalMasterInfo(); + this.eventHub = hub; this.conf = conf; } @@ -141,8 +139,7 @@ public void loadGraphs(Map graphConfs) { } } - public HugeGraph cloneGraph(String name, String newName, - String configText) { + public HugeGraph cloneGraph(String name, String newName, String configText) { /* * 0. check and modify params * 1. create graph instance @@ -270,6 +267,10 @@ public AuthManager authManager() { return this.authenticator().authManager(); } + public GlobalMasterInfo globalNodeRoleInfo() { + return this.globalNodeRoleInfo; + } + public void close() { for (Graph graph : this.graphs.values()) { try { @@ -280,8 +281,8 @@ public void close() { } this.destroyRpcServer(); this.unlistenChanges(); - if (this.roleStateWorker != null) { - this.roleStateWorker.shutdown(); + if (this.roleStateMachine != null) { + this.roleStateMachine.shutdown(); } } @@ -414,8 +415,7 @@ private void waitGraphsReady() { LOG.info("RpcServer is not enabled, skip wait graphs ready"); return; } - com.alipay.remoting.rpc.RpcServer remotingRpcServer = - this.remotingRpcServer(); + com.alipay.remoting.rpc.RpcServer remotingRpcServer = this.remotingRpcServer(); for (String graphName : this.graphs.keySet()) { HugeGraph graph = this.graph(graphName); graph.waitReady(remotingRpcServer); @@ -433,7 +433,7 @@ private void checkBackendVersionOrExit(HugeConfig config) { if (this.requireAuthentication()) { String token = config.get(ServerOptions.AUTH_ADMIN_TOKEN); try { - this.authenticator.initAdminUser(token); + this.authenticator().initAdminUser(token); } catch (Exception e) { throw new BackendException( "The backend store of '%s' can't " + @@ -455,65 +455,57 @@ private void checkBackendVersionOrExit(HugeConfig config) { } private void serverStarted(HugeConfig config) { - String server = config.get(ServerOptions.SERVER_ID); + String id = config.get(ServerOptions.SERVER_ID); String role = config.get(ServerOptions.SERVER_ROLE); - E.checkArgument(StringUtils.isNotEmpty(server), + E.checkArgument(StringUtils.isNotEmpty(id), "The server name can't be null or empty"); E.checkArgument(StringUtils.isNotEmpty(role), "The server role can't be null or empty"); - this.server = IdGenerator.of(server); - this.role = NodeRole.valueOf(role.toUpperCase()); - boolean supportRoleStateWorker = this.supportRoleStateWorker(); - if (supportRoleStateWorker) { - this.role = NodeRole.WORKER; + NodeRole nodeRole = NodeRole.valueOf(role.toUpperCase()); + boolean supportRoleElection = !nodeRole.computer() && + this.supportRoleElection(); + if (supportRoleElection) { + // Init any server as Worker role, then do role election + nodeRole = NodeRole.WORKER; } + this.globalNodeRoleInfo.initNodeId(IdGenerator.of(id)); + this.globalNodeRoleInfo.initNodeRole(nodeRole); + for (String graph : this.graphs()) { HugeGraph hugegraph = this.graph(graph); assert hugegraph != null; - hugegraph.serverStarted(this.server, this.role); + hugegraph.serverStarted(this.globalNodeRoleInfo); } - if (supportRoleStateWorker) { - this.initRoleStateWorker(); + if (supportRoleElection) { + this.initRoleStateMachine(); } } - private void initRoleStateWorker() { - E.checkArgument(this.roleStateWorker == null, "Repetition init"); - Executor applyThread = Executors.newSingleThreadExecutor(); - this.roleStateWorker = this.authenticator().graph().roleElectionStateMachine(); - this.globalMasterInfo = new GlobalMasterInfo(); - StandardStateMachineCallback stateMachineCallback = new StandardStateMachineCallback( - TaskManager.instance(), - this.globalMasterInfo); - applyThread.execute(() -> { - this.roleStateWorker.apply(stateMachineCallback); - }); - } - - public GlobalMasterInfo globalMasterInfo() { - return this.globalMasterInfo; + private void initRoleStateMachine() { + E.checkArgument(this.roleStateMachine == null, + "Repeated initialization of role state worker"); + this.globalNodeRoleInfo.supportElection(true); + this.roleStateMachine = this.authenticator().graph().roleElectionStateMachine(); + StandardRoleListener listener = new StandardRoleListener(TaskManager.instance(), + this.globalNodeRoleInfo); + this.roleStateMachine.start(listener); } - private boolean supportRoleStateWorker() { - if (this.role.computer()) { - return false; - } - + private boolean supportRoleElection() { try { if (!(this.authenticator() instanceof StandardAuthenticator)) { LOG.info("{} authenticator does not support role election currently", this.authenticator().getClass().getSimpleName()); return false; } + return true; } catch (IllegalStateException e) { - LOG.info("Unconfigured StandardAuthenticator, not support role election currently"); + LOG.info("{}, does not support role election currently", e.getMessage()); return false; } - - return true; } private void addMetrics(HugeConfig config) { @@ -591,7 +583,7 @@ private HugeGraph createGraph(HugeConfig config, String name) { graph = (HugeGraph) GraphFactory.open(config); // Init graph and start it - graph.create(this.graphsDir, this.server, this.role); + graph.create(this.graphsDir, this.globalNodeRoleInfo); } catch (Throwable e) { LOG.error("Failed to create graph '{}' due to: {}", name, e.getMessage(), e); diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java index cd287c47be..85c093e59e 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java @@ -30,6 +30,7 @@ import org.apache.hugegraph.backend.store.raft.RaftGroupManager; import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.config.TypedOption; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.masterelection.RoleElectionStateMachine; import org.apache.hugegraph.rpc.RpcServiceConfig4Client; import org.apache.hugegraph.rpc.RpcServiceConfig4Server; @@ -44,12 +45,11 @@ import org.apache.hugegraph.task.TaskScheduler; import org.apache.hugegraph.traversal.optimize.HugeCountStepStrategy; import org.apache.hugegraph.traversal.optimize.HugeGraphStepStrategy; -import org.apache.hugegraph.traversal.optimize.HugeVertexStepStrategy; import org.apache.hugegraph.traversal.optimize.HugePrimaryKeyStrategy; +import org.apache.hugegraph.traversal.optimize.HugeVertexStepStrategy; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.type.define.GraphMode; import org.apache.hugegraph.type.define.GraphReadMode; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Graph; @@ -201,7 +201,7 @@ public interface HugeGraph extends Graph { void waitReady(RpcServer rpcServer); - void serverStarted(Id serverId, NodeRole serverRole); + void serverStarted(GlobalMasterInfo nodeInfo); boolean started(); @@ -221,7 +221,7 @@ public interface HugeGraph extends Graph { void resumeSnapshot(); - void create(String configPath, Id server, NodeRole role); + void create(String configPath, GlobalMasterInfo nodeInfo); void drop(); diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java index db37d0a4bd..c671056e04 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java @@ -51,7 +51,6 @@ import org.apache.hugegraph.backend.store.raft.RaftBackendStoreProvider; import org.apache.hugegraph.backend.store.raft.RaftGroupManager; import org.apache.hugegraph.backend.store.ram.RamTable; -import org.apache.hugegraph.task.EphemeralJobQueue; import org.apache.hugegraph.backend.tx.GraphTransaction; import org.apache.hugegraph.backend.tx.SchemaTransaction; import org.apache.hugegraph.config.CoreOptions; @@ -64,6 +63,7 @@ import org.apache.hugegraph.job.EphemeralJob; import org.apache.hugegraph.masterelection.ClusterRoleStore; import org.apache.hugegraph.masterelection.Config; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.masterelection.RoleElectionConfig; import org.apache.hugegraph.masterelection.RoleElectionOptions; import org.apache.hugegraph.masterelection.RoleElectionStateMachine; @@ -84,13 +84,13 @@ import org.apache.hugegraph.structure.HugeFeatures; import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.structure.HugeVertexProperty; +import org.apache.hugegraph.task.EphemeralJobQueue; import org.apache.hugegraph.task.ServerInfoManager; import org.apache.hugegraph.task.TaskManager; import org.apache.hugegraph.task.TaskScheduler; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.type.define.GraphMode; import org.apache.hugegraph.type.define.GraphReadMode; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.hugegraph.util.ConfigUtil; import org.apache.hugegraph.util.DateUtil; import org.apache.hugegraph.util.E; @@ -267,15 +267,15 @@ public BackendFeatures backendStoreFeatures() { } @Override - public void serverStarted(Id serverId, NodeRole serverRole) { + public void serverStarted(GlobalMasterInfo nodeInfo) { LOG.info("Init system info for graph '{}'", this.name); this.initSystemInfo(); LOG.info("Init server info [{}-{}] for graph '{}'...", - serverId, serverRole, this.name); - this.serverInfoManager().initServerInfo(serverId, serverRole); + nodeInfo.nodeId(), nodeInfo.nodeRole(), this.name); + this.serverInfoManager().initServerInfo(nodeInfo); - this.initRoleStateWorker(serverId); + this.initRoleStateMachine(nodeInfo.nodeId()); // TODO: check necessary? LOG.info("Check olap property-key tables for graph '{}'", this.name); @@ -291,16 +291,18 @@ public void serverStarted(Id serverId, NodeRole serverRole) { this.started = true; } - private void initRoleStateWorker(Id serverId) { - Config roleStateMachineConfig = new RoleElectionConfig(serverId.toString(), - this.configuration.get(RoleElectionOptions.NODE_EXTERNAL_URL), - this.configuration.get(RoleElectionOptions.EXCEEDS_FAIL_COUNT), - this.configuration.get(RoleElectionOptions.RANDOM_TIMEOUT_MILLISECOND), - this.configuration.get(RoleElectionOptions.HEARTBEAT_INTERVAL_SECOND), - this.configuration.get(RoleElectionOptions.MASTER_DEAD_TIMES), - this.configuration.get(RoleElectionOptions.BASE_TIMEOUT_MILLISECOND)); - ClusterRoleStore clusterRoleStore = new StandardClusterRoleStore(this.params); - this.roleElectionStateMachine = new StandardRoleElectionStateMachine(roleStateMachineConfig, clusterRoleStore); + private void initRoleStateMachine(Id serverId) { + HugeConfig conf = this.configuration; + Config roleConfig = new RoleElectionConfig(serverId.toString(), + conf.get(RoleElectionOptions.NODE_EXTERNAL_URL), + conf.get(RoleElectionOptions.EXCEEDS_FAIL_COUNT), + conf.get(RoleElectionOptions.RANDOM_TIMEOUT_MILLISECOND), + conf.get(RoleElectionOptions.HEARTBEAT_INTERVAL_SECOND), + conf.get(RoleElectionOptions.MASTER_DEAD_TIMES), + conf.get(RoleElectionOptions.BASE_TIMEOUT_MILLISECOND)); + ClusterRoleStore roleStore = new StandardClusterRoleStore(this.params); + this.roleElectionStateMachine = new StandardRoleElectionStateMachine(roleConfig, + roleStore); } @Override @@ -399,8 +401,7 @@ public void truncateBackend() { try { this.storeProvider.truncate(); // TODO: remove this after serverinfo saved in etcd - this.serverStarted(this.serverInfoManager().selfServerId(), - this.serverInfoManager().selfServerRole()); + this.serverStarted(this.serverInfoManager().globalNodeRoleInfo()); } finally { LockUtil.unlock(this.name, LockUtil.GRAPH_LOCK); } @@ -974,9 +975,9 @@ public synchronized void close() throws Exception { } @Override - public void create(String configPath, Id server, NodeRole role) { + public void create(String configPath, GlobalMasterInfo nodeInfo) { this.initBackend(); - this.serverStarted(server, role); + this.serverStarted(nodeInfo); // Write config to disk file String confPath = ConfigUtil.writeToFile(configPath, this.name(), @@ -1052,8 +1053,7 @@ public TaskScheduler taskScheduler() { } private ServerInfoManager serverInfoManager() { - ServerInfoManager manager = this.taskManager - .getServerInfoManager(this.params); + ServerInfoManager manager = this.taskManager.getServerInfoManager(this.params); E.checkState(manager != null, "Can't find server info manager for graph '%s'", this); return manager; diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java index a40d0001b4..11207ebae5 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/computer/AbstractComputer.java @@ -32,16 +32,15 @@ import org.apache.commons.configuration2.tree.ImmutableNode; import org.apache.commons.configuration2.tree.NodeHandler; import org.apache.commons.configuration2.tree.NodeModel; -import org.apache.hugegraph.type.define.Directions; -import org.apache.hugegraph.util.ParameterUtil; -import org.slf4j.Logger; - import org.apache.hugegraph.HugeException; import org.apache.hugegraph.job.ComputerJob; import org.apache.hugegraph.job.Job; import org.apache.hugegraph.traversal.algorithm.HugeTraverser; +import org.apache.hugegraph.type.define.Directions; import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.util.ParameterUtil; +import org.slf4j.Logger; public abstract class AbstractComputer implements Computer { @@ -85,7 +84,6 @@ public void checkParameters(Map parameters) { @Override public Object call(Job job, Map parameters) { - this.checkAndCollectParameters(parameters); // Read configuration try { diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java index d7dd127af5..9124fcd0b6 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java @@ -17,50 +17,103 @@ package org.apache.hugegraph.masterelection; -public class GlobalMasterInfo { +import org.apache.hugegraph.backend.id.Id; +import org.apache.hugegraph.backend.id.IdGenerator; +import org.apache.hugegraph.type.define.NodeRole; +import org.apache.hugegraph.util.E; - private NodeInfo nodeInfo; - private volatile boolean featureSupport; +// TODO: rename to GlobalNodeRoleInfo +public final class GlobalMasterInfo { + + private final static NodeInfo NO_MASTER = new NodeInfo(false, ""); + + private volatile boolean supportElection; + private volatile NodeInfo masterNodeInfo; + + private volatile Id nodeId; + private volatile NodeRole nodeRole; public GlobalMasterInfo() { - this.featureSupport = false; - this.nodeInfo = new NodeInfo(false, ""); + this(NO_MASTER); + } + + public GlobalMasterInfo(NodeInfo masterInfo) { + this.supportElection = false; + this.masterNodeInfo = masterInfo; + + this.nodeId = null; + this.nodeRole = null; + } + + public void supportElection(boolean featureSupport) { + this.supportElection = featureSupport; + } + + public boolean supportElection() { + return this.supportElection; } - public final void nodeInfo(boolean isMaster, String url) { + public void resetMasterInfo() { + this.masterNodeInfo = NO_MASTER; + } + + public void masterInfo(boolean isMaster, String nodeUrl) { // final can avoid instruction rearrangement, visibility can be ignored - final NodeInfo tmp = new NodeInfo(isMaster, url); - this.nodeInfo = tmp; + this.masterNodeInfo = new NodeInfo(isMaster, nodeUrl); + } + + public NodeInfo masterInfo() { + return this.masterNodeInfo; + } + + public Id nodeId() { + return this.nodeId; + } + + public NodeRole nodeRole() { + return this.nodeRole; + } + + public void initNodeId(Id id) { + this.nodeId = id; } - public final NodeInfo nodeInfo() { - return this.nodeInfo; + public void initNodeRole(NodeRole role) { + E.checkArgument(role != null, "The server role can't be null"); + E.checkArgument(this.nodeRole == null, + "The server role can't be init twice"); + this.nodeRole = role; } - public void isFeatureSupport(boolean featureSupport) { - this.featureSupport = featureSupport; + public void changeNodeRole(NodeRole role) { + E.checkArgument(role != null, "The server role can't be null"); + this.nodeRole = role; } - public boolean isFeatureSupport() { - return this.featureSupport; + public static GlobalMasterInfo master(String nodeId) { + NodeInfo masterInfo = new NodeInfo(true, nodeId); + GlobalMasterInfo nodeInfo = new GlobalMasterInfo(masterInfo); + nodeInfo.nodeId = IdGenerator.of(nodeId); + nodeInfo.nodeRole = NodeRole.MASTER; + return nodeInfo; } public static class NodeInfo { private final boolean isMaster; - private final String url; + private final String nodeUrl; public NodeInfo(boolean isMaster, String url) { this.isMaster = isMaster; - this.url = url; + this.nodeUrl = url; } public boolean isMaster() { return this.isMaster; } - public String url() { - return this.url; + public String nodeUrl() { + return this.nodeUrl; } } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java index 920bc104f1..2a33d1bf6c 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleElectionStateMachine.java @@ -21,5 +21,5 @@ public interface RoleElectionStateMachine { void shutdown(); - void apply(StateMachineCallback stateMachineCallback); + void start(RoleListener callback); } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleListener.java similarity index 96% rename from hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleListener.java index 35abbe3402..e99db4c16f 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineCallback.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/RoleListener.java @@ -17,7 +17,7 @@ package org.apache.hugegraph.masterelection; -public interface StateMachineCallback { +public interface RoleListener { void onAsRoleMaster(StateMachineContext context); diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java index aa284def60..a0e2601d49 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleElectionStateMachine.java @@ -19,6 +19,8 @@ import java.security.SecureRandom; import java.util.Optional; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.locks.LockSupport; import org.apache.hugegraph.util.E; @@ -29,25 +31,36 @@ public class StandardRoleElectionStateMachine implements RoleElectionStateMachin private static final Logger LOG = Log.logger(StandardRoleElectionStateMachine.class); - private volatile boolean shutdown; private final Config config; + private final ClusterRoleStore roleStore; + private final ExecutorService applyThread; + + private volatile boolean shutdown; private volatile RoleState state; - private final ClusterRoleStore clusterRoleStore; - public StandardRoleElectionStateMachine(Config config, ClusterRoleStore clusterRoleStore) { + public StandardRoleElectionStateMachine(Config config, ClusterRoleStore roleStore) { this.config = config; - this.clusterRoleStore = clusterRoleStore; + this.roleStore = roleStore; + this.applyThread = Executors.newSingleThreadExecutor(); this.state = new UnknownState(null); this.shutdown = false; } @Override public void shutdown() { + if (this.shutdown) { + return; + } this.shutdown = true; + this.applyThread.shutdown(); } @Override - public void apply(StateMachineCallback stateMachineCallback) { + public void start(RoleListener stateMachineCallback) { + this.applyThread.execute(() -> this.apply(stateMachineCallback)); + } + + private void apply(RoleListener stateMachineCallback) { int failCount = 0; StateMachineContextImpl context = new StateMachineContextImpl(this); while (!this.shutdown) { @@ -73,13 +86,17 @@ public void apply(StateMachineCallback stateMachineCallback) { } } + protected ClusterRoleStore roleStore() { + return this.roleStore; + } + private interface RoleState { SecureRandom SECURE_RANDOM = new SecureRandom(); RoleState transform(StateMachineContext context); - Callback callback(StateMachineCallback callback); + Callback callback(RoleListener callback); static void heartBeatPark(StateMachineContext context) { long heartBeatIntervalSecond = context.config().heartBeatIntervalSecond(); @@ -110,7 +127,7 @@ public UnknownState(Integer epoch) { @Override public RoleState transform(StateMachineContext context) { - ClusterRoleStore adapter = context.adapter(); + ClusterRoleStore adapter = context.roleStore(); Optional clusterRoleOpt = adapter.query(); if (!clusterRoleOpt.isPresent()) { context.reset(); @@ -137,7 +154,7 @@ public RoleState transform(StateMachineContext context) { } @Override - public Callback callback(StateMachineCallback callback) { + public Callback callback(RoleListener callback) { return callback::unknown; } } @@ -158,7 +175,7 @@ public RoleState transform(StateMachineContext context) { } @Override - public Callback callback(StateMachineCallback callback) { + public Callback callback(RoleListener callback) { return callback::onAsRoleAbdication; } } @@ -175,7 +192,7 @@ public MasterState(ClusterRole clusterRole) { public RoleState transform(StateMachineContext context) { this.clusterRole.increaseClock(); RoleState.heartBeatPark(context); - if (context.adapter().updateIfNodePresent(this.clusterRole)) { + if (context.roleStore().updateIfNodePresent(this.clusterRole)) { return this; } context.reset(); @@ -184,7 +201,7 @@ public RoleState transform(StateMachineContext context) { } @Override - public Callback callback(StateMachineCallback callback) { + public Callback callback(RoleListener callback) { return callback::onAsRoleMaster; } } @@ -216,7 +233,7 @@ public RoleState transform(StateMachineContext context) { } @Override - public Callback callback(StateMachineCallback callback) { + public Callback callback(RoleListener callback) { return callback::onAsRoleWorker; } @@ -255,7 +272,7 @@ public RoleState transform(StateMachineContext context) { context.config().url(), epoch); // The master failover completed context.epoch(clusterRole.epoch()); - if (context.adapter().updateIfNodePresent(clusterRole)) { + if (context.roleStore().updateIfNodePresent(clusterRole)) { context.master(new MasterServerInfoImpl(clusterRole.node(), clusterRole.url())); return new MasterState(clusterRole); } else { @@ -264,7 +281,7 @@ public RoleState transform(StateMachineContext context) { } @Override - public Callback callback(StateMachineCallback callback) { + public Callback callback(RoleListener callback) { return callback::onAsRoleCandidate; } } @@ -303,8 +320,8 @@ public void epoch(Integer epoch) { } @Override - public ClusterRoleStore adapter() { - return this.machine.adapter(); + public ClusterRoleStore roleStore() { + return this.machine.roleStore(); } @Override @@ -348,8 +365,4 @@ public String node() { return this.node; } } - - protected ClusterRoleStore adapter() { - return this.clusterRoleStore; - } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleListener.java similarity index 67% rename from hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java rename to hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleListener.java index 28e01d2913..f2bb94f521 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardStateMachineCallback.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StandardRoleListener.java @@ -23,84 +23,83 @@ import org.apache.hugegraph.util.Log; import org.slf4j.Logger; -public class StandardStateMachineCallback implements StateMachineCallback { +public class StandardRoleListener implements RoleListener { - private static final Logger LOG = Log.logger(StandardStateMachineCallback.class); + private static final Logger LOG = Log.logger(StandardRoleListener.class); private final TaskManager taskManager; - private final GlobalMasterInfo globalMasterInfo; + private final GlobalMasterInfo roleInfo; - private boolean isMaster = false; + private volatile boolean selfIsMaster; - public StandardStateMachineCallback(TaskManager taskManager, - GlobalMasterInfo globalMasterInfo) { + public StandardRoleListener(TaskManager taskManager, + GlobalMasterInfo roleInfo) { this.taskManager = taskManager; - this.taskManager.enableRoleElected(true); - this.globalMasterInfo = globalMasterInfo; - this.globalMasterInfo.isFeatureSupport(true); + this.taskManager.enableRoleElection(); + this.roleInfo = roleInfo; + this.selfIsMaster = false; } @Override public void onAsRoleMaster(StateMachineContext context) { - if (!isMaster) { + if (!selfIsMaster) { this.taskManager.onAsRoleMaster(); LOG.info("Server {} change to master role", context.config().node()); } - this.initGlobalMasterInfo(context); - this.isMaster = true; + this.updateMasterInfo(context); + this.selfIsMaster = true; } @Override public void onAsRoleWorker(StateMachineContext context) { - if (isMaster) { + if (this.selfIsMaster) { this.taskManager.onAsRoleWorker(); LOG.info("Server {} change to worker role", context.config().node()); } - this.initGlobalMasterInfo(context); - this.isMaster = false; + this.updateMasterInfo(context); + this.selfIsMaster = false; } @Override public void onAsRoleCandidate(StateMachineContext context) { + // pass } @Override - public void unknown(StateMachineContext context) { - if (isMaster) { + public void onAsRoleAbdication(StateMachineContext context) { + if (this.selfIsMaster) { this.taskManager.onAsRoleWorker(); LOG.info("Server {} change to worker role", context.config().node()); } - this.initGlobalMasterInfo(context); + this.updateMasterInfo(context); + this.selfIsMaster = false; + } - isMaster = false; + @Override + public void error(StateMachineContext context, Throwable e) { + LOG.error("Server {} exception occurred", context.config().node(), e); } @Override - public void onAsRoleAbdication(StateMachineContext context) { - if (isMaster) { + public void unknown(StateMachineContext context) { + if (this.selfIsMaster) { this.taskManager.onAsRoleWorker(); LOG.info("Server {} change to worker role", context.config().node()); } - this.initGlobalMasterInfo(context); - - isMaster = false; - } + this.updateMasterInfo(context); - @Override - public void error(StateMachineContext context, Throwable e) { - LOG.error("Server {} exception occurred", context.config().node(), e); + this.selfIsMaster = false; } - public void initGlobalMasterInfo(StateMachineContext context) { + public void updateMasterInfo(StateMachineContext context) { StateMachineContext.MasterServerInfo master = context.master(); if (master == null) { - this.globalMasterInfo.nodeInfo(false, ""); + this.roleInfo.resetMasterInfo(); return; } boolean isMaster = Objects.equals(context.node(), master.node()); - String url = master.url(); - this.globalMasterInfo.nodeInfo(isMaster, url); + this.roleInfo.masterInfo(isMaster, master.url()); } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java index a3eaf89626..587cd417fc 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/StateMachineContext.java @@ -33,7 +33,7 @@ public interface StateMachineContext { void master(MasterServerInfo info); - ClusterRoleStore adapter(); + ClusterRoleStore roleStore(); void reset(); diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java index e8cccf88e3..ee14b4ceb2 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/ServerInfoManager.java @@ -37,6 +37,7 @@ import org.apache.hugegraph.exception.ConnectionException; import org.apache.hugegraph.iterator.ListIterator; import org.apache.hugegraph.iterator.MapperIterator; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.schema.PropertyKey; import org.apache.hugegraph.schema.VertexLabel; import org.apache.hugegraph.structure.HugeVertex; @@ -61,8 +62,7 @@ public class ServerInfoManager { private final HugeGraphParams graph; private final ExecutorService dbExecutor; - private Id selfServerId; - private NodeRole selfServerRole; + private volatile GlobalMasterInfo globalNodeInfo; private volatile boolean onlySingleNode; private volatile boolean closed; @@ -75,8 +75,7 @@ public ServerInfoManager(HugeGraphParams graph, this.graph = graph; this.dbExecutor = dbExecutor; - this.selfServerId = null; - this.selfServerRole = NodeRole.MASTER; + this.globalNodeInfo = null; this.onlySingleNode = false; this.closed = false; @@ -86,7 +85,7 @@ public void init() { HugeServerInfo.schema(this.graph).initSchemaIfNeeded(); } - public boolean close() { + public synchronized boolean close() { this.closed = true; if (!this.dbExecutor.isShutdown()) { this.removeSelfServerInfo(); @@ -103,40 +102,24 @@ public boolean close() { return true; } - public synchronized void forceInitServerInfo(Id server, NodeRole role) { - if (this.closed) { - return; - } - - E.checkArgument(server != null && role != null, - "The server id or role can't be null"); - this.selfServerId = server; - this.selfServerRole = role; + public synchronized void initServerInfo(GlobalMasterInfo nodeInfo) { + E.checkArgument(nodeInfo != null, "The global node info can't be null"); - this.saveServerInfo(this.selfServerId, this.selfServerRole); - } - - public synchronized void initServerInfo(Id server, NodeRole role) { - E.checkArgument(server != null && role != null, - "The server id or role can't be null"); - this.selfServerId = server; - this.selfServerRole = role; - - HugeServerInfo existed = this.serverInfo(server); + Id serverId = nodeInfo.nodeId(); + HugeServerInfo existed = this.serverInfo(serverId); E.checkArgument(existed == null || !existed.alive(), "The server with name '%s' already in cluster", - server); - if (role.master()) { + serverId); + + if (nodeInfo.nodeRole().master()) { String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null; do { - Iterator servers = this.serverInfos(PAGE_SIZE, - page); + Iterator servers = this.serverInfos(PAGE_SIZE, page); while (servers.hasNext()) { existed = servers.next(); - E.checkArgument(!existed.role().master() || - !existed.alive(), - "Already existed master '%s' in current " + - "cluster", existed.id()); + E.checkArgument(!existed.role().master() || !existed.alive(), + "Already existed master '%s' in current cluster", + existed.id()); } if (page != null) { page = PageInfo.pageInfo(servers); @@ -144,36 +127,80 @@ public synchronized void initServerInfo(Id server, NodeRole role) { } while (page != null); } - // TODO: save ServerInfo at AuthServer - this.saveServerInfo(this.selfServerId, this.selfServerRole); + this.globalNodeInfo = nodeInfo; + + // TODO: save ServerInfo to AuthServer + this.saveServerInfo(this.selfNodeId(), this.selfNodeRole()); + } + + public synchronized void changeServerRole(NodeRole nodeRole) { + if (this.closed) { + return; + } + + this.globalNodeInfo.changeNodeRole(nodeRole); + + // TODO: save ServerInfo to AuthServer + this.saveServerInfo(this.selfNodeId(), this.selfNodeRole()); } - public Id selfServerId() { - return this.selfServerId; + public GlobalMasterInfo globalNodeRoleInfo() { + return this.globalNodeInfo; } - public NodeRole selfServerRole() { - return this.selfServerRole; + public Id selfNodeId() { + if (this.globalNodeInfo == null) { + return null; + } + return this.globalNodeInfo.nodeId(); + } + + public NodeRole selfNodeRole() { + if (this.globalNodeInfo == null) { + return null; + } + return this.globalNodeInfo.nodeRole(); } - public boolean master() { - return this.selfServerRole != null && this.selfServerRole.master(); + public boolean selfIsMaster() { + return this.selfNodeRole() != null && this.selfNodeRole().master(); } public boolean onlySingleNode() { - // Only has one master node + // Only exists one node in the whole master return this.onlySingleNode; } - public void heartbeat() { + public synchronized void heartbeat() { + assert this.graphIsReady(); + HugeServerInfo serverInfo = this.selfServerInfo(); - if (serverInfo == null && this.selfServerId != null && - this.selfServerRole != NodeRole.MASTER) { - serverInfo = this.saveServerInfo(this.selfServerId, - this.selfServerRole); + if (serverInfo != null) { + // Update heartbeat time for this server + serverInfo.updateTime(DateUtil.now()); + this.save(serverInfo); + return; } - serverInfo.updateTime(DateUtil.now()); - this.save(serverInfo); + + /* ServerInfo is missing */ + if (this.selfNodeId() == null) { + // Ignore if ServerInfo is not initialized + LOG.info("ServerInfo is missing: {}, may not be initialized yet"); + return; + } + if (this.selfIsMaster()) { + // On master node, just wait for ServerInfo re-init + LOG.warn("ServerInfo is missing: {}, may be cleared before", + this.selfNodeId()); + return; + } + /* + * Missing server info on non-master node, may be caused by graph + * truncated on master node then synced by raft. + * TODO: we just patch it here currently, to be improved. + */ + serverInfo = this.saveServerInfo(this.selfNodeId(), this.selfNodeRole()); + assert serverInfo != null; } public synchronized void decreaseLoad(int load) { @@ -188,7 +215,7 @@ public int calcMaxLoad() { return 10000; } - protected boolean graphReady() { + protected boolean graphIsReady() { return !this.closed && this.graph.started() && this.graph.initialized(); } @@ -242,8 +269,8 @@ private GraphTransaction tx() { return this.graph.systemTransaction(); } - private HugeServerInfo saveServerInfo(Id server, NodeRole role) { - HugeServerInfo serverInfo = new HugeServerInfo(server, role); + private HugeServerInfo saveServerInfo(Id serverId, NodeRole serverRole) { + HugeServerInfo serverInfo = new HugeServerInfo(serverId, serverRole); serverInfo.maxLoad(this.calcMaxLoad()); this.save(serverInfo); @@ -310,16 +337,16 @@ private V call(Callable callable) { } private HugeServerInfo selfServerInfo() { - HugeServerInfo selfServerInfo = this.serverInfo(this.selfServerId); - if (selfServerInfo == null) { - LOG.warn("ServerInfo is missing: {}", this.selfServerId); + HugeServerInfo selfServerInfo = this.serverInfo(this.selfNodeId()); + if (selfServerInfo == null && this.selfNodeId() != null) { + LOG.warn("ServerInfo is missing: {}", this.selfNodeId()); } return selfServerInfo; } - private HugeServerInfo serverInfo(Id server) { + private HugeServerInfo serverInfo(Id serverId) { return this.call(() -> { - Iterator vertices = this.tx().queryVertices(server); + Iterator vertices = this.tx().queryVertices(serverId); Vertex vertex = QueryResults.one(vertices); if (vertex == null) { return null; @@ -335,19 +362,19 @@ private HugeServerInfo removeSelfServerInfo() { * backend store, initServerInfo() is not called in this case, so * this.selfServerId is null at this time. */ - if (this.selfServerId != null && this.graph.initialized()) { - return this.removeServerInfo(this.selfServerId); + if (this.selfNodeId() != null && this.graph.initialized()) { + return this.removeServerInfo(this.selfNodeId()); } return null; } - private HugeServerInfo removeServerInfo(Id server) { - if (server == null) { + private HugeServerInfo removeServerInfo(Id serverId) { + if (serverId == null) { return null; } - LOG.info("Remove server info: {}", server); + LOG.info("Remove server info: {}", serverId); return this.call(() -> { - Iterator vertices = this.tx().queryVertices(server); + Iterator vertices = this.tx().queryVertices(serverId); Vertex vertex = QueryResults.one(vertices); if (vertex == null) { return null; diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java index 9eda3f6b02..120aeb0d66 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java @@ -141,7 +141,7 @@ private TaskTransaction tx() { @Override public void restoreTasks() { - Id selfServer = this.serverManager().selfServerId(); + Id selfServer = this.serverManager().selfNodeId(); // Restore 'RESTORING', 'RUNNING' and 'QUEUED' tasks in order. for (TaskStatus status : TaskStatus.PENDING_STATUSES) { String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null; @@ -177,35 +177,35 @@ private Future restore(HugeTask task) { public Future schedule(HugeTask task) { E.checkArgumentNotNull(task, "Task can't be null"); + /* + * Just submit to queue if status=QUEUED (means re-schedule task) + * NOTE: schedule() method may be called multi times by + * HugeTask.checkDependenciesSuccess() method + */ if (task.status() == TaskStatus.QUEUED) { - /* - * Just submit to queue if status=QUEUED (means re-schedule task) - * NOTE: schedule() method may be called multi times by - * HugeTask.checkDependenciesSuccess() method - */ return this.resubmitTask(task); } + /* + * Due to EphemeralJob won't be serialized and deserialized through + * shared storage, submit EphemeralJob immediately on any node + */ if (task.callable() instanceof EphemeralJob) { - /* - * Due to EphemeralJob won't be serialized and deserialized through - * shared storage, submit EphemeralJob immediately on master - * NOTE: don't need to save EphemeralJob task - */ + // NOTE: we don't need to save EphemeralJob task task.status(TaskStatus.QUEUED); return this.submitTask(task); } - // Only check if not EphemeralJob + // Check this is on master for normal task schedule this.checkOnMasterNode("schedule"); if (this.serverManager().onlySingleNode() && !task.computer()) { /* * Speed up for single node, submit task immediately, - * this code can be removed without affecting logic + * this code can be removed without affecting code logic */ task.status(TaskStatus.QUEUED); - task.server(this.serverManager().selfServerId()); + task.server(this.serverManager().selfNodeId()); this.save(task); return this.submitTask(task); } else { @@ -278,8 +278,8 @@ public synchronized void cancel(HugeTask task) { // The task scheduled to workers, let the worker node to cancel this.save(task); assert task.server() != null : task; - assert this.serverManager().master(); - if (!task.server().equals(this.serverManager().selfServerId())) { + assert this.serverManager().selfIsMaster(); + if (!task.server().equals(this.serverManager().selfNodeId())) { /* * Remove task from memory if it's running on worker node, * but keep task in memory if it's running on master node. @@ -303,10 +303,10 @@ protected ServerInfoManager serverManager() { return this.serverManager; } - protected synchronized void scheduleTasks() { + protected synchronized void scheduleTasksOnMaster() { // Master server schedule all scheduling tasks to suitable worker nodes - Collection scheduleInfos = this.serverManager() - .allServerInfos(); + Collection serverInfos = this.serverManager() + .allServerInfos(); String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null; do { Iterator> tasks = this.tasks(TaskStatus.SCHEDULING, @@ -318,12 +318,12 @@ protected synchronized void scheduleTasks() { continue; } - if (!this.serverManager.master()) { + if (!this.serverManager.selfIsMaster()) { return; } HugeServerInfo server = this.serverManager().pickWorkerNode( - scheduleInfos, task); + serverInfos, task); if (server == null) { LOG.info("The master can't find suitable servers to " + "execute task '{}', wait for next schedule", @@ -348,7 +348,8 @@ protected synchronized void scheduleTasks() { } } while (page != null); - this.serverManager().updateServerInfos(scheduleInfos); + // Save to store + this.serverManager().updateServerInfos(serverInfos); } protected void executeTasksOnWorker(Id server) { @@ -422,7 +423,7 @@ protected void cancelTasksOnWorker(Id server) { protected void taskDone(HugeTask task) { this.remove(task); - Id selfServerId = this.serverManager().selfServerId(); + Id selfServerId = this.serverManager().selfNodeId(); try { this.serverManager().decreaseLoad(task.load()); } catch (Throwable e) { @@ -718,7 +719,7 @@ private V call(Callable callable) { } private void checkOnMasterNode(String op) { - if (!this.serverManager().master()) { + if (!this.serverManager().selfIsMaster()) { throw new HugeException("Can't %s task on non-master server", op); } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java index 0ad96f443c..b3726d3830 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java @@ -243,19 +243,8 @@ public int pendingTasks() { return size; } - protected void notifyNewTask(HugeTask task) { - Queue queue = ((ThreadPoolExecutor) this.schedulerExecutor) - .getQueue(); - if (queue.size() <= 1) { - /* - * Notify to schedule tasks initiatively when have new task - * It's OK to not notify again if there are more than one task in - * queue(like two, one is timer task, one is immediate task), - * we don't want too many immediate tasks to be inserted into queue, - * one notify will cause all the tasks to be processed. - */ - this.schedulerExecutor.submit(this::scheduleOrExecuteJob); - } + public void enableRoleElection() { + this.enableRoleElected = true; } public void onAsRoleMaster() { @@ -263,7 +252,7 @@ public void onAsRoleMaster() { for (TaskScheduler entry : this.schedulers.values()) { StandardTaskScheduler scheduler = (StandardTaskScheduler) entry; ServerInfoManager serverInfoManager = scheduler.serverManager(); - serverInfoManager.forceInitServerInfo(serverInfoManager.selfServerId(), NodeRole.MASTER); + serverInfoManager.changeServerRole(NodeRole.MASTER); } } catch (Throwable e) { LOG.error("Exception occurred when change to master role", e); @@ -276,7 +265,7 @@ public void onAsRoleWorker() { for (TaskScheduler entry : this.schedulers.values()) { StandardTaskScheduler scheduler = (StandardTaskScheduler) entry; ServerInfoManager serverInfoManager = scheduler.serverManager(); - serverInfoManager.forceInitServerInfo(serverInfoManager.selfServerId(), NodeRole.WORKER); + serverInfoManager.changeServerRole(NodeRole.WORKER); } } catch (Throwable e) { LOG.error("Exception occurred when change to worker role", e); @@ -284,8 +273,19 @@ public void onAsRoleWorker() { } } - public void enableRoleElected(boolean enableRoleElected) { - this.enableRoleElected = enableRoleElected; + protected void notifyNewTask(HugeTask task) { + Queue queue = ((ThreadPoolExecutor) this.schedulerExecutor) + .getQueue(); + if (queue.size() <= 1) { + /* + * Notify to schedule tasks initiatively when have new task + * It's OK to not notify again if there are more than one task in + * queue(like two, one is timer task, one is immediate task), + * we don't want too many immediate tasks to be inserted into queue, + * one notify will cause all the tasks to be processed. + */ + this.schedulerExecutor.submit(this::scheduleOrExecuteJob); + } } private void scheduleOrExecuteJob() { @@ -324,7 +324,7 @@ private void scheduleOrExecuteJobForGraph(StandardTaskScheduler scheduler) { * If graph is closed, don't call serverManager.initialized() * due to it will reopen graph tx. */ - if (!serverManager.graphReady()) { + if (!serverManager.graphIsReady()) { return; } @@ -332,25 +332,25 @@ private void scheduleOrExecuteJobForGraph(StandardTaskScheduler scheduler) { serverManager.heartbeat(); /* - * Master schedule tasks to suitable servers. - * Worker maybe become Master, so Master also need perform tasks assigned by - * previous Master when enableRoleElected is true. - * However, the master only needs to take the assignment, - * because the master stays the same when enableRoleElected is false. - * There is no suitable server when these tasks are created + * Master will schedule tasks to suitable servers. + * Note a Worker may become to a Master, so elected-Master also needs to + * execute tasks assigned by previous Master when enableRoleElected=true. + * However, when enableRoleElected=false, a Master is only set by the + * config assignment, assigned-Master always stays the same state. */ - if (serverManager.master()) { - scheduler.scheduleTasks(); + if (serverManager.selfIsMaster()) { + scheduler.scheduleTasksOnMaster(); if (!this.enableRoleElected && !serverManager.onlySingleNode()) { + // assigned-Master + non-single-node don't need to execute tasks return; } } - // Schedule queued tasks scheduled to current server - scheduler.executeTasksOnWorker(serverManager.selfServerId()); + // Execute queued tasks scheduled to current server + scheduler.executeTasksOnWorker(serverManager.selfNodeId()); // Cancel tasks scheduled to current server - scheduler.cancelTasksOnWorker(serverManager.selfServerId()); + scheduler.cancelTasksOnWorker(serverManager.selfNodeId()); } finally { LockUtil.unlock(graph, LockUtil.GRAPH_LOCK); } diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml index dff43cb04b..5946779828 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml @@ -40,6 +40,8 @@ scriptEngines: { org.apache.hugegraph.backend.id.IdGenerator, org.apache.hugegraph.type.define.Directions, org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, org.apache.hugegraph.traversal.algorithm.CountTraverser, org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, @@ -64,7 +66,6 @@ scriptEngines: { org.apache.hugegraph.traversal.optimize.ConditionP, org.apache.hugegraph.traversal.optimize.Text, org.apache.hugegraph.traversal.optimize.TraversalUtil, - org.apache.hugegraph.util.DateUtil, org.opencypher.gremlin.traversal.CustomFunctions, org.opencypher.gremlin.traversal.CustomPredicate ], diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml index 517c0a5fcc..55a8c0bb34 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yaml @@ -36,6 +36,8 @@ scriptEngines: { org.apache.hugegraph.backend.id.IdGenerator, org.apache.hugegraph.type.define.Directions, org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, org.apache.hugegraph.traversal.algorithm.CountTraverser, org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, @@ -57,9 +59,11 @@ scriptEngines: { org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, org.apache.hugegraph.traversal.optimize.Text, org.apache.hugegraph.traversal.optimize.TraversalUtil, - org.apache.hugegraph.util.DateUtil + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate ], methodImports: [java.lang.Math#*] }, diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml index bd37369c83..54d9a6ddec 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yaml @@ -36,6 +36,8 @@ scriptEngines: { org.apache.hugegraph.backend.id.IdGenerator, org.apache.hugegraph.type.define.Directions, org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, org.apache.hugegraph.traversal.algorithm.CountTraverser, org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, @@ -57,9 +59,11 @@ scriptEngines: { org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, org.apache.hugegraph.traversal.optimize.Text, org.apache.hugegraph.traversal.optimize.TraversalUtil, - org.apache.hugegraph.util.DateUtil + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate ], methodImports: [java.lang.Math#*] }, diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml index a034d63520..508abef354 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yaml @@ -36,6 +36,8 @@ scriptEngines: { org.apache.hugegraph.backend.id.IdGenerator, org.apache.hugegraph.type.define.Directions, org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, org.apache.hugegraph.traversal.algorithm.CountTraverser, org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, @@ -57,9 +59,11 @@ scriptEngines: { org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, org.apache.hugegraph.traversal.optimize.Text, org.apache.hugegraph.traversal.optimize.TraversalUtil, - org.apache.hugegraph.util.DateUtil + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate ], methodImports: [java.lang.Math#*] }, diff --git a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java index 7cb148262a..8317f9ba7f 100644 --- a/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java +++ b/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/ExampleUtil.java @@ -20,18 +20,17 @@ import java.io.File; import java.util.Iterator; import java.util.concurrent.TimeoutException; -import org.slf4j.Logger; import org.apache.hugegraph.HugeException; import org.apache.hugegraph.HugeFactory; import org.apache.hugegraph.HugeGraph; -import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.dist.RegisterUtil; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.perf.PerfUtil; import org.apache.hugegraph.task.HugeTask; import org.apache.hugegraph.task.TaskScheduler; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.hugegraph.util.Log; +import org.slf4j.Logger; public class ExampleUtil { private static final Logger LOG = Log.logger(ExampleUtil.class); @@ -81,7 +80,7 @@ public static HugeGraph loadGraph(boolean needClear, boolean needProfile) { graph.clearBackend(); } graph.initBackend(); - graph.serverStarted(IdGenerator.of("server1"), NodeRole.MASTER); + graph.serverStarted(GlobalMasterInfo.master("server1")); return graph; } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java index 57aefeb9be..b065270871 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/GremlinApiTest.java @@ -121,7 +121,7 @@ public void testClearAndInit() { body = "{" + "\"gremlin\":\"hugegraph.serverStarted(" + - " IdGenerator.of('server1'), NodeRole.MASTER)\"," + + " GlobalMasterInfo.master('server1'))\"," + "\"bindings\":{}," + "\"language\":\"gremlin-groovy\"," + "\"aliases\":{\"g\":\"__g_hugegraph\"}}"; diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index d51e1b5951..df9932ab8e 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -21,13 +21,12 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.HugeGraphParams; -import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.backend.store.BackendFeatures; import org.apache.hugegraph.dist.RegisterUtil; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.schema.SchemaManager; import org.apache.hugegraph.testutil.Utils; import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.hugegraph.util.Log; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Vertex; @@ -66,7 +65,7 @@ public static void init() { graph = Utils.open(); graph.clearBackend(); graph.initBackend(); - graph.serverStarted(IdGenerator.of("server1"), NodeRole.MASTER); + graph.serverStarted(GlobalMasterInfo.master("server-test")); } @AfterClass diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java index e140474b40..beafedf863 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/CoreTestSuite.java @@ -36,9 +36,7 @@ TaskCoreTest.class, AuthTest.class, MultiGraphsTest.class, - RamTableTest.class, - RoleElectionStateMachineTest.class + RamTableTest.class }) public class CoreTestSuite { - } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java index 23fb122f44..3b468ba458 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java @@ -31,8 +31,8 @@ import org.apache.hugegraph.backend.store.BackendStoreInfo; import org.apache.hugegraph.backend.store.rocksdb.RocksDBOptions; import org.apache.hugegraph.config.CoreOptions; -import org.apache.hugegraph.exception.ConnectionException; import org.apache.hugegraph.exception.ExistedException; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.schema.EdgeLabel; import org.apache.hugegraph.schema.IndexLabel; import org.apache.hugegraph.schema.PropertyKey; @@ -40,7 +40,6 @@ import org.apache.hugegraph.schema.VertexLabel; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.testutil.Utils; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.util.GraphFactory; @@ -87,9 +86,9 @@ public void testCopySchemaWithMultiGraphs() { graph.initBackend(); } HugeGraph g1 = graphs.get(0); - g1.serverStarted(IdGenerator.of("server-g2"), NodeRole.MASTER); + g1.serverStarted(GlobalMasterInfo.master("server-g2")); HugeGraph g2 = graphs.get(1); - g2.serverStarted(IdGenerator.of("server-g3"), NodeRole.MASTER); + g2.serverStarted(GlobalMasterInfo.master("server-g3")); SchemaManager schema = g1.schema(); @@ -209,8 +208,8 @@ public void testCopySchemaWithMultiGraphsWithConflict() { } HugeGraph g1 = graphs.get(0); HugeGraph g2 = graphs.get(1); - g1.serverStarted(IdGenerator.of("server-g1c"), NodeRole.MASTER); - g2.serverStarted(IdGenerator.of("server-g2c"), NodeRole.MASTER); + g1.serverStarted(GlobalMasterInfo.master("server-g1c")); + g2.serverStarted(GlobalMasterInfo.master("server-g2c")); g1.schema().propertyKey("id").asInt().create(); g2.schema().propertyKey("id").asText().create(); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java index 9fbbb5e628..dd73821661 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/RoleElectionStateMachineTest.java @@ -34,8 +34,8 @@ import org.apache.hugegraph.masterelection.ClusterRoleStore; import org.apache.hugegraph.masterelection.Config; import org.apache.hugegraph.masterelection.RoleElectionStateMachine; +import org.apache.hugegraph.masterelection.RoleListener; import org.apache.hugegraph.masterelection.StandardRoleElectionStateMachine; -import org.apache.hugegraph.masterelection.StateMachineCallback; import org.apache.hugegraph.masterelection.StateMachineContext; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.testutil.Utils; @@ -43,13 +43,13 @@ public class RoleElectionStateMachineTest { - public static class LogEntry { + private static class LogEntry { - Integer epoch; + private final Integer epoch; - String node; + private final String node; - Role role; + private final Role role; enum Role { master, @@ -74,28 +74,29 @@ public boolean equals(Object obj) { return false; } LogEntry logEntry = (LogEntry) obj; - return Objects.equals(epoch, logEntry.epoch) && - Objects.equals(node, logEntry.node) && role == logEntry.role; + return Objects.equals(this.epoch, logEntry.epoch) && + Objects.equals(this.node, logEntry.node) && + this.role == logEntry.role; } @Override public int hashCode() { - return Objects.hash(epoch, node, role); + return Objects.hash(this.epoch, this.node, this.role); } @Override public String toString() { return "LogEntry{" + - "epoch=" + epoch + - ", node='" + node + '\'' + - ", role=" + role + + "epoch=" + this.epoch + + ", node='" + this.node + '\'' + + ", role=" + this.role + '}'; } } private static class TestConfig implements Config { - String node; + private final String node; public TestConfig(String node) { this.node = node; @@ -139,11 +140,11 @@ public long baseTimeoutMillisecond() { @Test public void testStateMachine() throws InterruptedException { - final CountDownLatch stop = new CountDownLatch(4); final int MAX_COUNT = 200; - final List logRecords = Collections.synchronizedList(new ArrayList<>(MAX_COUNT)); - final List masterNodes = Collections.synchronizedList(new ArrayList<>(MAX_COUNT)); - final StateMachineCallback callback = new StateMachineCallback() { + CountDownLatch stop = new CountDownLatch(4); + List logRecords = Collections.synchronizedList(new ArrayList<>(MAX_COUNT)); + List masterNodes = Collections.synchronizedList(new ArrayList<>(MAX_COUNT)); + RoleListener callback = new RoleListener() { @Override public void onAsRoleMaster(StateMachineContext context) { @@ -200,12 +201,13 @@ public void onAsRoleAbdication(StateMachineContext context) { @Override public void error(StateMachineContext context, Throwable e) { Utils.println("state machine error: node " + - context.node() + - " message " + e.getMessage()); + context.node() + " message " + e.getMessage()); } }; - final List clusterRoleLogs = Collections.synchronizedList(new ArrayList<>(100)); + final List clusterRoleLogs = Collections.synchronizedList( + new ArrayList<>(100)); + final ClusterRoleStore clusterRoleStore = new ClusterRoleStore() { volatile int epoch = 0; @@ -227,7 +229,7 @@ public boolean updateIfNodePresent(ClusterRole clusterRole) { } ClusterRole copy = this.copy(clusterRole); - ClusterRole newClusterRole = data.compute(copy.epoch(), (key, value) -> { + ClusterRole newClusterRole = this.data.compute(copy.epoch(), (key, value) -> { if (copy.epoch() > this.epoch) { this.epoch = copy.epoch(); Assert.assertNull(value); @@ -262,27 +264,27 @@ public Optional query() { Thread node1 = new Thread(() -> { Config config = new TestConfig("1"); RoleElectionStateMachine stateMachine = - new StandardRoleElectionStateMachine(config, clusterRoleStore); + new StandardRoleElectionStateMachine(config, clusterRoleStore); machines[1] = stateMachine; - stateMachine.apply(callback); + stateMachine.start(callback); stop.countDown(); }); Thread node2 = new Thread(() -> { Config config = new TestConfig("2"); RoleElectionStateMachine stateMachine = - new StandardRoleElectionStateMachine(config, clusterRoleStore); + new StandardRoleElectionStateMachine(config, clusterRoleStore); machines[2] = stateMachine; - stateMachine.apply(callback); + stateMachine.start(callback); stop.countDown(); }); Thread node3 = new Thread(() -> { Config config = new TestConfig("3"); RoleElectionStateMachine stateMachine = - new StandardRoleElectionStateMachine(config, clusterRoleStore); + new StandardRoleElectionStateMachine(config, clusterRoleStore); machines[3] = stateMachine; - stateMachine.apply(callback); + stateMachine.start(callback); stop.countDown(); }); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java index c6dcff4a87..415e804626 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java @@ -24,27 +24,24 @@ import java.util.Set; import org.apache.commons.configuration2.Configuration; -import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; -import org.apache.tinkerpop.gremlin.structure.Edge; -import org.apache.tinkerpop.gremlin.structure.Graph; -import org.apache.tinkerpop.gremlin.structure.T; -import org.apache.tinkerpop.gremlin.structure.Transaction; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.io.Io; - import org.apache.hugegraph.HugeGraph; -import org.apache.hugegraph.backend.id.Id; -import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.backend.store.BackendStoreInfo; import org.apache.hugegraph.io.HugeGraphIoRegistry; import org.apache.hugegraph.io.HugeGraphSONModule; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.perf.PerfUtil.Watched; import org.apache.hugegraph.schema.PropertyKey; import org.apache.hugegraph.schema.SchemaManager; import org.apache.hugegraph.task.TaskScheduler; import org.apache.hugegraph.testutil.Whitebox; import org.apache.hugegraph.type.define.IdStrategy; -import org.apache.hugegraph.type.define.NodeRole; +import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; +import org.apache.tinkerpop.gremlin.structure.Edge; +import org.apache.tinkerpop.gremlin.structure.Graph; +import org.apache.tinkerpop.gremlin.structure.T; +import org.apache.tinkerpop.gremlin.structure.Transaction; +import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.structure.io.Io; import com.google.common.collect.ImmutableSet; @@ -85,8 +82,7 @@ protected void initBackend() { assert sysInfo.exists() && !this.graph.closed(); } - Id id = IdGenerator.of("server-tinkerpop"); - this.graph.serverStarted(id, NodeRole.MASTER); + this.graph.serverStarted(GlobalMasterInfo.master("server-tinkerpop")); this.initedBackend = true; } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java index eb1fb6ad3b..458c2d8a9e 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/UnitTestSuite.java @@ -17,6 +17,7 @@ package org.apache.hugegraph.unit; +import org.apache.hugegraph.core.RoleElectionStateMachineTest; import org.apache.hugegraph.unit.cache.CacheManagerTest; import org.apache.hugegraph.unit.cache.CacheTest; import org.apache.hugegraph.unit.cache.CachedGraphTransactionTest; @@ -111,6 +112,7 @@ TraversalUtilTest.class, PageStateTest.class, SystemSchemaStoreTest.class, + RoleElectionStateMachineTest.class, /* serializer */ BytesBufferTest.class, diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java index 403bc62e99..ae431480c4 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/core/SecurityManagerTest.java @@ -32,23 +32,22 @@ import java.util.Map; import java.util.concurrent.TimeoutException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - import org.apache.hugegraph.HugeException; import org.apache.hugegraph.HugeFactory; import org.apache.hugegraph.HugeGraph; -import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.job.GremlinJob; import org.apache.hugegraph.job.JobBuilder; +import org.apache.hugegraph.masterelection.GlobalMasterInfo; import org.apache.hugegraph.security.HugeSecurityManager; import org.apache.hugegraph.task.HugeTask; import org.apache.hugegraph.testutil.Assert; -import org.apache.hugegraph.type.define.NodeRole; import org.apache.hugegraph.unit.FakeObjects; import org.apache.hugegraph.util.JsonUtil; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + import com.google.common.collect.ImmutableMap; public class SecurityManagerTest { @@ -319,7 +318,7 @@ private static HugeGraph loadGraph(boolean needClear) { graph.clearBackend(); } graph.initBackend(); - graph.serverStarted(IdGenerator.of("server1"), NodeRole.MASTER); + graph.serverStarted(GlobalMasterInfo.master("server1")); return graph; } From e8fb2696d6154f20fd4d6e45ca58763e69145116 Mon Sep 17 00:00:00 2001 From: Simon Cheung Date: Tue, 5 Dec 2023 21:50:02 +0800 Subject: [PATCH 34/51] chore: fix curl failed to request https urls (#2378) --- hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh index 64980403b1..fa3f94a215 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh @@ -141,7 +141,7 @@ function wait_for_startup() { return 1 fi - status=$(curl -I -s -w "%{http_code}" -o /dev/null "$server_url") + status=$(curl -I -s -k -w "%{http_code}" -o /dev/null "$server_url") if [[ $status -eq 200 || $status -eq 401 ]]; then echo "OK" echo "Started [pid $pid]" From 47aa8be8508293bbda76c93b461292efc84a75c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=AE=87?= <940643974@qq.com> Date: Thu, 7 Dec 2023 12:26:22 +0800 Subject: [PATCH 35/51] refact(api): update common 1.2 & fix jersey client code problem (#2365) * update common version and fix rest client problem * use stage * fix dependency issue * test * test * test * test * fix * chore: improve the ci logic * fix core-version * Empty test * fix code issue * fix: 3rd party changes * code optimize * refactor the AbsJerseyRestClient * fix code issue --------- Co-authored-by: imbajin --- .github/configs/settings.xml | 2 + .github/workflows/check-dependencies.yml | 6 +- .github/workflows/ci.yml | 43 +++-- .github/workflows/codeql-analysis.yml | 6 +- .github/workflows/licence-checker.yml | 2 + .../api/gremlin/AbstractJerseyRestClient.java | 158 ++++++++++++++++++ .../hugegraph/api/gremlin/GremlinClient.java | 66 +++++--- .../apache/hugegraph/version/ApiVersion.java | 5 + hugegraph-server/hugegraph-core/pom.xml | 28 +++- .../apache/hugegraph/version/CoreVersion.java | 24 +-- .../scripts/dependency/check_dependencies.sh | 17 +- .../scripts/dependency/known-dependencies.txt | 12 +- .../src/assembly/travis/install-backend.sh | 2 + .../src/assembly/travis/install-cassandra.sh | 1 - .../src/assembly/travis/install-hbase.sh | 2 +- .../backend/store/palo/PaloHttpClient.java | 15 +- hugegraph-server/pom.xml | 2 +- 17 files changed, 301 insertions(+), 90 deletions(-) create mode 100644 hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/AbstractJerseyRestClient.java diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml index 3fcc52dea3..294ded1cb2 100644 --- a/.github/configs/settings.xml +++ b/.github/configs/settings.xml @@ -5,7 +5,9 @@ The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index 119d55bb52..5350d53fe6 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -5,7 +5,7 @@ on: branches: - /^release-.*$/ pull_request: - + permissions: contents: read @@ -17,7 +17,7 @@ jobs: SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency steps: - name: Checkout source - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v3 with: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v3 # Refer: https://github.com/actions/dependency-review-action diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6d276e90a..5907bffa30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,48 +30,44 @@ jobs: JAVA_VERSION: [ '8', '11' ] steps: - - name: Install JDK ${{ matrix.JAVA_VERSION }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.JAVA_VERSION }} - distribution: 'zulu' - - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Compile - run: | - mvn clean compile -U -Dmaven.javadoc.skip=true -ntp - - - name: Install JDK 8 + # TODO: Remove this step after install-backend.sh updated + - name: Install Java8 for backend uses: actions/setup-java@v3 with: java-version: '8' distribution: 'zulu' - - name: Prepare env and service + + - name: Prepare backend environment run: | - $TRAVIS_DIR/install-backend.sh $BACKEND + $TRAVIS_DIR/install-backend.sh $BACKEND && jps -l - - name: Install JDK ${{ matrix.JAVA_VERSION }} + - name: Install Java ${{ matrix.JAVA_VERSION }} uses: actions/setup-java@v3 with: java-version: ${{ matrix.JAVA_VERSION }} distribution: 'zulu' - - name: use staged maven repo settings + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Use staged maven repo settings if: ${{ env.USE_STAGE == 'true' }} run: | cp $HOME/.m2/settings.xml /tmp/settings.xml - mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml + cp -vf .github/configs/settings.xml $HOME/.m2/settings.xml && cat $HOME/.m2/settings.xml + + - name: Compile + run: | + mvn clean compile -U -Dmaven.javadoc.skip=true -ntp - name: Run unit test run: | @@ -99,4 +95,5 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} file: ${{ env.REPORT_DIR }}/*.xml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 958e5b1bdc..9165bfda94 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,8 +4,8 @@ on: push: branches: [ master, release-* ] pull_request: - # The branches below must be a subset of the branches above - # branches: [ master ] # enable in all PR + # The branches below must be a subset of the branches above + # branches: [ master ] # enable in all PRs schedule: - cron: '33 0 * * 5' @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java JDK uses: actions/setup-java@v3 diff --git a/.github/workflows/licence-checker.yml b/.github/workflows/licence-checker.yml index 3d14cc0620..2510b44de1 100644 --- a/.github/workflows/licence-checker.yml +++ b/.github/workflows/licence-checker.yml @@ -10,6 +10,8 @@ on: jobs: check-license: runs-on: ubuntu-latest + env: + USE_STAGE: 'true' # Whether to include the stage repository. steps: - uses: actions/checkout@v4 diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/AbstractJerseyRestClient.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/AbstractJerseyRestClient.java new file mode 100644 index 0000000000..181abc46d5 --- /dev/null +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/AbstractJerseyRestClient.java @@ -0,0 +1,158 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.api.gremlin; + +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.http.pool.PoolStats; +import org.apache.hugegraph.util.ExecutorUtil; +import org.glassfish.jersey.apache.connector.ApacheClientProperties; +import org.glassfish.jersey.apache.connector.ApacheConnectorProvider; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.JerseyClientBuilder; +import org.glassfish.jersey.message.GZipEncoder; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.WebTarget; + +/** + * This class is a simplified class of AbstractRestClient from hugegraph-common. + * For some reason, we replace the rest implementation from jersey to okhttp. + * But GremlinClient still uses jersey-client to forward request, so we copy the old + * AbstractRestClient from hugegraph-common and rename the name to AbstractJerseyRestClient. + * Because we don't need the full feature of AbstractRestClient, so we reduce some useless code. + */ +public abstract class AbstractJerseyRestClient { + + /** + * Time unit: hour + */ + private static final long TTL = 24L; + /** + * Time unit: ms + */ + private static final long IDLE_TIME = 40L * 1000L; + private static final String PROPERTY_MAX_TOTAL = "maxTotal"; + private static final String PROPERTY_MAX_PER_ROUTE = "maxPerRoute"; + private static final String PROPERTY_IDLE_TIME = "idleTime"; + private static final String CONNECTION_MANAGER = ApacheClientProperties.CONNECTION_MANAGER; + + private final Client client; + private final WebTarget webTarget; + private final PoolingHttpClientConnectionManager pool; + private ScheduledExecutorService cleanExecutor; + + public AbstractJerseyRestClient(String url, int timeout, int maxTotal, int maxPerRoute) { + this(url, new ConfigBuilder().configTimeout(timeout) + .configPool(maxTotal, maxPerRoute) + .build()); + } + + public AbstractJerseyRestClient(String url, ClientConfig config) { + this.pool = configConnectionManager(config); + + this.client = JerseyClientBuilder.newClient(config); + this.client.register(GZipEncoder.class); + this.webTarget = this.client.target(url); + + cleanThreadPoolExecutor(config); + } + + private static PoolingHttpClientConnectionManager configConnectionManager(ClientConfig conf) { + /* + * Using httpclient with connection pooling, and configuring the + * jersey connector. But the jersey that has been released in the maven central + * repository seems to have a bug: https://github.com/jersey/jersey/pull/3752 + */ + PoolingHttpClientConnectionManager pool = + new PoolingHttpClientConnectionManager(TTL, TimeUnit.HOURS); + Integer maxTotal = (Integer) conf.getProperty(PROPERTY_MAX_TOTAL); + Integer maxPerRoute = (Integer) conf.getProperty(PROPERTY_MAX_PER_ROUTE); + + if (maxTotal != null) { + pool.setMaxTotal(maxTotal); + } + if (maxPerRoute != null) { + pool.setDefaultMaxPerRoute(maxPerRoute); + } + conf.property(CONNECTION_MANAGER, pool); + conf.connectorProvider(new ApacheConnectorProvider()); + return pool; + } + + private void cleanThreadPoolExecutor(ClientConfig config) { + this.cleanExecutor = ExecutorUtil.newScheduledThreadPool("conn-clean-worker-%d"); + Number idleTimeProp = (Number) config.getProperty(PROPERTY_IDLE_TIME); + final long idleTime = idleTimeProp == null ? IDLE_TIME : idleTimeProp.longValue(); + final long checkPeriod = idleTime / 2L; + this.cleanExecutor.scheduleWithFixedDelay(() -> { + PoolStats stats = this.pool.getTotalStats(); + int using = stats.getLeased() + stats.getPending(); + if (using > 0) { + // Do clean only when all connections are idle + return; + } + // Release connections when all clients are inactive + this.pool.closeIdleConnections(idleTime, TimeUnit.MILLISECONDS); + this.pool.closeExpiredConnections(); + }, checkPeriod, checkPeriod, TimeUnit.MILLISECONDS); + } + + protected WebTarget getWebTarget() { + return this.webTarget; + } + + public void close() { + try { + if (this.pool != null) { + this.pool.close(); + this.cleanExecutor.shutdownNow(); + } + } finally { + this.client.close(); + } + } + + private static class ConfigBuilder { + + private final ClientConfig config; + + ConfigBuilder() { + this.config = new ClientConfig(); + } + + public ConfigBuilder configTimeout(int timeout) { + this.config.property(ClientProperties.CONNECT_TIMEOUT, timeout); + this.config.property(ClientProperties.READ_TIMEOUT, timeout); + return this; + } + + public ConfigBuilder configPool(int maxTotal, int maxPerRoute) { + this.config.property(PROPERTY_MAX_TOTAL, maxTotal); + this.config.property(PROPERTY_MAX_PER_ROUTE, maxPerRoute); + return this; + } + + public ClientConfig build() { + return this.config; + } + } +} diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java index 793884e4da..72af6e8cb1 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/gremlin/GremlinClient.java @@ -20,6 +20,9 @@ import java.util.List; import java.util.Map; +import org.apache.hugegraph.api.filter.CompressInterceptor; +import org.apache.hugegraph.util.E; + import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.HttpHeaders; @@ -27,43 +30,52 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; -import org.apache.hugegraph.api.filter.CompressInterceptor; -import org.apache.hugegraph.rest.AbstractRestClient; -import org.apache.hugegraph.testutil.Whitebox; -import org.apache.hugegraph.util.E; - -public class GremlinClient extends AbstractRestClient { - - private final WebTarget webTarget; +/** + * GremlinClient is a client for interacting with a Gremlin server. + * It extends the AbstractJerseyRestClient and provides methods for sending GET and POST requests. + */ +public class GremlinClient extends AbstractJerseyRestClient { - public GremlinClient(String url, int timeout, - int maxTotal, int maxPerRoute) { + /** + * Constructs a GremlinClient with the specified URL, timeout, maxTotal, and maxPerRoute. + * + * @param url The URL of the Gremlin server this client will interact with. + * @param timeout The timeout for the client. + * @param maxTotal The maximum total connections for the client. + * @param maxPerRoute The maximum connections per route for the client. + */ + public GremlinClient(String url, int timeout, int maxTotal, int maxPerRoute) { super(url, timeout, maxTotal, maxPerRoute); - this.webTarget = Whitebox.getInternalState(this, "target"); - E.checkNotNull(this.webTarget, "target"); - } - - @Override - protected void checkStatus(Response response, Response.Status... statuses) { - // pass } + /** + * Sends a POST request to the Gremlin server. + * + * @param auth The authorization token for the request. + * @param req The body of the request. + * @return The response from the server. + */ public Response doPostRequest(String auth, String req) { Entity body = Entity.entity(req, MediaType.APPLICATION_JSON); - return this.webTarget.request() - .header(HttpHeaders.AUTHORIZATION, auth) - .accept(MediaType.APPLICATION_JSON) - .acceptEncoding(CompressInterceptor.GZIP) - .post(body); + return this.getWebTarget().request() + .header(HttpHeaders.AUTHORIZATION, auth) + .accept(MediaType.APPLICATION_JSON) + .acceptEncoding(CompressInterceptor.GZIP) + .post(body); } - public Response doGetRequest(String auth, - MultivaluedMap params) { - WebTarget target = this.webTarget; + /** + * Sends a GET request to the Gremlin server. + * + * @param auth The authorization token for the request. + * @param params The query parameters for the request. + * @return The response from the server. + */ + public Response doGetRequest(String auth, MultivaluedMap params) { + WebTarget target = this.getWebTarget(); for (Map.Entry> entry : params.entrySet()) { E.checkArgument(entry.getValue().size() == 1, - "Invalid query param '%s', can only accept " + - "one value, but got %s", + "Invalid query param '%s', can only accept one value, but got %s", entry.getKey(), entry.getValue()); target = target.queryParam(entry.getKey(), entry.getValue().get(0)); } diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java index a6b7f7c241..c75f65ab82 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/version/ApiVersion.java @@ -20,6 +20,11 @@ import org.apache.hugegraph.util.VersionUtil; import org.apache.hugegraph.util.VersionUtil.Version; +/** + * This class represents the API version of the HugeGraph system. + * It contains a version number and a method to check the compatibility + * with the core version of the system. + */ public final class ApiVersion { /* diff --git a/hugegraph-server/hugegraph-core/pom.xml b/hugegraph-server/hugegraph-core/pom.xml index de312c9378..bdbb2ace43 100644 --- a/hugegraph-server/hugegraph-core/pom.xml +++ b/hugegraph-server/hugegraph-core/pom.xml @@ -14,8 +14,8 @@ License for the specific language governing permissions and limitations under the License. --> - 4.0.0 @@ -52,6 +52,23 @@ hugegraph-common + + + org.glassfish.jersey.core + jersey-client + ${jersey.version} + + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey.version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey.version} + + org.apache.tinkerpop @@ -287,10 +304,13 @@ protobuf-maven-plugin 0.6.1 - com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + + com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + protoc-java ${project.basedir}/src/main/resources/proto - ${basedir}/target/generated-sources/protobuf/java + ${basedir}/target/generated-sources/protobuf/java + diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java index 480236ffb6..46b84ebfe9 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java @@ -22,22 +22,24 @@ public class CoreVersion { - static { - // Check versions of the dependency packages - CoreVersion.check(); - } - public static final String NAME = "hugegraph-core"; - public static final String DEFAULT_VERSION = "1.5.0"; - - // The second parameter of Version.of() is for IDE running without JAR + /** + * The second parameter of Version.of() is for IDE running without JAR + */ public static final Version VERSION = Version.of(CoreVersion.class, DEFAULT_VERSION); + /** + * Update it when the gremlin version changed, search "tinkerpop.version" in pom + */ + public static final String GREMLIN_VERSION = "3.5.1"; - public static final String GREMLIN_VERSION = "3.4.3"; + static { + // Check versions of the dependency packages + CoreVersion.check(); + } public static void check() { - // Check version of hugegraph-common - VersionUtil.check(CommonVersion.VERSION, "1.0", "1.1", CommonVersion.NAME); + // Check the version of hugegraph-common + VersionUtil.check(CommonVersion.VERSION, "1.0", "1.35", CommonVersion.NAME); } } diff --git a/hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh b/hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh index 309063faa5..024c05e35e 100644 --- a/hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh +++ b/hugegraph-server/hugegraph-dist/scripts/dependency/check_dependencies.sh @@ -16,17 +16,20 @@ # under the License. # -BASE_PATH=$(cd $(dirname $0); pwd) +BASE_PATH=$( + cd "$(dirname "$0")" || exit 1 + 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 +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 +if [ -s "${BASE_PATH}"/result.txt ]; then + cat "${BASE_PATH}"/result.txt + exit 1 else - echo 'All third dependencies is known!' + echo 'All third dependencies is known!' fi diff --git a/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt index 0069eea761..92e406a122 100644 --- a/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -2,6 +2,7 @@ accessors-smart-1.2.jar airline-0.8.jar animal-sniffer-annotations-1.19.jar annotations-4.1.1.4.jar +annotations-13.0.jar ansj_seg-5.1.6.jar antlr-runtime-3.5.2.jar aopalliance-repackaged-3.0.1.jar @@ -45,6 +46,7 @@ commons-configuration2-2.8.0.jar commons-io-2.7.jar commons-lang-2.6.jar commons-lang3-3.11.jar +commons-lang3-3.12.0.jar commons-logging-1.1.1.jar commons-logging-1.2.jar commons-math3-3.2.jar @@ -127,6 +129,7 @@ jackson-jaxrs-base-2.14.0-rc1.jar jackson-jaxrs-json-provider-2.14.0-rc1.jar jackson-module-jakarta-xmlbind-annotations-2.15.2.jar jackson-module-jaxb-annotations-2.14.0-rc1.jar +jakarta.activation-2.0.0.jar jakarta.activation-2.0.1.jar jakarta.activation-api-1.2.2.jar jakarta.annotation-api-2.0.0.jar @@ -134,7 +137,7 @@ jakarta.inject-api-2.0.0.jar jakarta.servlet-api-5.0.0.jar jakarta.validation-api-3.0.0.jar jakarta.ws.rs-api-3.0.0.jar -jakarta.xml.bind-api-4.0.0-RC2.jar +jakarta.xml.bind-api-3.0.0.jar jamm-0.3.2.jar java-cup-runtime-11b-20160615.jar javapoet-1.8.0.jar @@ -201,10 +204,15 @@ kerby-config-2.0.0.jar kerby-pkix-2.0.0.jar kerby-util-2.0.0.jar kerby-xdr-2.0.0.jar +kotlin-stdlib-1.6.20.jar +kotlin-stdlib-common-1.5.31.jar +kotlin-stdlib-jdk7-1.6.10.jar +kotlin-stdlib-jdk8-1.6.10.jar listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar log4j-api-2.17.1.jar log4j-core-2.17.1.jar log4j-slf4j-impl-2.17.1.jar +logging-interceptor-4.10.0.jar lookout-api-1.4.1.jar lucene-analyzers-common-8.11.2.jar lucene-analyzers-smartcn-8.11.2.jar @@ -232,6 +240,8 @@ nlp-lang-1.7.7.jar objenesis-2.6.jar ohc-core-0.7.4.jar ohc-core-j8-0.5.1.jar +okhttp-4.10.0.jar +okio-jvm-3.0.0.jar opentracing-api-0.22.0.jar opentracing-mock-0.22.0.jar opentracing-noop-0.22.0.jar diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh index 64c53a875b..21e2f11e6b 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-backend.sh @@ -31,12 +31,14 @@ fi case $BACKEND in cassandra) + # TODO: replace it with docker "$TRAVIS_DIR"/install-cassandra.sh ;; scylladb) "$TRAVIS_DIR"/install-scylladb.sh ;; hbase) + # TODO: replace it with hbase2.3+ to avoid java8 env "$TRAVIS_DIR"/install-hbase.sh ;; mysql) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh index 2bdfe0bf6a..d83d890dee 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-cassandra.sh @@ -17,7 +17,6 @@ # set -ev -TRAVIS_DIR=`dirname $0` CASS_DOWNLOAD_ADDRESS="http://archive.apache.org/dist/cassandra" CASS_VERSION="4.0.10" CASS_PACKAGE="apache-cassandra-${CASS_VERSION}" diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh index 9de48f277e..bdee3e75ab 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hbase.sh @@ -17,7 +17,7 @@ # set -ev -TRAVIS_DIR=`dirname $0` +TRAVIS_DIR=$(dirname $0) HBASE_DOWNLOAD_ADDRESS="http://archive.apache.org/dist/hbase" HBASE_VERSION="2.0.2" HBASE_PACKAGE="hbase-${HBASE_VERSION}" diff --git a/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java index 8ee2f94129..281746e2ee 100644 --- a/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java +++ b/hugegraph-server/hugegraph-palo/src/main/java/org/apache/hugegraph/backend/store/palo/PaloHttpClient.java @@ -19,15 +19,15 @@ import java.util.Map; -import jakarta.ws.rs.core.MultivaluedHashMap; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.Response; - import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.rest.AbstractRestClient; import org.apache.hugegraph.rest.RestClient; +import org.apache.hugegraph.rest.RestHeaders; + import com.google.common.collect.ImmutableMap; +import okhttp3.Response; + public class PaloHttpClient { private final RestClient client; @@ -51,8 +51,8 @@ public void bulkLoadAsync(String table, String body, String label) { // Format path String path = table + "/_load"; // Format headers - MultivaluedMap headers = new MultivaluedHashMap<>(); - headers.putSingle("Expect", "100-continue"); + RestHeaders headers = new RestHeaders(); + headers.add("Expect", "100-continue"); // Format params Map params = ImmutableMap.of("label", label); // Send request @@ -68,8 +68,7 @@ public Client(String url, String user, String password, int timeout) { } @Override - protected void checkStatus(Response response, - Response.Status... statuses) { + protected void checkStatus(Response response, int... statuses) { // pass } } diff --git a/hugegraph-server/pom.xml b/hugegraph-server/pom.xml index 6ab44d9bd0..2d5a51cb99 100644 --- a/hugegraph-server/pom.xml +++ b/hugegraph-server/pom.xml @@ -57,7 +57,7 @@ bash 3.1.2 8.45 - 1.0.0 + 1.2.0 1.47.0 3.21.7 1.36 From c997f35b0475e94a98748dda636cb9bfa78fda77 Mon Sep 17 00:00:00 2001 From: M <87920097+msgui@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:59:28 +0800 Subject: [PATCH 36/51] fix(api): correct the vertex id in the edge-existence api (#2380) --- .../apache/hugegraph/api/traversers/EdgeExistenceAPI.java | 5 +++-- .../traversal/algorithm/EdgeExistenceTraverser.java | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java index 6ffec166e1..4af3ff52fa 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/EdgeExistenceAPI.java @@ -22,6 +22,7 @@ import java.util.Iterator; import org.apache.hugegraph.HugeGraph; +import org.apache.hugegraph.api.graph.VertexAPI; import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.core.GraphManager; import org.apache.hugegraph.structure.HugeVertex; @@ -72,8 +73,8 @@ public String get(@Context GraphManager manager, E.checkArgumentNotNull(source, "The source can't be null"); E.checkArgumentNotNull(target, "The target can't be null"); - Id sourceId = HugeVertex.getIdValue(source); - Id targetId = HugeVertex.getIdValue(target); + Id sourceId = VertexAPI.checkAndParseVertexId(source); + Id targetId = VertexAPI.checkAndParseVertexId(target); HugeGraph hugegraph = graph(manager, graph); EdgeExistenceTraverser traverser = new EdgeExistenceTraverser(hugegraph); Iterator edges = traverser.queryEdgeExistence(sourceId, targetId, edgeLabel, diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java index a7005ad867..38f92daa30 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/EdgeExistenceTraverser.java @@ -42,16 +42,15 @@ public Iterator queryEdgeExistence(Id sourceId, Id targetId, String label, return queryByNeighbors(sourceId, targetId, limit); } - Id edgeLabelId = getEdgeLabelId(label); - EdgeLabel edgeLabel = graph().edgeLabel(edgeLabelId); + EdgeLabel edgeLabel = graph().edgeLabel(label); ConditionQuery conditionQuery = new ConditionQuery(HugeType.EDGE); conditionQuery.eq(HugeKeys.OWNER_VERTEX, sourceId); conditionQuery.eq(HugeKeys.OTHER_VERTEX, targetId); - conditionQuery.eq(HugeKeys.LABEL, edgeLabelId); + conditionQuery.eq(HugeKeys.LABEL, edgeLabel.id()); conditionQuery.eq(HugeKeys.DIRECTION, Directions.OUT); conditionQuery.limit(limit); - if (edgeLabel.existSortKeys()) { + if (edgeLabel.existSortKeys() && !sortValues.isEmpty()) { conditionQuery.eq(HugeKeys.SORT_VALUES, sortValues); } else { conditionQuery.eq(HugeKeys.SORT_VALUES, ""); From bfe9fae150446857412db23ada0dae9d05035837 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Sat, 9 Dec 2023 22:02:49 +0800 Subject: [PATCH 37/51] chore: reset hugegraph version to 1.2.0 (#2382) * chore: reset version to 1.2.0 * chore: add README for three submodules * fix: README.md * fix: README.md * fix: README.md * fix: README.md --- hugegraph-pd/README.md | 5 +++++ hugegraph-server/Dockerfile | 2 +- hugegraph-server/README.md | 11 +++++++++++ .../apache/hugegraph/version/CoreVersion.java | 2 +- hugegraph-server/hugegraph-dist/pom.xml | 16 ++++++++++++++++ hugegraph-server/pom.xml | 11 +++++++++++ hugegraph-store/README.md | 5 +++++ pom.xml | 2 +- 8 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 hugegraph-server/README.md diff --git a/hugegraph-pd/README.md b/hugegraph-pd/README.md index e69de29bb2..49548c216d 100644 --- a/hugegraph-pd/README.md +++ b/hugegraph-pd/README.md @@ -0,0 +1,5 @@ +# HugeGraph PD + +HugeGraph PD is a meta server responsible for service discovery, partition information storage, and node scheduling. + +> Note: Currently, the contents of this folder are empty. Starting from revision 1.5.0, the code of HugeGraph PD will be adapted to this location (WIP). diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 93368487a9..a28e63ea13 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -26,7 +26,7 @@ RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l # 2nd stage: runtime env FROM openjdk:11-slim # TODO: get the version from the pom.xml -ENV version=1.5.0 +ENV version=1.2.0 COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-$version/ /hugegraph-server LABEL maintainer="HugeGraph Docker Maintainers " diff --git a/hugegraph-server/README.md b/hugegraph-server/README.md new file mode 100644 index 0000000000..f2c3ceee7f --- /dev/null +++ b/hugegraph-server/README.md @@ -0,0 +1,11 @@ +# HugeGraph Server + +HugeGraph Server consists of two layers of functionality: the graph engine layer, and the storage layer. + +- Graph Engine Layer: + - REST Server: Provides a RESTful API for querying graph/schema information, supports the [Gremlin](https://tinkerpop.apache.org/gremlin.html) and [Cypher](https://en.wikipedia.org/wiki/Cypher) query languages, and offers APIs for service monitoring and operations. + - Graph Engine: Supports both OLTP and OLAP graph computation types, with OLTP implementing the [Apache TinkerPop3](https://tinkerpop.apache.org) framework. + - Backend Interface: Implements the storage of graph data to the backend. + +- Storage Layer: + - Storage Backend: Supports multiple built-in storage backends (RocksDB/MySQL/HBase/...) and allows users to extend custom backends without modifying the existing source code. diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java index 46b84ebfe9..f3c277b67c 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java @@ -23,7 +23,7 @@ public class CoreVersion { public static final String NAME = "hugegraph-core"; - public static final String DEFAULT_VERSION = "1.5.0"; + public static final String DEFAULT_VERSION = "1.2.0"; /** * The second parameter of Version.of() is for IDE running without JAR */ diff --git a/hugegraph-server/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml index 9a58ac767f..cdec80950b 100644 --- a/hugegraph-server/hugegraph-dist/pom.xml +++ b/hugegraph-server/hugegraph-dist/pom.xml @@ -293,6 +293,22 @@ + + + + + + + + + + + diff --git a/hugegraph-server/pom.xml b/hugegraph-server/pom.xml index 2d5a51cb99..e5f09d22eb 100644 --- a/hugegraph-server/pom.xml +++ b/hugegraph-server/pom.xml @@ -310,6 +310,17 @@ ${final.name} + + + + ../${project.basedir} + + *.tar.gz + + + + ../${final.name} + diff --git a/hugegraph-store/README.md b/hugegraph-store/README.md index e69de29bb2..bef8b53c8a 100644 --- a/hugegraph-store/README.md +++ b/hugegraph-store/README.md @@ -0,0 +1,5 @@ +# HugeGraph Store + +HugeGraph Store is a new built-in storage backend, which uses RocksDB as the distributed backend storage engine. + +> Note: Currently, the contents of this folder are empty. Starting from revision 1.5.0, the code of HugeGraph Store will be adapted to this location (WIP). diff --git a/pom.xml b/pom.xml index f5e44e42dd..6917da79f6 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ - 1.5.0 + 1.2.0 From bd5d68f0f2cca3470473453e7d606472fb77e0c6 Mon Sep 17 00:00:00 2001 From: imbajin Date: Mon, 11 Dec 2023 22:21:08 +0800 Subject: [PATCH 38/51] refact(rocksdb): clean & reformat some code (#2200) * chore: merge master to clean-rocksdb for synchronization (#2383) --------- Co-authored-by: V_Galaxy --- .../hugegraph/backend/store/BackendTable.java | 14 +- .../backend/store/rocksdb/OpenedRocksDB.java | 20 +- .../store/rocksdb/RocksDBIngester.java | 14 +- .../store/rocksdb/RocksDBIteratorPool.java | 20 +- .../backend/store/rocksdb/RocksDBMetrics.java | 79 ++---- .../backend/store/rocksdb/RocksDBOptions.java | 11 +- .../store/rocksdb/RocksDBSessions.java | 25 +- .../store/rocksdb/RocksDBStdSessions.java | 245 +++++++----------- .../backend/store/rocksdb/RocksDBStore.java | 113 +++----- .../backend/store/rocksdb/RocksDBTable.java | 21 +- .../backend/store/rocksdb/RocksDBTables.java | 14 +- .../store/rocksdbsst/RocksDBSstSessions.java | 52 ++-- .../store/rocksdbsst/RocksDBSstStore.java | 33 +-- .../unit/rocksdb/BaseRocksDBUnitTest.java | 17 +- .../unit/rocksdb/RocksDBCountersTest.java | 9 +- .../unit/rocksdb/RocksDBPerfTest.java | 34 ++- .../unit/rocksdb/RocksDBSessionTest.java | 61 +++-- .../unit/rocksdb/RocksDBSessionsTest.java | 13 +- .../serializer/BinaryBackendEntryTest.java | 4 +- .../BinaryScatterSerializerTest.java | 8 +- .../unit/serializer/BinarySerializerTest.java | 5 +- 21 files changed, 320 insertions(+), 492 deletions(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java index 62d14782df..505739aefa 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendTable.java @@ -33,6 +33,7 @@ import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.NumericUtil; import org.apache.hugegraph.util.StringEncoding; + import com.google.common.collect.ImmutableList; public abstract class BackendTable { @@ -91,7 +92,8 @@ public void updateIfAbsent(Session session, Entry entry) { } /** - * Mapping query-type to table-type + * Mapping query-type to table-type + * * @param query origin query * @return corresponding table type */ @@ -231,12 +233,11 @@ protected long maxKey() { public static class Range { - private byte[] startKey; - private byte[] endKey; + private final byte[] startKey; + private final byte[] endKey; public Range(byte[] startKey, byte[] endKey) { - this.startKey = Arrays.equals(EMPTY, startKey) ? - START_BYTES : startKey; + this.startKey = Arrays.equals(EMPTY, startKey) ? START_BYTES : startKey; this.endKey = Arrays.equals(EMPTY, endKey) ? END_BYTES : endKey; } @@ -361,8 +362,7 @@ public static byte[] increase(byte[] array) { private static byte[] align(byte[] array, int length) { int len = array.length; E.checkArgument(len <= length, - "The length of array '%s' exceed " + - "align length '%s'", len, length); + "The length of array '%s' exceed align length '%s'", len, length); byte[] target = new byte[length]; System.arraycopy(array, 0, target, length - len, len); return target; diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java index 91e02878aa..c62ab12115 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/OpenedRocksDB.java @@ -27,17 +27,16 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.io.FileUtils; +import org.apache.hugegraph.backend.BackendException; +import org.apache.hugegraph.backend.store.rocksdb.RocksDBIteratorPool.ReusedRocksIterator; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; import org.rocksdb.Checkpoint; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.RocksDB; import org.rocksdb.SstFileManager; import org.slf4j.Logger; -import org.apache.hugegraph.backend.BackendException; -import org.apache.hugegraph.backend.store.rocksdb.RocksDBIteratorPool.ReusedRocksIterator; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; - public class OpenedRocksDB implements AutoCloseable { private static final Logger LOG = Log.logger(OpenedRocksDB.class); @@ -118,8 +117,7 @@ public void createCheckpoint(String targetPath) { tempFile, snapshotFile)); } } catch (Exception e) { - throw new BackendException("Failed to create checkpoint at path %s", - e, targetPath); + throw new BackendException("Failed to create checkpoint at path %s", e, targetPath); } } @@ -137,8 +135,7 @@ public CFHandle(RocksDB rocksdb, ColumnFamilyHandle handle) { } public synchronized ColumnFamilyHandle get() { - E.checkState(this.handle.isOwningHandle(), - "It seems CF has been closed"); + E.checkState(this.handle.isOwningHandle(), "It seems CF has been closed"); assert this.refs.get() >= 1; return this.handle; } @@ -163,7 +160,7 @@ public void close() { public synchronized ColumnFamilyHandle waitForDrop() { assert this.refs.get() >= 1; - // When entering this method, the refs won't increase any more + // When entering this method, the refs won't increase anymore final long timeout = TimeUnit.MINUTES.toMillis(30L); final long unit = 100L; for (long i = 1; this.refs.get() > 1; i++) { @@ -173,8 +170,7 @@ public synchronized ColumnFamilyHandle waitForDrop() { // 30s rest api timeout may cause InterruptedException } if (i * unit > timeout) { - throw new BackendException("Timeout after %sms to drop CF", - timeout); + throw new BackendException("Timeout after %sms to drop CF", timeout); } } assert this.refs.get() == 1; diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java index ab89e19efc..fa30a389b5 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIngester.java @@ -27,15 +27,14 @@ import java.util.ArrayList; import java.util.List; +import org.apache.hugegraph.backend.BackendException; +import org.apache.hugegraph.util.Log; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.IngestExternalFileOptions; import org.rocksdb.RocksDB; import org.rocksdb.RocksDBException; import org.slf4j.Logger; -import org.apache.hugegraph.backend.BackendException; -import org.apache.hugegraph.util.Log; - public class RocksDBIngester { public static final String SST = ".sst"; @@ -52,8 +51,7 @@ public RocksDBIngester(RocksDB rocksdb) { this.options.setMoveFiles(true); } - public List ingest(Path path, ColumnFamilyHandle cf) - throws RocksDBException { + public List ingest(Path path, ColumnFamilyHandle cf) throws RocksDBException { SuffixFileVisitor visitor = new SuffixFileVisitor(SST); try { Files.walkFileTree(path, visitor); @@ -74,10 +72,8 @@ public List ingest(Path path, ColumnFamilyHandle cf) return ssts; } - public void ingest(ColumnFamilyHandle cf, List ssts) - throws RocksDBException { - LOG.info("Ingest sst files to CF '{}': {}", - RocksDBStdSessions.decode(cf.getName()), ssts); + public void ingest(ColumnFamilyHandle cf, List ssts) throws RocksDBException { + LOG.info("Ingest sst files to CF '{}': {}", RocksDBStdSessions.decode(cf.getName()), ssts); if (!ssts.isEmpty()) { this.rocksdb.ingestExternalFile(cf, ssts, this.options); } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java index 7aad1407ef..b4c6d3e2c1 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBIteratorPool.java @@ -20,17 +20,16 @@ import java.util.Queue; import java.util.concurrent.ArrayBlockingQueue; +import org.apache.hugegraph.backend.BackendException; +import org.apache.hugegraph.config.CoreOptions; +import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.util.StringEncoding; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.RocksDB; import org.rocksdb.RocksDBException; import org.rocksdb.RocksIterator; import org.slf4j.Logger; -import org.apache.hugegraph.backend.BackendException; -import org.apache.hugegraph.config.CoreOptions; -import org.apache.hugegraph.util.Log; -import org.apache.hugegraph.util.StringEncoding; - public final class RocksDBIteratorPool implements AutoCloseable { private static final Logger LOG = Log.logger(RocksDBIteratorPool.class); @@ -63,9 +62,8 @@ public ReusedRocksIterator newIterator() { @Override public void close() { - LOG.debug("Close IteratorPool with pool size {} ({})", - this.pool.size(), this); - for (RocksIterator iter; (iter = this.pool.poll()) != null;) { + LOG.debug("Close IteratorPool with pool size {} ({})", this.pool.size(), this); + for (RocksIterator iter; (iter = this.pool.poll()) != null; ) { this.closeIterator(iter); } assert this.pool.isEmpty(); @@ -149,13 +147,13 @@ private void closeIterator(RocksIterator iter) { protected final class ReusedRocksIterator { - private static final boolean EREUSING_ENABLED = false; + private static final boolean REUSING_ENABLED = false; private final RocksIterator iterator; private boolean closed; public ReusedRocksIterator() { this.closed = false; - if (EREUSING_ENABLED) { + if (REUSING_ENABLED) { this.iterator = allocIterator(); } else { this.iterator = createIterator(); @@ -173,7 +171,7 @@ public void close() { } this.closed = true; - if (EREUSING_ENABLED) { + if (REUSING_ENABLED) { releaseIterator(this.iterator); } else { closeIterator(this.iterator); diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java index 61462d6f80..6547eaf76c 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBMetrics.java @@ -24,6 +24,7 @@ import org.apache.hugegraph.util.Bytes; import org.apache.hugegraph.util.InsertionOrderUtil; import org.apache.hugegraph.util.UnitUtil; + import com.google.common.collect.ImmutableMap; public class RocksDBMetrics implements BackendMetrics { @@ -32,61 +33,37 @@ public class RocksDBMetrics implements BackendMetrics { private static final String PREFIX = "rocksdb."; // memory - private static final String BLOCK_CACHE = PREFIX + - "block-cache-usage"; - private static final String BLOCK_CACHE_PINNED = PREFIX + - "block-cache-pinned-usage"; - private static final String BLOCK_CACHE_CAPACITY = PREFIX + - "block-cache-capacity"; - private static final String INDEX_FILTER = PREFIX + - "estimate-table-readers-mem"; - private static final String ALL_MEM_TABLE = PREFIX + - "size-all-mem-tables"; - private static final String CUR_MEM_TABLE = PREFIX + - "cur-size-all-mem-tables"; + private static final String BLOCK_CACHE = PREFIX + "block-cache-usage"; + private static final String BLOCK_CACHE_PINNED = PREFIX + "block-cache-pinned-usage"; + private static final String BLOCK_CACHE_CAPACITY = PREFIX + "block-cache-capacity"; + private static final String INDEX_FILTER = PREFIX + "estimate-table-readers-mem"; + private static final String ALL_MEM_TABLE = PREFIX + "size-all-mem-tables"; + private static final String CUR_MEM_TABLE = PREFIX + "cur-size-all-mem-tables"; // disk - private static final String DISK_USAGE = PREFIX + - "disk-usage"; - private static final String LIVE_DATA_SIZE = PREFIX + - "estimate-live-data-size"; - private static final String SST_FILE_SIZE = PREFIX + - "total-sst-files-size"; - private static final String LIVE_SST_FILE_SIZE = PREFIX + - "live-sst-files-size"; + private static final String DISK_USAGE = PREFIX + "disk-usage"; + private static final String LIVE_DATA_SIZE = PREFIX + "estimate-live-data-size"; + private static final String SST_FILE_SIZE = PREFIX + "total-sst-files-size"; + private static final String LIVE_SST_FILE_SIZE = PREFIX + "live-sst-files-size"; private static final String PENDING_COMPACTION_BYTES = PREFIX + - "estimate-pending-compaction-bytes"; + "estimate-pending-compaction-bytes"; // count/number - private static final String NUM_KEYS = PREFIX + - "estimate-num-keys"; - private static final String NUM_KEYS_MEM_TABLE = PREFIX + - "num-entries-active-mem-table"; - private static final String NUM_KEYS_IMM_MEM_TABLE = PREFIX + - "num-entries-imm-mem-tables"; - private static final String NUM_DELETES_MEM_TABLE = PREFIX + - "num-deletes-active-mem-table"; - private static final String NUM_DELETES_IMM_MEM_TABLE = PREFIX + - "num-deletes-imm-mem-tables"; - - private static final String RUNNING_FLUSHS = PREFIX + - "num-running-flushes"; - private static final String MEM_TABLE_FLUSH_PENDINF = PREFIX + - "mem-table-flush-pending"; - private static final String RUNNING_COMPACTIONS = PREFIX + - "num-running-compactions"; - private static final String COMPACTION_PENDINF = PREFIX + - "compaction-pending"; - - private static final String NUM_IMM_MEM_TABLE = PREFIX + - "num-immutable-mem-table"; - private static final String NUM_SNAPSHOTS = PREFIX + - "num-snapshots"; - private static final String OLDEST_SNAPSHOT_TIME = PREFIX + - "oldest-snapshot-time"; - private static final String NUM_LIVE_VERSIONS = PREFIX + - "num-live-versions"; - private static final String SUPER_VERSION = PREFIX + - "current-super-version-number"; + private static final String NUM_KEYS = PREFIX + "estimate-num-keys"; + private static final String NUM_KEYS_MEM_TABLE = PREFIX + "num-entries-active-mem-table"; + private static final String NUM_KEYS_IMM_MEM_TABLE = PREFIX + "num-entries-imm-mem-tables"; + private static final String NUM_DELETES_MEM_TABLE = PREFIX + "num-deletes-active-mem-table"; + private static final String NUM_DELETES_IMM_MEM_TABLE = PREFIX + "num-deletes-imm-mem-tables"; + + private static final String RUNNING_FLUSHS = PREFIX + "num-running-flushes"; + private static final String MEM_TABLE_FLUSH_PENDINF = PREFIX + "mem-table-flush-pending"; + private static final String RUNNING_COMPACTIONS = PREFIX + "num-running-compactions"; + private static final String COMPACTION_PENDINF = PREFIX + "compaction-pending"; + + private static final String NUM_IMM_MEM_TABLE = PREFIX + "num-immutable-mem-table"; + private static final String NUM_SNAPSHOTS = PREFIX + "num-snapshots"; + private static final String OLDEST_SNAPSHOT_TIME = PREFIX + "oldest-snapshot-time"; + private static final String NUM_LIVE_VERSIONS = PREFIX + "num-live-versions"; + private static final String SUPER_VERSION = PREFIX + "current-super-version-number"; public static final String KEY_DISK_USAGE = DISK_USAGE; public static final String KEY_NUM_KEYS = NUM_KEYS; diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java index a696b6cc3c..cb0b74a5d1 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java @@ -23,17 +23,17 @@ import static org.apache.hugegraph.config.OptionChecker.rangeDouble; import static org.apache.hugegraph.config.OptionChecker.rangeInt; -import org.rocksdb.CompactionStyle; -import org.rocksdb.CompressionType; -import org.rocksdb.DataBlockIndexType; -import org.rocksdb.IndexType; - import org.apache.hugegraph.config.ConfigConvOption; import org.apache.hugegraph.config.ConfigListConvOption; import org.apache.hugegraph.config.ConfigListOption; import org.apache.hugegraph.config.ConfigOption; import org.apache.hugegraph.config.OptionHolder; import org.apache.hugegraph.util.Bytes; +import org.rocksdb.CompactionStyle; +import org.rocksdb.CompressionType; +import org.rocksdb.DataBlockIndexType; +import org.rocksdb.IndexType; + import com.google.common.collect.ImmutableList; public class RocksDBOptions extends OptionHolder { @@ -52,6 +52,7 @@ public static synchronized RocksDBOptions instance() { return instance; } + // TODO: the entire align style is wrong, change it to 4 space later public static final ConfigOption DATA_PATH = new ConfigOption<>( "rocksdb.data_path", diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java index 8614d6b737..474f55db8f 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBSessions.java @@ -21,12 +21,11 @@ import java.util.Set; import org.apache.commons.lang3.tuple.Pair; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; import org.apache.hugegraph.backend.store.BackendSession.AbstractBackendSession; import org.apache.hugegraph.backend.store.BackendSessionPool; import org.apache.hugegraph.config.HugeConfig; +import org.rocksdb.RocksDBException; public abstract class RocksDBSessions extends BackendSessionPool { @@ -46,8 +45,7 @@ public RocksDBSessions(HugeConfig config, String database, String store) { public abstract void compactRange(); - public abstract RocksDBSessions copy(HugeConfig config, - String database, String store); + public abstract RocksDBSessions copy(HugeConfig config, String database, String store); public abstract void createSnapshot(String snapshotPath); @@ -55,8 +53,7 @@ public abstract RocksDBSessions copy(HugeConfig config, public abstract String buildSnapshotPath(String snapshotPrefix); - public abstract String hardLinkSnapshot(String snapshotPath) - throws RocksDBException; + public abstract String hardLinkSnapshot(String snapshotPath) throws RocksDBException; public abstract void reloadRocksDB() throws RocksDBException; @@ -105,22 +102,16 @@ public abstract void deleteRange(String table, public abstract byte[] get(String table, byte[] key); - public abstract BackendColumnIterator get(String table, - List keys); + public abstract BackendColumnIterator get(String table, List keys); public abstract BackendColumnIterator scan(String table); - public abstract BackendColumnIterator scan(String table, - byte[] prefix); + public abstract BackendColumnIterator scan(String table, byte[] prefix); - public abstract BackendColumnIterator scan(String table, - byte[] keyFrom, - byte[] keyTo, - int scanType); + public abstract BackendColumnIterator scan(String table, byte[] keyFrom, + byte[] keyTo, int scanType); - public BackendColumnIterator scan(String table, - byte[] keyFrom, - byte[] keyTo) { + public BackendColumnIterator scan(String table, byte[] keyFrom, byte[] keyTo) { return this.scan(table, keyFrom, keyTo, SCAN_LT_END); } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java index bcbe37b7c3..15f904d6e3 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java @@ -32,6 +32,18 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.Pair; +import org.apache.hugegraph.backend.BackendException; +import org.apache.hugegraph.backend.serializer.BinarySerializer; +import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn; +import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; +import org.apache.hugegraph.backend.store.BackendEntryIterator; +import org.apache.hugegraph.backend.store.rocksdb.RocksDBIteratorPool.ReusedRocksIterator; +import org.apache.hugegraph.config.CoreOptions; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.util.Bytes; +import org.apache.hugegraph.util.E; +import org.apache.hugegraph.util.Log; +import org.apache.hugegraph.util.StringEncoding; import org.rocksdb.BlockBasedTableConfig; import org.rocksdb.BloomFilter; import org.rocksdb.ColumnFamilyDescriptor; @@ -57,18 +69,6 @@ import org.rocksdb.WriteOptions; import org.slf4j.Logger; -import org.apache.hugegraph.backend.BackendException; -import org.apache.hugegraph.backend.serializer.BinarySerializer; -import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn; -import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; -import org.apache.hugegraph.backend.store.BackendEntryIterator; -import org.apache.hugegraph.backend.store.rocksdb.RocksDBIteratorPool.ReusedRocksIterator; -import org.apache.hugegraph.config.CoreOptions; -import org.apache.hugegraph.config.HugeConfig; -import org.apache.hugegraph.util.Bytes; -import org.apache.hugegraph.util.E; -import org.apache.hugegraph.util.Log; -import org.apache.hugegraph.util.StringEncoding; import com.google.common.collect.ImmutableList; public class RocksDBStdSessions extends RocksDBSessions { @@ -83,14 +83,12 @@ public class RocksDBStdSessions extends RocksDBSessions { private final AtomicInteger refCount; public RocksDBStdSessions(HugeConfig config, String database, String store, - String dataPath, String walPath) - throws RocksDBException { + String dataPath, String walPath) throws RocksDBException { super(config, database, store); this.config = config; this.dataPath = dataPath; this.walPath = walPath; - this.rocksdb = RocksDBStdSessions.openRocksDB(config, dataPath, - walPath); + this.rocksdb = RocksDBStdSessions.openRocksDB(config, dataPath, walPath); this.refCount = new AtomicInteger(1); } @@ -101,8 +99,7 @@ public RocksDBStdSessions(HugeConfig config, String database, String store, this.config = config; this.dataPath = dataPath; this.walPath = walPath; - this.rocksdb = RocksDBStdSessions.openRocksDB(config, cfNames, - dataPath, walPath); + this.rocksdb = RocksDBStdSessions.openRocksDB(config, cfNames, dataPath, walPath); this.refCount = new AtomicInteger(1); this.ingestExternalFile(); @@ -166,8 +163,7 @@ public synchronized void createTable(String... tables) } @Override - public synchronized void dropTable(String... tables) - throws RocksDBException { + public synchronized void dropTable(String... tables) throws RocksDBException { this.checkValid(); /* @@ -210,10 +206,8 @@ public void reloadRocksDB() throws RocksDBException { if (this.rocksdb.isOwningHandle()) { this.rocksdb.close(); } - this.rocksdb = RocksDBStdSessions.openRocksDB(this.config, - ImmutableList.of(), - this.dataPath, - this.walPath); + this.rocksdb = RocksDBStdSessions.openRocksDB(this.config, ImmutableList.of(), + this.dataPath, this.walPath); } @Override @@ -252,8 +246,7 @@ public void compactRange() { } @Override - public RocksDBSessions copy(HugeConfig config, - String database, String store) { + public RocksDBSessions copy(HugeConfig config, String database, String store) { return new RocksDBStdSessions(config, database, store, this); } @@ -281,8 +274,7 @@ public void resumeSnapshot(String snapshotPath) { } // Move snapshot directory to origin data directory FileUtils.moveDirectory(snapshotDir, originDataDir); - LOG.info("Move snapshot directory {} to {}", - snapshotDir, originDataDir); + LOG.info("Move snapshot directory {} to {}", snapshotDir, originDataDir); // Reload rocksdb instance this.reloadRocksDB(); } catch (Exception e) { @@ -299,24 +291,20 @@ public String buildSnapshotPath(String snapshotPrefix) { // Like: rocksdb-data/* Path pureDataPath = parentParentPath.relativize(originDataPath.toAbsolutePath()); // Like: parent_path/snapshot_rocksdb-data/* - Path snapshotPath = parentParentPath.resolve(snapshotPrefix + "_" + - pureDataPath); + Path snapshotPath = parentParentPath.resolve(snapshotPrefix + "_" + pureDataPath); E.checkArgument(snapshotPath.toFile().exists(), - "The snapshot path '%s' doesn't exist", - snapshotPath); + "The snapshot path '%s' doesn't exist", snapshotPath); return snapshotPath.toString(); } @Override public String hardLinkSnapshot(String snapshotPath) throws RocksDBException { String snapshotLinkPath = this.dataPath + "_temp"; - try (OpenedRocksDB rocksdb = openRocksDB(this.config, - ImmutableList.of(), + try (OpenedRocksDB rocksdb = openRocksDB(this.config, ImmutableList.of(), snapshotPath, null)) { rocksdb.createCheckpoint(snapshotLinkPath); } - LOG.info("The snapshot {} has been hard linked to {}", - snapshotPath, snapshotLinkPath); + LOG.info("The snapshot {} has been hard linked to {}", snapshotPath, snapshotLinkPath); return snapshotLinkPath; } @@ -327,8 +315,7 @@ public final Session session() { @Override protected final Session newSession() { - E.checkState(this.rocksdb.isOwningHandle(), - "RocksDB has not been initialized"); + E.checkState(this.rocksdb.isOwningHandle(), "RocksDB has not been initialized"); return new StdSession(this.config()); } @@ -344,8 +331,7 @@ protected synchronized void doClose() { } private void checkValid() { - E.checkState(this.rocksdb.isOwningHandle(), - "It seems RocksDB has been closed"); + E.checkState(this.rocksdb.isOwningHandle(), "It seems RocksDB has been closed"); } private RocksDB rocksdb() { @@ -379,13 +365,11 @@ private void ingestExternalFile() throws RocksDBException { } } - private static OpenedRocksDB openRocksDB(HugeConfig config, - String dataPath, String walPath) - throws RocksDBException { + private static OpenedRocksDB openRocksDB(HugeConfig config, String dataPath, + String walPath) throws RocksDBException { // Init options Options options = new Options(); - RocksDBStdSessions.initOptions(config, options, options, - options, options); + RocksDBStdSessions.initOptions(config, options, options, options, options); options.setWalDir(walPath); SstFileManager sstFileManager = new SstFileManager(Env.getDefault()); options.setSstFileManager(sstFileManager); @@ -399,9 +383,8 @@ private static OpenedRocksDB openRocksDB(HugeConfig config, } private static OpenedRocksDB openRocksDB(HugeConfig config, - List cfNames, - String dataPath, String walPath) - throws RocksDBException { + List cfNames, String dataPath, + String walPath) throws RocksDBException { // Old CFs should always be opened Set mergedCFs = RocksDBStdSessions.mergeOldCFs(dataPath, cfNames); @@ -412,8 +395,7 @@ private static OpenedRocksDB openRocksDB(HugeConfig config, for (String cf : cfs) { ColumnFamilyDescriptor cfd = new ColumnFamilyDescriptor(encode(cf)); ColumnFamilyOptions options = cfd.getOptions(); - RocksDBStdSessions.initOptions(config, null, null, - options, options); + RocksDBStdSessions.initOptions(config, null, null, options, options); cfds.add(cfd); } @@ -440,8 +422,8 @@ private static OpenedRocksDB openRocksDB(HugeConfig config, return new OpenedRocksDB(rocksdb, cfHandles, sstFileManager); } - private static Set mergeOldCFs(String path, List cfNames) - throws RocksDBException { + private static Set mergeOldCFs(String path, + List cfNames) throws RocksDBException { Set cfs = listCFs(path); cfs.addAll(cfNames); return cfs; @@ -486,35 +468,28 @@ public static void initOptions(HugeConfig conf, db.setEnableWriteThreadAdaptiveYield(true); } db.setInfoLogLevel(InfoLogLevel.valueOf( - conf.get(RocksDBOptions.LOG_LEVEL) + "_LEVEL")); + conf.get(RocksDBOptions.LOG_LEVEL) + "_LEVEL")); - db.setMaxSubcompactions( - conf.get(RocksDBOptions.MAX_SUB_COMPACTIONS)); + db.setMaxSubcompactions(conf.get(RocksDBOptions.MAX_SUB_COMPACTIONS)); - db.setAllowMmapWrites( - conf.get(RocksDBOptions.ALLOW_MMAP_WRITES)); - db.setAllowMmapReads( - conf.get(RocksDBOptions.ALLOW_MMAP_READS)); + db.setAllowMmapWrites(conf.get(RocksDBOptions.ALLOW_MMAP_WRITES)); + db.setAllowMmapReads(conf.get(RocksDBOptions.ALLOW_MMAP_READS)); - db.setUseDirectReads( - conf.get(RocksDBOptions.USE_DIRECT_READS)); + db.setUseDirectReads(conf.get(RocksDBOptions.USE_DIRECT_READS)); db.setUseDirectIoForFlushAndCompaction( - conf.get(RocksDBOptions.USE_DIRECT_READS_WRITES_FC)); + conf.get(RocksDBOptions.USE_DIRECT_READS_WRITES_FC)); db.setUseFsync(conf.get(RocksDBOptions.USE_FSYNC)); db.setAtomicFlush(conf.get(RocksDBOptions.ATOMIC_FLUSH)); - db.setMaxManifestFileSize( - conf.get(RocksDBOptions.MAX_MANIFEST_FILE_SIZE)); + db.setMaxManifestFileSize(conf.get(RocksDBOptions.MAX_MANIFEST_FILE_SIZE)); - db.setSkipStatsUpdateOnDbOpen( - conf.get(RocksDBOptions.SKIP_STATS_UPDATE_ON_DB_OPEN)); + db.setSkipStatsUpdateOnDbOpen(conf.get(RocksDBOptions.SKIP_STATS_UPDATE_ON_DB_OPEN)); db.setSkipCheckingSstFileSizesOnDbOpen( - conf.get(RocksDBOptions.SKIP_CHECK_SIZE_ON_DB_OPEN)); + conf.get(RocksDBOptions.SKIP_CHECK_SIZE_ON_DB_OPEN)); - db.setMaxFileOpeningThreads( - conf.get(RocksDBOptions.MAX_FILE_OPENING_THREADS)); + db.setMaxFileOpeningThreads(conf.get(RocksDBOptions.MAX_FILE_OPENING_THREADS)); db.setDbWriteBufferSize(conf.get(RocksDBOptions.DB_MEMTABLE_SIZE)); @@ -535,8 +510,7 @@ public static void initOptions(HugeConfig conf, */ mdb.setMaxBackgroundJobs(conf.get(RocksDBOptions.MAX_BG_JOBS)); - mdb.setDelayedWriteRate( - conf.get(RocksDBOptions.DELAYED_WRITE_RATE)); + mdb.setDelayedWriteRate(conf.get(RocksDBOptions.DELAYED_WRITE_RATE)); mdb.setMaxOpenFiles(conf.get(RocksDBOptions.MAX_OPEN_FILES)); @@ -544,14 +518,12 @@ public static void initOptions(HugeConfig conf, mdb.setBytesPerSync(conf.get(RocksDBOptions.BYTES_PER_SYNC)); mdb.setWalBytesPerSync(conf.get(RocksDBOptions.WAL_BYTES_PER_SYNC)); - mdb.setStrictBytesPerSync( - conf.get(RocksDBOptions.STRICT_BYTES_PER_SYNC)); + mdb.setStrictBytesPerSync(conf.get(RocksDBOptions.STRICT_BYTES_PER_SYNC)); - mdb.setCompactionReadaheadSize( - conf.get(RocksDBOptions.COMPACTION_READAHEAD_SIZE)); + mdb.setCompactionReadaheadSize(conf.get(RocksDBOptions.COMPACTION_READAHEAD_SIZE)); - mdb.setDeleteObsoleteFilesPeriodMicros(1000000 * - conf.get(RocksDBOptions.DELETE_OBSOLETE_FILE_PERIOD)); + mdb.setDeleteObsoleteFilesPeriodMicros( + 1000000 * conf.get(RocksDBOptions.DELETE_OBSOLETE_FILE_PERIOD)); } if (cf != null) { @@ -562,38 +534,30 @@ public static void initOptions(HugeConfig conf, } int numLevels = conf.get(RocksDBOptions.NUM_LEVELS); - List compressions = conf.get( - RocksDBOptions.LEVELS_COMPRESSIONS); - E.checkArgument(compressions.isEmpty() || - compressions.size() == numLevels, + List compressions = conf.get(RocksDBOptions.LEVELS_COMPRESSIONS); + E.checkArgument(compressions.isEmpty() || compressions.size() == numLevels, "Elements number of '%s' must be 0 or " + "be the same as '%s', but got %s != %s", RocksDBOptions.LEVELS_COMPRESSIONS.name(), - RocksDBOptions.NUM_LEVELS.name(), - compressions.size(), numLevels); + RocksDBOptions.NUM_LEVELS.name(), compressions.size(), numLevels); cf.setNumLevels(numLevels); cf.setCompactionStyle(conf.get(RocksDBOptions.COMPACTION_STYLE)); - cf.setBottommostCompressionType( - conf.get(RocksDBOptions.BOTTOMMOST_COMPRESSION)); + cf.setBottommostCompressionType(conf.get(RocksDBOptions.BOTTOMMOST_COMPRESSION)); if (!compressions.isEmpty()) { cf.setCompressionPerLevel(compressions); } - cf.setMinWriteBufferNumberToMerge( - conf.get(RocksDBOptions.MIN_MEMTABLES_TO_MERGE)); + cf.setMinWriteBufferNumberToMerge(conf.get(RocksDBOptions.MIN_MEMTABLES_TO_MERGE)); cf.setMaxWriteBufferNumberToMaintain( - conf.get(RocksDBOptions.MAX_MEMTABLES_TO_MAINTAIN)); + conf.get(RocksDBOptions.MAX_MEMTABLES_TO_MAINTAIN)); - cf.setInplaceUpdateSupport( - conf.get(RocksDBOptions.MEMTABLE_INPLACE_UPDATE_SUPPORT)); + cf.setInplaceUpdateSupport(conf.get(RocksDBOptions.MEMTABLE_INPLACE_UPDATE_SUPPORT)); - cf.setLevelCompactionDynamicLevelBytes( - conf.get(RocksDBOptions.DYNAMIC_LEVEL_BYTES)); + cf.setLevelCompactionDynamicLevelBytes(conf.get(RocksDBOptions.DYNAMIC_LEVEL_BYTES)); - cf.setOptimizeFiltersForHits( - conf.get(RocksDBOptions.BLOOM_FILTERS_SKIP_LAST_LEVEL)); + cf.setOptimizeFiltersForHits(conf.get(RocksDBOptions.BLOOM_FILTERS_SKIP_LAST_LEVEL)); cf.setTableFormatConfig(initTableConfig(conf)); @@ -613,27 +577,22 @@ public static void initOptions(HugeConfig conf, mcf.setWriteBufferSize(conf.get(RocksDBOptions.MEMTABLE_SIZE)); mcf.setMaxWriteBufferNumber(conf.get(RocksDBOptions.MAX_MEMTABLES)); - mcf.setMaxBytesForLevelBase( - conf.get(RocksDBOptions.MAX_LEVEL1_BYTES)); - mcf.setMaxBytesForLevelMultiplier( - conf.get(RocksDBOptions.MAX_LEVEL_BYTES_MULTIPLIER)); + mcf.setMaxBytesForLevelBase(conf.get(RocksDBOptions.MAX_LEVEL1_BYTES)); + mcf.setMaxBytesForLevelMultiplier(conf.get(RocksDBOptions.MAX_LEVEL_BYTES_MULTIPLIER)); - mcf.setTargetFileSizeBase( - conf.get(RocksDBOptions.TARGET_FILE_SIZE_BASE)); - mcf.setTargetFileSizeMultiplier( - conf.get(RocksDBOptions.TARGET_FILE_SIZE_MULTIPLIER)); + mcf.setTargetFileSizeBase(conf.get(RocksDBOptions.TARGET_FILE_SIZE_BASE)); + mcf.setTargetFileSizeMultiplier(conf.get(RocksDBOptions.TARGET_FILE_SIZE_MULTIPLIER)); mcf.setLevel0FileNumCompactionTrigger( - conf.get(RocksDBOptions.LEVEL0_COMPACTION_TRIGGER)); + conf.get(RocksDBOptions.LEVEL0_COMPACTION_TRIGGER)); mcf.setLevel0SlowdownWritesTrigger( - conf.get(RocksDBOptions.LEVEL0_SLOWDOWN_WRITES_TRIGGER)); - mcf.setLevel0StopWritesTrigger( - conf.get(RocksDBOptions.LEVEL0_STOP_WRITES_TRIGGER)); + conf.get(RocksDBOptions.LEVEL0_SLOWDOWN_WRITES_TRIGGER)); + mcf.setLevel0StopWritesTrigger(conf.get(RocksDBOptions.LEVEL0_STOP_WRITES_TRIGGER)); mcf.setSoftPendingCompactionBytesLimit( - conf.get(RocksDBOptions.SOFT_PENDING_COMPACTION_LIMIT)); + conf.get(RocksDBOptions.SOFT_PENDING_COMPACTION_LIMIT)); mcf.setHardPendingCompactionBytesLimit( - conf.get(RocksDBOptions.HARD_PENDING_COMPACTION_LIMIT)); + conf.get(RocksDBOptions.HARD_PENDING_COMPACTION_LIMIT)); /* * TODO: also set memtable options: @@ -643,11 +602,10 @@ public static void initOptions(HugeConfig conf, * #diff-cde52d1fcbcce2bc6aae27838f1d3e7e9e469ccad8aaf8f2695f939e279d7501R369 */ mcf.setMemtablePrefixBloomSizeRatio( - conf.get(RocksDBOptions.MEMTABLE_BLOOM_SIZE_RATIO)); + conf.get(RocksDBOptions.MEMTABLE_BLOOM_SIZE_RATIO)); mcf.setMemtableWholeKeyFiltering( - conf.get(RocksDBOptions.MEMTABLE_BLOOM_WHOLE_KEY_FILTERING)); - mcf.setMemtableHugePageSize( - conf.get(RocksDBOptions.MEMTABL_BLOOM_HUGE_PAGE_SIZE)); + conf.get(RocksDBOptions.MEMTABLE_BLOOM_WHOLE_KEY_FILTERING)); + mcf.setMemtableHugePageSize(conf.get(RocksDBOptions.MEMTABL_BLOOM_HUGE_PAGE_SIZE)); boolean bulkload = conf.get(RocksDBOptions.BULKLOAD_MODE); if (bulkload) { @@ -671,8 +629,7 @@ public static void initOptions(HugeConfig conf, public static TableFormatConfig initTableConfig(HugeConfig conf) { BlockBasedTableConfig tableConfig = new BlockBasedTableConfig(); - tableConfig.setFormatVersion( - conf.get(RocksDBOptions.TABLE_FORMAT_VERSION)); + tableConfig.setFormatVersion(conf.get(RocksDBOptions.TABLE_FORMAT_VERSION)); /* * The index type used to lookup between data blocks: @@ -689,17 +646,14 @@ public static TableFormatConfig initTableConfig(HugeConfig conf) { * The search type of point lookup can be BinarySearch or HashSearch: * https://github.com/facebook/rocksdb/wiki/Data-Block-Hash-Index */ - tableConfig.setDataBlockIndexType( - conf.get(RocksDBOptions.DATA_BLOCK_SEARCH_TYPE)); + tableConfig.setDataBlockIndexType(conf.get(RocksDBOptions.DATA_BLOCK_SEARCH_TYPE)); tableConfig.setDataBlockHashTableUtilRatio( - conf.get(RocksDBOptions.DATA_BLOCK_HASH_TABLE_RATIO)); + conf.get(RocksDBOptions.DATA_BLOCK_HASH_TABLE_RATIO)); long blockSize = conf.get(RocksDBOptions.BLOCK_SIZE); tableConfig.setBlockSize(blockSize); - tableConfig.setBlockSizeDeviation( - conf.get(RocksDBOptions.BLOCK_SIZE_DEVIATION)); - tableConfig.setBlockRestartInterval( - conf.get(RocksDBOptions.BLOCK_RESTART_INTERVAL)); + tableConfig.setBlockSizeDeviation(conf.get(RocksDBOptions.BLOCK_SIZE_DEVIATION)); + tableConfig.setBlockRestartInterval(conf.get(RocksDBOptions.BLOCK_RESTART_INTERVAL)); // https://github.com/facebook/rocksdb/wiki/Block-Cache long cacheCapacity = conf.get(RocksDBOptions.BLOCK_CACHE_CAPACITY); @@ -715,16 +669,14 @@ public static TableFormatConfig initTableConfig(HugeConfig conf) { if (bitsPerKey >= 0) { // TODO: use space-saving RibbonFilterPolicy boolean blockBased = conf.get(RocksDBOptions.BLOOM_FILTER_MODE); - tableConfig.setFilterPolicy(new BloomFilter(bitsPerKey, - blockBased)); + tableConfig.setFilterPolicy(new BloomFilter(bitsPerKey, blockBased)); - tableConfig.setWholeKeyFiltering( - conf.get(RocksDBOptions.BLOOM_FILTER_WHOLE_KEY)); + tableConfig.setWholeKeyFiltering(conf.get(RocksDBOptions.BLOOM_FILTER_WHOLE_KEY)); tableConfig.setCacheIndexAndFilterBlocks( - conf.get(RocksDBOptions.CACHE_FILTER_AND_INDEX)); + conf.get(RocksDBOptions.CACHE_FILTER_AND_INDEX)); tableConfig.setPinL0FilterAndIndexBlocksInCache( - conf.get(RocksDBOptions.PIN_L0_INDEX_AND_FILTER)); + conf.get(RocksDBOptions.PIN_L0_INDEX_AND_FILTER)); // https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters if (conf.get(RocksDBOptions.PARTITION_FILTERS_INDEXES)) { @@ -734,7 +686,7 @@ public static TableFormatConfig initTableConfig(HugeConfig conf) { .setMetadataBlockSize(blockSize) .setCacheIndexAndFilterBlocksWithHighPriority(true); tableConfig.setPinTopLevelIndexAndFilter( - conf.get(RocksDBOptions.PIN_TOP_INDEX_AND_FILTER)); + conf.get(RocksDBOptions.PIN_TOP_INDEX_AND_FILTER)); } } @@ -898,7 +850,7 @@ public void put(String table, byte[] key, byte[] value) { /** * Merge a record to an existing key to a table * For more details about merge-operator: - * https://github.com/facebook/rocksdb/wiki/merge-operator + * ... */ @Override public void merge(String table, byte[] key, byte[] value) { @@ -950,8 +902,7 @@ public void deleteSingle(String table, byte[] key) { * Delete a record by key(or prefix with key) from a table */ @Override - public void deletePrefix(String table, byte[] key) { - byte[] keyFrom = key; + public void deletePrefix(String table, byte[] keyFrom) { byte[] keyTo = Arrays.copyOf(keyFrom, keyFrom.length); BinarySerializer.increaseOne(keyTo); try (OpenedRocksDB.CFHandle cf = cf(table)) { @@ -1044,8 +995,7 @@ public BackendColumnIterator scan(String table, byte[] prefix) { */ try (OpenedRocksDB.CFHandle cf = cf(table)) { ReusedRocksIterator iter = cf.newIterator(); - return new ScanIterator(table, iter, prefix, null, - SCAN_PREFIX_BEGIN); + return new ScanIterator(table, iter, prefix, null, SCAN_PREFIX_BEGIN); } } @@ -1076,8 +1026,7 @@ public BackendColumnIterator scan(String table, byte[] keyFrom, /** * A wrapper for RocksIterator that convert RocksDB results to std Iterator */ - private static class ScanIterator implements BackendColumnIterator, - Countable { + private static class ScanIterator implements BackendColumnIterator, Countable { private final String table; private final ReusedRocksIterator reusedIter; @@ -1164,14 +1113,12 @@ private boolean match(int expected) { @SuppressWarnings("unused") private void dump() { this.seek(); - LOG.info(">>>> scan from {}: {}{}", - this.table, - this.keyBegin == null ? "*" : StringEncoding.format(this.keyBegin), - this.iter.isValid() ? "" : " - No data"); + LOG.info(">>>> scan from {}: {}{}", this.table, + this.keyBegin == null ? "*" : StringEncoding.format(this.keyBegin), + this.iter.isValid() ? "" : " - No data"); for (; this.iter.isValid(); this.iter.next()) { - LOG.info("{}={}", - StringEncoding.format(this.iter.key()), - StringEncoding.format(this.iter.value())); + LOG.info("{}={}", StringEncoding.format(this.iter.key()), + StringEncoding.format(this.iter.value())); } } @@ -1202,7 +1149,7 @@ public boolean hasNext() { } private void seek() { - if (this.keyBegin == null || this.keyBegin.length <= 0) { + if (this.keyBegin == null || this.keyBegin.length == 0) { // Seek to the first if no `keyBegin` this.iter.seekToFirst(); } else { @@ -1216,8 +1163,7 @@ private void seek() { // Skip `keyBegin` if set SCAN_GT_BEGIN (key > 'xx') if (this.match(Session.SCAN_GT_BEGIN) && !this.match(Session.SCAN_GTE_BEGIN)) { - while (this.iter.isValid() && - Bytes.equals(this.iter.key(), this.keyBegin)) { + while (this.iter.isValid() && Bytes.equals(this.iter.key(), this.keyBegin)) { this.iter.next(); } } @@ -1254,10 +1200,8 @@ private boolean filter(byte[] key) { return Bytes.compare(key, this.keyEnd) < 0; } } else { - assert this.match(Session.SCAN_ANY) || - this.match(Session.SCAN_GT_BEGIN) || - this.match(Session.SCAN_GTE_BEGIN) : - "Unknow scan type"; + assert this.match(Session.SCAN_ANY) || this.match(Session.SCAN_GT_BEGIN) || + this.match(Session.SCAN_GTE_BEGIN) : "Unknown scan type"; return true; } } @@ -1270,8 +1214,7 @@ public BackendColumn next() { } } - BackendColumn col = BackendColumn.of(this.iter.key(), - this.iter.value()); + BackendColumn col = BackendColumn.of(this.iter.key(), this.iter.value()); this.iter.next(); this.matched = false; diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java index 283baa622a..c9a27b7705 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java @@ -93,9 +93,10 @@ public abstract class RocksDBStore extends AbstractBackendStore(); this.olapTables = new HashMap<>(); - this.provider = provider; this.database = database; this.store = store; @@ -221,8 +221,7 @@ public synchronized void open(HugeConfig config) { } List> futures = new ArrayList<>(); - ExecutorService openPool = ExecutorUtil.newFixedThreadPool( - OPEN_POOL_THREADS, DB_OPEN); + ExecutorService openPool = ExecutorUtil.newFixedThreadPool(OPEN_POOL_THREADS, DB_OPEN); // Open base disk futures.add(openPool.submit(() -> { this.sessions = this.open(config, this.tableNames()); @@ -282,8 +281,7 @@ private void shutdownOpenPool(ExecutorService openPool) { Consumers.executeOncePerThread(openPool, OPEN_POOL_THREADS, this::closeSessions, DB_CLOSE_TIMEOUT); } catch (InterruptedException e) { - throw new BackendException("Failed to close session opened by " + - "open-pool"); + throw new BackendException("Failed to close session opened by open-pool"); } boolean terminated; @@ -292,8 +290,7 @@ private void shutdownOpenPool(ExecutorService openPool) { terminated = openPool.awaitTermination(DB_OPEN_TIMEOUT, TimeUnit.SECONDS); } catch (Throwable e) { - throw new BackendException( - "Failed to wait db-open thread pool shutdown", e); + throw new BackendException("Failed to wait db-open thread pool shutdown", e); } if (!terminated) { LOG.warn("Timeout when waiting db-open thread pool shutdown"); @@ -346,8 +343,7 @@ protected RocksDBSessions open(HugeConfig config, String dataPath, none = null; } try { - sessions = this.openSessionPool(config, dataPath, - walPath, none); + sessions = this.openSessionPool(config, dataPath, walPath, none); } catch (RocksDBException e1) { e = e1; } @@ -360,8 +356,7 @@ protected RocksDBSessions open(HugeConfig config, String dataPath, if (sessions == null) { // Error after trying other ways LOG.error("Failed to open RocksDB '{}'", dataPath, e); - throw new ConnectionException("Failed to open RocksDB '%s'", - e, dataPath); + throw new ConnectionException("Failed to open RocksDB '%s'", e, dataPath); } } @@ -377,11 +372,9 @@ protected RocksDBSessions open(HugeConfig config, String dataPath, protected RocksDBSessions openSessionPool(HugeConfig config, String dataPath, String walPath, - List tableNames) - throws RocksDBException { + List tableNames) throws RocksDBException { if (tableNames == null) { - return new RocksDBStdSessions(config, this.database, this.store, - dataPath, walPath); + return new RocksDBStdSessions(config, this.database, this.store, dataPath, walPath); } else { return new RocksDBStdSessions(config, this.database, this.store, dataPath, walPath, tableNames); @@ -404,8 +397,7 @@ protected Map tableDBMapping() { for (Entry e : this.tableDiskMapping.entrySet()) { HugeType type = e.getKey(); RocksDBSessions db = this.db(e.getValue()); - String key = type != HugeType.OLAP ? this.table(type).table() : - type.string(); + String key = type != HugeType.OLAP ? this.table(type).table() : type.string(); tableDBMap.put(key, db); } return tableDBMap; @@ -418,7 +410,6 @@ protected ReadWriteLock storeLock() { @Override public void close() { LOG.debug("Store close: {}", this.store); - this.checkOpened(); this.closeSessions(); } @@ -435,15 +426,13 @@ public void mutate(BackendMutation mutation) { readLock.lock(); try { this.checkOpened(); - if (LOG.isDebugEnabled()) { LOG.debug("Store {} mutation: {}", this.store, mutation); } for (HugeType type : mutation.types()) { RocksDBSessions.Session session = this.session(type); - for (Iterator it = mutation.mutation(type); - it.hasNext();) { + for (Iterator it = mutation.mutation(type); it.hasNext(); ) { this.mutate(session, it.next()); } } @@ -454,8 +443,8 @@ public void mutate(BackendMutation mutation) { private void mutate(RocksDBSessions.Session session, BackendAction item) { BackendEntry entry = item.entry(); - RocksDBTable table; + if (!entry.olap()) { // Oltp table table = this.table(entry.type()); @@ -469,6 +458,7 @@ private void mutate(RocksDBSessions.Session session, BackendAction item) { } session = this.session(HugeType.OLAP); } + switch (item.action()) { case INSERT: table.insert(session, entry); @@ -489,8 +479,8 @@ private void mutate(RocksDBSessions.Session session, BackendAction item) { table.updateIfAbsent(session, entry); break; default: - throw new AssertionError(String.format( - "Unsupported mutate action: %s", item.action())); + throw new AssertionError(String.format("Unsupported mutate action: %s", + item.action())); } } @@ -498,9 +488,9 @@ private void mutate(RocksDBSessions.Session session, BackendAction item) { public Iterator query(Query query) { Lock readLock = this.storeLock.readLock(); readLock.lock(); + try { this.checkOpened(); - HugeType tableType = RocksDBTable.tableType(query); RocksDBTable table; RocksDBSessions.Session session; @@ -522,8 +512,7 @@ public Iterator query(Query query) { table = this.table(this.olapTableName(pk)); iterators.add(table.query(this.session(HugeType.OLAP), q)); } - entries = new MergeIterator<>(entries, iterators, - BackendEntry::mergeable); + entries = new MergeIterator<>(entries, iterators, BackendEntry::mergeable); } return entries; } finally { @@ -537,7 +526,6 @@ public Number queryNumber(Query query) { readLock.lock(); try { this.checkOpened(); - HugeType tableType = RocksDBTable.tableType(query); RocksDBTable table = this.table(tableType); return table.queryNumber(this.session(tableType), query); @@ -552,10 +540,8 @@ public synchronized void init() { writeLock.lock(); try { this.checkDbOpened(); - // Create tables with main disk - this.createTable(this.sessions, - this.tableNames().toArray(new String[0])); + this.createTable(this.sessions, this.tableNames().toArray(new String[0])); // Create table with optimized disk Map tableDBMap = this.tableDBMapping(); @@ -590,10 +576,8 @@ public synchronized void clear(boolean clearSpace) { writeLock.lock(); try { this.checkDbOpened(); - // Drop tables with main disk - this.dropTable(this.sessions, - this.tableNames().toArray(new String[0])); + this.dropTable(this.sessions, this.tableNames().toArray(new String[0])); // Drop tables with optimized disk Map tableDBMap = this.tableDBMapping(); @@ -630,10 +614,10 @@ protected void dropTable(RocksDBSessions db, String... tables) { @Override public boolean initialized() { this.checkDbOpened(); - if (!this.opened()) { return false; } + for (String table : this.tableNames()) { if (!this.sessions.existsTable(table)) { return false; @@ -726,7 +710,7 @@ public Map createSnapshot(String snapshotPrefix) { readLock.lock(); try { Map uniqueSnapshotDirMaps = new HashMap<>(); - // Every rocksdb instance should create an snapshot + // Every rocksdb instance should create a snapshot for (Map.Entry entry : this.dbs.entrySet()) { // Like: parent_path/rocksdb-data/*, * maybe g,m,s Path originDataPath = Paths.get(entry.getKey()).toAbsolutePath(); @@ -743,8 +727,7 @@ public Map createSnapshot(String snapshotPrefix) { String snapshotDir = snapshotPath.toAbsolutePath().getParent().toString(); // Find correspond data HugeType key - String diskTableKey = this.findDiskTableKeyByPath( - entry.getKey()); + String diskTableKey = this.findDiskTableKeyByPath(entry.getKey()); uniqueSnapshotDirMaps.put(snapshotDir, diskTableKey); } LOG.info("The store '{}' create snapshot successfully", this); @@ -775,7 +758,7 @@ public void resumeSnapshot(String snapshotPrefix, boolean deleteSnapshot) { } for (Map.Entry entry : - snapshotPaths.entrySet()) { + snapshotPaths.entrySet()) { String snapshotPath = entry.getKey(); RocksDBSessions sessions = entry.getValue(); sessions.resumeSnapshot(snapshotPath); @@ -819,8 +802,7 @@ private List session() { } private void closeSessions() { - Iterator> iter = this.dbs.entrySet() - .iterator(); + Iterator> iter = this.dbs.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = iter.next(); RocksDBSessions sessions = entry.getValue(); @@ -835,23 +817,20 @@ private Collection sessions() { return this.dbs.values(); } - private void parseTableDiskMapping(Map disks, - String dataPath) { + private void parseTableDiskMapping(Map disks, String dataPath) { this.tableDiskMapping.clear(); for (Map.Entry disk : disks.entrySet()) { // The format of `disk` like: `graph/vertex: /path/to/disk1` String name = disk.getKey(); String path = disk.getValue(); - E.checkArgument(!dataPath.equals(path), "Invalid disk path" + - "(can't be the same as data_path): '%s'", path); + E.checkArgument(!dataPath.equals(path), + "Invalid disk path (can't be the same as data_path): '%s'", path); E.checkArgument(!name.isEmpty() && !path.isEmpty(), - "Invalid disk format: '%s', expect `NAME:PATH`", - disk); + "Invalid disk format: '%s', expect `NAME:PATH`", disk); String[] pair = name.split("/", 2); E.checkArgument(pair.length == 2, - "Invalid disk key format: '%s', " + - "expect `STORE/TABLE`", name); + "Invalid disk key format: '%s', expect `STORE/TABLE`", name); String store = pair[0].trim(); HugeType table = HugeType.valueOf(pair[1].trim().toUpperCase()); if (this.store.equals(store)) { @@ -948,14 +927,10 @@ public RocksDBSchemaStore(BackendStoreProvider provider, this.counters = new RocksDBTables.Counters(database); - registerTableManager(HugeType.VERTEX_LABEL, - new RocksDBTables.VertexLabel(database)); - registerTableManager(HugeType.EDGE_LABEL, - new RocksDBTables.EdgeLabel(database)); - registerTableManager(HugeType.PROPERTY_KEY, - new RocksDBTables.PropertyKey(database)); - registerTableManager(HugeType.INDEX_LABEL, - new RocksDBTables.IndexLabel(database)); + registerTableManager(HugeType.VERTEX_LABEL, new RocksDBTables.VertexLabel(database)); + registerTableManager(HugeType.EDGE_LABEL, new RocksDBTables.EdgeLabel(database)); + registerTableManager(HugeType.PROPERTY_KEY, new RocksDBTables.PropertyKey(database)); + registerTableManager(HugeType.INDEX_LABEL, new RocksDBTables.IndexLabel(database)); registerTableManager(HugeType.SECONDARY_INDEX, new RocksDBTables.SecondaryIndex(database)); } @@ -1005,13 +980,10 @@ public RocksDBGraphStore(BackendStoreProvider provider, String database, String store) { super(provider, database, store); - registerTableManager(HugeType.VERTEX, - new RocksDBTables.Vertex(database)); + registerTableManager(HugeType.VERTEX, new RocksDBTables.Vertex(database)); - registerTableManager(HugeType.EDGE_OUT, - RocksDBTables.Edge.out(database)); - registerTableManager(HugeType.EDGE_IN, - RocksDBTables.Edge.in(database)); + registerTableManager(HugeType.EDGE_OUT, RocksDBTables.Edge.out(database)); + registerTableManager(HugeType.EDGE_IN, RocksDBTables.Edge.in(database)); registerTableManager(HugeType.SECONDARY_INDEX, new RocksDBTables.SecondaryIndex(database)); @@ -1053,20 +1025,17 @@ public boolean isSchemaStore() { @Override public Id nextId(HugeType type) { - throw new UnsupportedOperationException( - "RocksDBGraphStore.nextId()"); + throw new UnsupportedOperationException("RocksDBGraphStore.nextId()"); } @Override public void increaseCounter(HugeType type, long num) { - throw new UnsupportedOperationException( - "RocksDBGraphStore.increaseCounter()"); + throw new UnsupportedOperationException("RocksDBGraphStore.increaseCounter()"); } @Override public long getCounter(HugeType type) { - throw new UnsupportedOperationException( - "RocksDBGraphStore.getCounter()"); + throw new UnsupportedOperationException("RocksDBGraphStore.getCounter()"); } /** @@ -1117,10 +1086,8 @@ public static class RocksDBSystemStore extends RocksDBGraphStore { private final RocksDBTables.Meta meta; - public RocksDBSystemStore(BackendStoreProvider provider, - String database, String store) { + public RocksDBSystemStore(BackendStoreProvider provider, String database, String store) { super(provider, database, store); - this.meta = new RocksDBTables.Meta(database); } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java index 7a5af5f1ae..ec2959d32c 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTable.java @@ -25,9 +25,6 @@ import java.util.Set; import org.apache.commons.lang3.tuple.Pair; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.slf4j.Logger; - import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.page.PageState; import org.apache.hugegraph.backend.query.Aggregate; @@ -52,6 +49,8 @@ import org.apache.hugegraph.util.E; import org.apache.hugegraph.util.Log; import org.apache.hugegraph.util.StringEncoding; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; +import org.slf4j.Logger; public class RocksDBTable extends BackendTable { @@ -67,8 +66,7 @@ public RocksDBTable(String database, String table) { @Override protected void registerMetaHandlers() { this.registerMetaHandler("splits", (session, meta, args) -> { - E.checkArgument(args.length == 1, - "The args count of %s must be 1", meta); + E.checkArgument(args.length == 1, "The args count of %s must be 1", meta); long splitSize = (long) args[0]; return this.shardSplitter.getSplits(session, splitSize); }); @@ -203,7 +201,7 @@ protected BackendColumnIterator queryByIds(RocksDBSessions.Session session, // NOTE: this will lead to lazy create rocksdb iterator return BackendColumnIterator.wrap(new FlatMapperIterator<>( - ids.iterator(), id -> this.queryById(session, id) + ids.iterator(), id -> this.queryById(session, id) )); } @@ -233,8 +231,7 @@ protected BackendColumnIterator queryByPrefix(RocksDBSessions.Session session, int type = query.inclusiveStart() ? RocksDBSessions.Session.SCAN_GTE_BEGIN : RocksDBSessions.Session.SCAN_GT_BEGIN; type |= RocksDBSessions.Session.SCAN_PREFIX_END; - return session.scan(this.table(), query.start().asBytes(), - query.prefix().asBytes(), type); + return session.scan(this.table(), query.start().asBytes(), query.prefix().asBytes(), type); } protected BackendColumnIterator queryByRange(RocksDBSessions.Session session, @@ -268,8 +265,7 @@ protected BackendColumnIterator queryByRange(RocksDBSessions.Session session, Sh byte[] end = this.shardSplitter.position(shard.end()); if (page != null && !page.isEmpty()) { byte[] position = PageState.fromString(page).position(); - E.checkArgument(start == null || - Bytes.compare(position, start) >= 0, + E.checkArgument(start == null || Bytes.compare(position, start) >= 0, "Invalid page out of lower bound"); start = position; } @@ -310,7 +306,6 @@ private static class RocksDBShardSplitter extends ShardSplitter getSplits(RocksDBSessions.Session session, long splitSize) { count = 1; } - Range range = new Range(keyRange.getLeft(), - Range.increase(keyRange.getRight())); + Range range = new Range(keyRange.getLeft(), Range.increase(keyRange.getRight())); List splits = new ArrayList<>((int) count); splits.addAll(range.splitEven((int) count)); return splits; @@ -359,6 +353,7 @@ public long estimateNumKeys(RocksDBSessions.Session session) { @Override public byte[] position(String position) { + // TODO: START & END is same & be empty now? remove one? if (START.equals(position) || END.equals(position)) { return null; } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java index 06c2d91a1a..dad0545ade 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBTables.java @@ -120,8 +120,7 @@ public void delete(RocksDBSessions.Session session, BackendEntry entry) { * `scanPrefix + delete`: session.delete(scanPrefix(prefix)) */ byte[] prefix = entry.id().asBytes(); - try (BackendColumnIterator results = session.scan(this.table(), - prefix)) { + try (BackendColumnIterator results = session.scan(this.table(), prefix)) { while (results.hasNext()) { byte[] column = results.next().name; session.delete(this.table(), column); @@ -218,6 +217,7 @@ public IndexTable(String database, String table) { } @Override + // TODO: why this method is same as super.eliminate() in RocksDBTable, del it? public void eliminate(RocksDBSessions.Session session, BackendEntry entry) { assert entry.columns().size() == 1; super.delete(session, entry); @@ -291,10 +291,8 @@ public RangeIndex(String database, String table) { protected BackendColumnIterator queryByCond(RocksDBSessions.Session session, ConditionQuery query) { assert query.conditionsSize() > 0; - List conds = query.syspropConditions(HugeKeys.ID); - E.checkArgument(!conds.isEmpty(), - "Please specify the index conditions"); + E.checkArgument(!conds.isEmpty(), "Please specify the index conditions"); Id prefix = null; Id min = null; @@ -323,8 +321,7 @@ protected BackendColumnIterator queryByCond(RocksDBSessions.Session session, max = (Id) r.value(); break; default: - E.checkArgument(false, "Unsupported relation '%s'", - r.relation()); + E.checkArgument(false, "Unsupported relation '%s'", r.relation()); } } @@ -340,7 +337,8 @@ protected BackendColumnIterator queryByCond(RocksDBSessions.Session session, RocksDBSessions.Session.SCAN_PREFIX_END); } else { byte[] end = max.asBytes(); - int type = maxEq ? RocksDBSessions.Session.SCAN_LTE_END : RocksDBSessions.Session.SCAN_LT_END; + int type = maxEq ? RocksDBSessions.Session.SCAN_LTE_END + : RocksDBSessions.Session.SCAN_LT_END; return session.scan(this.table(), begin, end, type); } } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java index 3d2b7f867a..d7ce2db878 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstSessions.java @@ -31,11 +31,6 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.Pair; -import org.rocksdb.EnvOptions; -import org.rocksdb.Options; -import org.rocksdb.RocksDBException; -import org.rocksdb.SstFileWriter; - import org.apache.hugegraph.backend.BackendException; import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; import org.apache.hugegraph.backend.store.rocksdb.RocksDBIngester; @@ -44,14 +39,17 @@ import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.exception.NotSupportException; import org.apache.hugegraph.util.E; +import org.rocksdb.EnvOptions; +import org.rocksdb.Options; +import org.rocksdb.RocksDBException; +import org.rocksdb.SstFileWriter; public class RocksDBSstSessions extends RocksDBSessions { private final String dataPath; private final Map tables; - public RocksDBSstSessions(HugeConfig config, String database, String store, - String dataPath) { + public RocksDBSstSessions(HugeConfig config, String database, String store, String dataPath) { super(config, database, store); this.dataPath = dataPath; @@ -63,8 +61,7 @@ public RocksDBSstSessions(HugeConfig config, String database, String store, } } - public RocksDBSstSessions(HugeConfig config, String dataPath, - String database, String store, + public RocksDBSstSessions(HugeConfig config, String dataPath, String database, String store, List tableNames) throws RocksDBException { this(config, dataPath, database, store); for (String table : tableNames) { @@ -96,8 +93,7 @@ public Set openedTables() { } @Override - public synchronized void createTable(String... tables) - throws RocksDBException { + public synchronized void createTable(String... tables) throws RocksDBException { for (String table : tables) { this.createTable(table); } @@ -105,8 +101,7 @@ public synchronized void createTable(String... tables) private void createTable(String table) throws RocksDBException { String number = String.format("%04d", 1); - Path sstFile = Paths.get(this.dataPath, table, - number + RocksDBIngester.SST); + Path sstFile = Paths.get(this.dataPath, table, number + RocksDBIngester.SST); try { FileUtils.forceMkdir(sstFile.toAbsolutePath().getParent().toFile()); } catch (IOException e) { @@ -116,8 +111,7 @@ private void createTable(String table) throws RocksDBException { EnvOptions env = new EnvOptions(); Options options = new Options(); - RocksDBStdSessions.initOptions(this.config(), options, options, - options, options); + RocksDBStdSessions.initOptions(this.config(), options, options, options, options); // NOTE: unset merge op due to SIGSEGV when cf.setMergeOperatorName() options.setMergeOperatorName("not-exist-merge-op"); SstFileWriter sst = new SstFileWriter(env, options); @@ -126,17 +120,17 @@ private void createTable(String table) throws RocksDBException { } @Override - public synchronized void dropTable(String... tables) - throws RocksDBException { + public synchronized void dropTable(String... tables) throws RocksDBException { for (String table : tables) { this.dropTable(table); } } - public void dropTable(String table) throws RocksDBException { - SstFileWriter sst = this.tables.remove(table); - assert sst == null || !sst.isOwningHandle() : - "Please close table before drop to ensure call sst.finish()"; + public void dropTable(String table) throws RocksDBException{ + try (SstFileWriter sst = this.tables.remove(table)) { + assert sst == null || !sst.isOwningHandle() : "Please close table before drop to " + + "ensure call sst.finish()"; + } } @Override @@ -155,8 +149,7 @@ public void compactRange() { } @Override - public RocksDBSessions copy(HugeConfig config, - String database, String store) { + public RocksDBSessions copy(HugeConfig config, String database, String store) { return new RocksDBSstSessions(config, database, store, this); } @@ -176,8 +169,7 @@ public String buildSnapshotPath(String snapshotPrefix) { } @Override - public String hardLinkSnapshot(String snapshotPath) - throws RocksDBException { + public String hardLinkSnapshot(String snapshotPath) { throw new UnsupportedOperationException("hardLinkSnapshot"); } @@ -264,7 +256,7 @@ public boolean hasChanges() { @Override public Integer commit() { int count = this.batch.size(); - if (count <= 0) { + if (count == 0) { return 0; } @@ -344,7 +336,7 @@ public void put(String table, byte[] key, byte[] value) { /** * Merge a record to an existing key to a table * For more details about merge-operator: - * https://github.com/facebook/rocksdb/wiki/merge-operator + * ... */ @Override public void merge(String table, byte[] key, byte[] value) { @@ -431,10 +423,8 @@ public BackendColumnIterator scan(String table, byte[] prefix) { * Scan records by key range from a table */ @Override - public BackendColumnIterator scan(String table, - byte[] keyFrom, - byte[] keyTo, - int scanType) { + public BackendColumnIterator scan(String table, byte[] keyFrom, + byte[] keyTo, int scanType) { assert !this.hasChanges(); return BackendColumnIterator.empty(); } diff --git a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java index c88cd4970c..12ccfdc15e 100644 --- a/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java +++ b/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdbsst/RocksDBSstStore.java @@ -19,8 +19,6 @@ import java.util.List; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.store.BackendStoreProvider; import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions; @@ -28,6 +26,7 @@ import org.apache.hugegraph.backend.store.rocksdb.RocksDBTables; import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.type.HugeType; +import org.rocksdb.RocksDBException; public abstract class RocksDBSstStore extends RocksDBStore { @@ -42,8 +41,7 @@ protected RocksDBSessions openSessionPool(HugeConfig config, List tableNames) throws RocksDBException { if (tableNames == null) { - return new RocksDBSstSessions(config, this.database(), - this.store(), dataPath); + return new RocksDBSstSessions(config, this.database(), this.store(), dataPath); } else { return new RocksDBSstSessions(config, this.database(), this.store(), dataPath, tableNames); @@ -58,13 +56,10 @@ public RocksDBSstGraphStore(BackendStoreProvider provider, String database, String store) { super(provider, database, store); - registerTableManager(HugeType.VERTEX, - new RocksDBTables.Vertex(database)); + registerTableManager(HugeType.VERTEX, new RocksDBTables.Vertex(database)); - registerTableManager(HugeType.EDGE_OUT, - RocksDBTables.Edge.out(database)); - registerTableManager(HugeType.EDGE_IN, - RocksDBTables.Edge.in(database)); + registerTableManager(HugeType.EDGE_OUT, RocksDBTables.Edge.out(database)); + registerTableManager(HugeType.EDGE_IN, RocksDBTables.Edge.in(database)); registerTableManager(HugeType.SECONDARY_INDEX, new RocksDBTables.SecondaryIndex(database)); @@ -80,12 +75,9 @@ public RocksDBSstGraphStore(BackendStoreProvider provider, new RocksDBTables.RangeLongIndex(database)); registerTableManager(HugeType.RANGE_DOUBLE_INDEX, new RocksDBTables.RangeDoubleIndex(database)); - registerTableManager(HugeType.SEARCH_INDEX, - new RocksDBTables.SearchIndex(database)); - registerTableManager(HugeType.SHARD_INDEX, - new RocksDBTables.ShardIndex(database)); - registerTableManager(HugeType.UNIQUE_INDEX, - new RocksDBTables.UniqueIndex(database)); + registerTableManager(HugeType.SEARCH_INDEX, new RocksDBTables.SearchIndex(database)); + registerTableManager(HugeType.SHARD_INDEX, new RocksDBTables.ShardIndex(database)); + registerTableManager(HugeType.UNIQUE_INDEX, new RocksDBTables.UniqueIndex(database)); } @Override @@ -95,20 +87,17 @@ public boolean isSchemaStore() { @Override public Id nextId(HugeType type) { - throw new UnsupportedOperationException( - "RocksDBSstGraphStore.nextId()"); + throw new UnsupportedOperationException("RocksDBSstGraphStore.nextId()"); } @Override public void increaseCounter(HugeType type, long increment) { - throw new UnsupportedOperationException( - "RocksDBSstGraphStore.increaseCounter()"); + throw new UnsupportedOperationException("RocksDBSstGraphStore.increaseCounter()"); } @Override public long getCounter(HugeType type) { - throw new UnsupportedOperationException( - "RocksDBSstGraphStore.getCounter()"); + throw new UnsupportedOperationException("RocksDBSstGraphStore.getCounter()"); } } } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java index 9a9104412e..5629938f99 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/BaseRocksDBUnitTest.java @@ -23,23 +23,21 @@ import java.util.ArrayList; import org.apache.commons.io.FileUtils; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions; import org.apache.hugegraph.backend.store.rocksdb.RocksDBStdSessions; import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.unit.BaseUnitTest; import org.apache.hugegraph.unit.FakeObjects; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.rocksdb.RocksDBException; public class BaseRocksDBUnitTest extends BaseUnitTest { private static final String TMP_DIR = System.getProperty("java.io.tmpdir"); protected static final String DB_PATH = TMP_DIR + "/" + "rocksdb"; protected static final String SNAPSHOT_PATH = TMP_DIR + "/" + "snapshot"; - protected static final String TABLE = "test-table"; protected RocksDBSessions rocks; @@ -74,10 +72,9 @@ protected String get(String key) throws RocksDBException { return getString(this.rocks.session().get(TABLE, getBytes(key))); } - protected void clearData() throws RocksDBException { + protected void clearData() { for (String table : new ArrayList<>(this.rocks.openedTables())) { - this.rocks.session().deleteRange(table, - new byte[]{0}, new byte[]{-1}); + this.rocks.session().deleteRange(table, new byte[]{0}, new byte[]{-1}); } this.commit(); } @@ -119,7 +116,7 @@ private static RocksDBSessions open(String table) throws RocksDBException { private static void close(RocksDBSessions rocks) throws RocksDBException { for (String table : new ArrayList<>(rocks.openedTables())) { - if (table.equals("default")) { + if ("default".equals(table)) { continue; } rocks.dropTable(table); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java index 083cb1d3b4..ee712f9369 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBCountersTest.java @@ -21,16 +21,15 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; -import org.junit.Before; -import org.junit.Test; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions.Session; import org.apache.hugegraph.backend.store.rocksdb.RocksDBTables; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.type.HugeType; +import org.junit.Before; +import org.junit.Test; +import org.rocksdb.RocksDBException; public class RocksDBCountersTest extends BaseRocksDBUnitTest { @@ -104,7 +103,7 @@ public void testCounterWithMutiThreads() { private Id nextId(Session session, HugeType type) { final int MAX_TIMES = 1000; // Do get-increase-get-compare operation - long counter = 0L; + long counter; long expect = -1L; synchronized (this) { for (int i = 0; i < MAX_TIMES; i++) { diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java index a6d94d1b8a..fdab91e916 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBPerfTest.java @@ -24,19 +24,17 @@ import java.util.Map; import java.util.Random; -import org.junit.Test; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn; import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions.Session; +import org.junit.Test; public class RocksDBPerfTest extends BaseRocksDBUnitTest { private static final int TIMES = 10000 * 1000; @Test - public void testSeekExistKey() throws RocksDBException { + public void testSeekExistKey() { put("exist", "value"); Session session = this.rocks.session(); @@ -49,7 +47,7 @@ public void testSeekExistKey() throws RocksDBException { } @Test - public void testSeekNonExistKey() throws RocksDBException { + public void testSeekNonExistKey() { put("exist", "value"); Session session = this.rocks.session(); @@ -62,7 +60,7 @@ public void testSeekNonExistKey() throws RocksDBException { } @Test - public void testGetExistKey() throws RocksDBException { + public void testGetExistKey() { put("exist", "value"); Session session = this.rocks.session(); @@ -73,7 +71,7 @@ public void testGetExistKey() throws RocksDBException { } @Test - public void testGetNonExistKey() throws RocksDBException { + public void testGetNonExistKey() { put("exist", "value"); Session session = this.rocks.session(); @@ -84,14 +82,14 @@ public void testGetNonExistKey() throws RocksDBException { } @Test - public void testPut() throws RocksDBException { + public void testPut() { for (int i = 0; i < TIMES; i++) { put("person-" + i, "value-" + i); } } @Test - public void testGet3Keys() throws RocksDBException { + public void testGet3Keys() { put("person:1gname", "James"); put("person:1gage", "19"); @@ -110,7 +108,7 @@ public void testGet3Keys() throws RocksDBException { } @Test - public void testMultiGet3Keys() throws RocksDBException { + public void testMultiGet3Keys() { put("person:1gname", "James"); put("person:1gage", "19"); @@ -134,7 +132,7 @@ public void testMultiGet3Keys() throws RocksDBException { } @Test - public void testGet1KeyWithMultiValues() throws RocksDBException { + public void testGet1KeyWithMultiValues() { put("person:1gname", "James"); put("person:1gage", "19"); @@ -153,7 +151,7 @@ public void testGet1KeyWithMultiValues() throws RocksDBException { } @Test - public void testScanByPrefix() throws RocksDBException { + public void testScanByPrefix() { put("person:1gname", "James"); put("person:1gage", "19"); @@ -173,31 +171,31 @@ public void testScanByPrefix() throws RocksDBException { } @Test - public void testGet3KeysWithData() throws RocksDBException { + public void testGet3KeysWithData() { testPut(); testGet3Keys(); } @Test - public void testMultiGet3KeysWithData() throws RocksDBException { + public void testMultiGet3KeysWithData() { testPut(); testMultiGet3Keys(); } @Test - public void testGet1KeyWithData() throws RocksDBException { + public void testGet1KeyWithData() { testPut(); testGet1KeyWithMultiValues(); } @Test - public void testScanByPrefixWithData() throws RocksDBException { + public void testScanByPrefixWithData() { testPut(); testScanByPrefix(); } @Test - public void testUpdate() throws RocksDBException { + public void testUpdate() { Session session = this.rocks.session(); Random r = new Random(); @@ -231,7 +229,7 @@ public void testUpdate() throws RocksDBException { } @Test - public void testScanByPrefixAfterUpdate() throws RocksDBException { + public void testScanByPrefixAfterUpdate() { Session session = this.rocks.session(); this.testUpdate(); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java index 839a0b3e0f..94ffe22949 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionTest.java @@ -19,27 +19,27 @@ import java.nio.ByteBuffer; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Random; -import org.apache.hugegraph.unit.BaseUnitTest; -import org.junit.Assume; -import org.junit.Test; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn; import org.apache.hugegraph.backend.store.BackendEntry.BackendColumnIterator; import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions.Session; import org.apache.hugegraph.testutil.Assert; +import org.apache.hugegraph.unit.BaseUnitTest; +import org.junit.Assume; +import org.junit.Test; +import org.rocksdb.RocksDBException; public class RocksDBSessionTest extends BaseRocksDBUnitTest { @Test - public void testPutAndGet() throws RocksDBException { + public void testPutAndGet() { String value = getString(this.rocks.session().get(TABLE, getBytes("person:1gname"))); - Assert.assertEquals(null, value); + Assert.assertNull(value); this.rocks.session().put(TABLE, getBytes("person:1gname"), getBytes("James")); this.rocks.session().put(TABLE, getBytes("person:1gage"), getBytes(19)); @@ -57,9 +57,9 @@ public void testPutAndGet() throws RocksDBException { } @Test - public void testPutAndMultiGet() throws RocksDBException { - BackendColumnIterator values = this.rocks.session().get(TABLE, - Arrays.asList(getBytes("person:1gname"))); + public void testPutAndMultiGet() { + BackendColumnIterator values = + this.rocks.session().get(TABLE, Collections.singletonList(getBytes("person:1gname"))); Assert.assertFalse(values.hasNext()); this.rocks.session().put(TABLE, getBytes("person:1gname"), getBytes("James")); @@ -67,9 +67,8 @@ public void testPutAndMultiGet() throws RocksDBException { this.rocks.session().put(TABLE, getBytes("person:1gcity"), getBytes("Beijing")); this.commit(); - values = this.rocks.session().get(TABLE, Arrays.asList( - getBytes("person:1gname"), - getBytes("person:1gage"))); + values = this.rocks.session().get(TABLE, Arrays.asList(getBytes("person:1gname"), + getBytes("person:1gage"))); Assert.assertTrue(values.hasNext()); Assert.assertEquals("James", getString(values.next().value)); Assert.assertEquals(19, getLong(values.next().value)); @@ -123,7 +122,7 @@ public void testPutAndGetWithMultiTables() throws RocksDBException { } @Test - public void testMergeWithCounter() throws RocksDBException { + public void testMergeWithCounter() { this.rocks.session().put(TABLE, getBytes("person:1gage"), getBytes(19)); this.commit(); @@ -163,7 +162,7 @@ public void testMergeWithStringList() throws RocksDBException { } @Test - public void testScanByAll() throws RocksDBException { + public void testScanByAll() { put("person:1gname", "James"); put("person:2gname", "Lisa"); @@ -397,7 +396,7 @@ public void testDeleteByKey() throws RocksDBException { this.commit(); Assert.assertEquals("James", get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); + Assert.assertNull(get("person:1gage")); Assert.assertEquals("Beijing", get("person:1gcity")); } @@ -436,9 +435,9 @@ public void testDeleteByPrefix() throws RocksDBException { this.rocks.session().deletePrefix(TABLE, getBytes("person:1")); this.commit(); - Assert.assertEquals(null, get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); - Assert.assertEquals(null, get("person:1gcity")); + Assert.assertNull(get("person:1gname")); + Assert.assertNull(get("person:1gage")); + Assert.assertNull(get("person:1gcity")); Assert.assertEquals("Lisa", get("person:2gname")); } @@ -464,13 +463,13 @@ public void testDeleteByRange() throws RocksDBException { this.rocks.session().deleteRange(TABLE, getBytes("person:1"), getBytes("person:3")); this.commit(); - Assert.assertEquals(null, get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); - Assert.assertEquals(null, get("person:1gcity")); + Assert.assertNull(get("person:1gname")); + Assert.assertNull(get("person:1gage")); + Assert.assertNull(get("person:1gcity")); - Assert.assertEquals(null, get("person:2gname")); - Assert.assertEquals(null, get("person:2gage")); - Assert.assertEquals(null, get("person:2gcity")); + Assert.assertNull(get("person:2gname")); + Assert.assertNull(get("person:2gage")); + Assert.assertNull(get("person:2gcity")); Assert.assertEquals("Hebe", get("person:3gname")); Assert.assertEquals("21", get("person:3gage")); @@ -543,7 +542,7 @@ public void testDeleteByRangeWithSignedBytes() throws RocksDBException { } @Test - public void testDeleteByRangeWithMinMaxByteValue() throws RocksDBException { + public void testDeleteByRangeWithMinMaxByteValue() { Session session = this.rocks.session(); byte[] key11 = new byte[]{1, 0}; @@ -601,17 +600,17 @@ public void testDeleteSingle() throws RocksDBException { this.commit(); Assert.assertEquals("James2", get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); + Assert.assertNull(get("person:1gage")); // deleteSingle after put twice this.rocks.session().deleteSingle(TABLE, getBytes("person:1gname")); this.commit(); // NOTE: maybe return "James" here - Assert.assertEquals(null, get("person:1gname")); + Assert.assertNull(get("person:1gname")); Assert.assertTrue(null == get("person:1gname") || "James".equals(get("person:1gname"))); - Assert.assertEquals(null, get("person:1gage")); + Assert.assertNull(get("person:1gage")); } @Test @@ -628,13 +627,13 @@ public void testCompact() throws RocksDBException { this.commit(); Assert.assertEquals("James", get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); + Assert.assertNull(get("person:1gage")); Assert.assertEquals("Beijing", get("person:1gcity")); this.rocks.session().compactRange(TABLE); Assert.assertEquals("James", get("person:1gname")); - Assert.assertEquals(null, get("person:1gage")); + Assert.assertNull(get("person:1gage")); Assert.assertEquals("Beijing", get("person:1gcity")); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java index 37e1472c42..aa74d9cd64 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/rocksdb/RocksDBSessionsTest.java @@ -21,9 +21,6 @@ import java.io.IOException; import org.apache.commons.io.FileUtils; -import org.junit.Test; -import org.rocksdb.RocksDBException; - import org.apache.hugegraph.backend.store.rocksdb.RocksDBMetrics; import org.apache.hugegraph.backend.store.rocksdb.RocksDBOptions; import org.apache.hugegraph.backend.store.rocksdb.RocksDBSessions; @@ -32,6 +29,9 @@ import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.unit.FakeObjects; +import org.junit.Test; +import org.rocksdb.RocksDBException; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; @@ -162,9 +162,7 @@ public void testIngestSst() throws RocksDBException { HugeConfig config = FakeObjects.newConfig(); String sstPath = DB_PATH + "/sst"; config.addProperty(RocksDBOptions.SST_PATH.name(), sstPath); - RocksDBSstSessions sstSessions = new RocksDBSstSessions(config, - "sst", "store", - sstPath); + RocksDBSstSessions sstSessions = new RocksDBSstSessions(config, "sst", "store", sstPath); final String TABLE1 = "test-table1"; final String TABLE2 = "test-table2"; sstSessions.createTable(TABLE1); @@ -192,8 +190,7 @@ public void testIngestSst() throws RocksDBException { Assert.assertFalse(sstSessions.existsTable(TABLE1)); Assert.assertFalse(sstSessions.existsTable(TABLE2)); - RocksDBSessions rocks = new RocksDBStdSessions(config, "db", "store", - sstPath, sstPath); + RocksDBSessions rocks = new RocksDBStdSessions(config, "db", "store", sstPath, sstPath); // Will ingest sst file of TABLE1 rocks.createTable(TABLE1); Assert.assertEquals(ImmutableList.of("1000"), diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java index 2ead8ba58a..97b55e30b7 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryBackendEntryTest.java @@ -17,13 +17,13 @@ package org.apache.hugegraph.unit.serializer; -import org.junit.Test; - import org.apache.hugegraph.backend.serializer.BinaryBackendEntry; import org.apache.hugegraph.backend.store.BackendEntry.BackendColumn; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.type.HugeType; import org.apache.hugegraph.unit.BaseUnitTest; +import org.junit.Test; + import com.google.common.collect.ImmutableList; public class BinaryBackendEntryTest extends BaseUnitTest { diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java index 28a6a219df..abc1a92fa2 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinaryScatterSerializerTest.java @@ -17,18 +17,17 @@ package org.apache.hugegraph.unit.serializer; -import org.apache.hugegraph.config.HugeConfig; -import org.junit.Test; - import org.apache.hugegraph.backend.serializer.BinaryBackendEntry; import org.apache.hugegraph.backend.serializer.BinaryScatterSerializer; import org.apache.hugegraph.backend.store.BackendEntry; +import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.testutil.Whitebox; import org.apache.hugegraph.unit.BaseUnitTest; import org.apache.hugegraph.unit.FakeObjects; +import org.junit.Test; public class BinaryScatterSerializerTest extends BaseUnitTest { @@ -84,8 +83,7 @@ public void testEdge() { private static BackendEntry parse(BackendEntry originEntry) { byte[] bytes = originEntry.id().asBytes(); - BackendEntry parsedEntry = new BinaryBackendEntry(originEntry.type(), - bytes); + BackendEntry parsedEntry = new BinaryBackendEntry(originEntry.type(), bytes); parsedEntry.columns(originEntry.columns()); return parsedEntry; } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java index 3eb269a265..59e77eb5dd 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/serializer/BinarySerializerTest.java @@ -17,17 +17,16 @@ package org.apache.hugegraph.unit.serializer; -import org.apache.hugegraph.config.HugeConfig; -import org.junit.Test; - import org.apache.hugegraph.backend.serializer.BinarySerializer; import org.apache.hugegraph.backend.store.BackendEntry; +import org.apache.hugegraph.config.HugeConfig; import org.apache.hugegraph.structure.HugeEdge; import org.apache.hugegraph.structure.HugeVertex; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.testutil.Whitebox; import org.apache.hugegraph.unit.BaseUnitTest; import org.apache.hugegraph.unit.FakeObjects; +import org.junit.Test; public class BinarySerializerTest extends BaseUnitTest { From b52517cc47a1a24ee08bf758442069bd1f8c30d3 Mon Sep 17 00:00:00 2001 From: conghuhu <56248584+conghuhu@users.noreply.github.com> Date: Mon, 11 Dec 2023 22:25:51 -0600 Subject: [PATCH 39/51] feat(core): add IntMapByDynamicHash V1 implement (#2377) * feat(WIP): add IntMapByDynamicHash (#2294) * feat: add values & keys in IntMapByDynamicHash * add some basic comment & fix some style * feat: fix pr review * fix: fix some review --------- Co-authored-by: imbajin --- .../util/collection/IntMapByDynamicHash.java | 1022 +++++++++++++++++ .../unit/util/collection/IntMapTest.java | 115 +- .../benchmark/BenchmarkConstants.java | 2 +- .../map/MapRandomGetPutThroughputTest.java | 60 +- 4 files changed, 1170 insertions(+), 29 deletions(-) create mode 100644 hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMapByDynamicHash.java diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMapByDynamicHash.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMapByDynamicHash.java new file mode 100644 index 0000000000..a86def7f13 --- /dev/null +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/util/collection/IntMapByDynamicHash.java @@ -0,0 +1,1022 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hugegraph.util.collection; + +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; + +import sun.misc.Unsafe; + +/** + * This class implements a concurrent hash map specifically designed for integer keys and values. + * It uses low-level programming techniques such as direct memory access via `sun.misc.Unsafe` to + * achieve high performance. + * The class is part of the Apache HugeGraph project. + */ +public class IntMapByDynamicHash implements IntMap { + + private static final int DEFAULT_INITIAL_CAPACITY = 16; + + /** + * The maximum capacity, used if a higher value is implicitly specified + * by either of the constructors with arguments. + * MUST be a power of two <= 1<<30. + */ + private static final int MAXIMUM_CAPACITY = 1 << 30; + + private static final float LOAD_FACTOR = 0.75f; + + private static final int PARTITIONED_SIZE_THRESHOLD = 4096; + + private static final int NULL_VALUE = Integer.MIN_VALUE; + + private static final AtomicReferenceFieldUpdater + TABLE_UPDATER = + AtomicReferenceFieldUpdater.newUpdater(IntMapByDynamicHash.class, Entry[].class, "table"); + + private volatile Entry[] table; + + /** + * Partition counting to improve the concurrency performance of addToSize() + */ + private int[] partitionedSize; + + /** + * updated via atomic field updater + */ + @SuppressWarnings("UnusedDeclaration") + private volatile int size; + + private static final Entry RESIZING = new Entry(NULL_VALUE, NULL_VALUE, (byte) 1); + private static final Entry RESIZED = new Entry(NULL_VALUE, NULL_VALUE, (byte) 2); + + private static final Entry RESIZE_SENTINEL = new Entry(NULL_VALUE, NULL_VALUE, (byte) 3); + + /** + * must be (2^n) - 1 + */ + private static final int SIZE_BUCKETS = 7; + + /** + * Constructor for the IntMapByDynamicHash class. + * + * @param initialCapacity the initial capacity of the map. + */ + public IntMapByDynamicHash(int initialCapacity) { + if (initialCapacity < 0) { + throw new IllegalArgumentException("Illegal Initial Capacity: " + initialCapacity); + } + if (initialCapacity > MAXIMUM_CAPACITY) { + initialCapacity = MAXIMUM_CAPACITY; + } + long size = (long) (1.0 + (long) initialCapacity / LOAD_FACTOR); + int cap = (size >= (long) MAXIMUM_CAPACITY) ? + MAXIMUM_CAPACITY : tableSizeFor((int) size); + if (cap >= PARTITIONED_SIZE_THRESHOLD) { + // we want 7 extra slots, and 64 bytes for each slot int are 4 bytes, + // so 64 bytes are 16 ints. + this.partitionedSize = + new int[SIZE_BUCKETS * 16]; + } + // The end index is for resizeContainer + this.table = new Entry[cap + 1]; + } + + /** + * Default constructor for the IntMapByDynamicHash class. + * Initializes the map with the default initial capacity. + */ + public IntMapByDynamicHash() { + this(DEFAULT_INITIAL_CAPACITY); + } + + private static void setTableAt(Object[] array, int index, Object newValue) { + UNSAFE.putObjectVolatile(array, ((long) index << ENTRY_ARRAY_SHIFT) + ENTRY_ARRAY_BASE, + newValue); + } + + private static int tableSizeFor(int c) { + int n = c - 1; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1; + } + + /* ---------------- Table element access -------------- */ + + private static long entryOffset(int index) { + return ((long) index << ENTRY_ARRAY_SHIFT) + ENTRY_ARRAY_BASE; + } + + private static Object tableAt(Object[] array, int index) { + return UNSAFE.getObjectVolatile(array, entryOffset(index)); + } + + private static boolean casTableAt(Object[] array, int index, Object expected, Object newValue) { + return UNSAFE.compareAndSwapObject(array, entryOffset(index), expected, newValue); + } + + /** + * Puts a key-value pair into the map. If the key already exists in the map, its value is + * updated. + * + * @param key the key to be put into the map. + * @param value the value to be associated with the key. + * @return true if the operation is successful. + */ + @Override + public boolean put(int key, int value) { + int hash = this.hash(key); + Entry[] currentArray = this.table; + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, hash); + if (o == null) { + Entry newEntry = new Entry(key, value); + this.addToSize(1); + if (IntMapByDynamicHash.casTableAt(currentArray, hash, null, newEntry)) { + return true; + } + this.addToSize(-1); + } + + this.slowPut(key, value, currentArray); + return true; + } + + /** + * This method is used when the normal put operation fails due to a hash collision. + * It searches for the key in the chain and if found, replaces the entry. + * If the key is not found, it adds a new entry. + * + * @param key the key to be put into the map. + * @param value the value to be associated with the key. + * @param currentTable the current table where the key-value pair is to be put. + * @return the old value if the key is already present in the map, otherwise NULL_VALUE. + */ + private int slowPut(int key, int value, Entry[] currentTable) { + int length; + int index; + Entry o; + + while (true) { + length = currentTable.length; + index = this.hash(key, length); + o = (Entry) IntMapByDynamicHash.tableAt(currentTable, index); + + if (o == RESIZED || o == RESIZING) { + currentTable = this.helpWithResizeWhileCurrentIndex(currentTable, index); + } else { + Entry e = o; + boolean found = false; + + // Search for the key in the chain + while (e != null) { + int candidate = e.getKey(); + if (candidate == key) { + found = true; + break; + } + e = e.getNext(); + } + + if (found) { + int oldVal = e.getValue(); + // Key found, replace the entry + Entry newEntry = + new Entry(key, value, this.createReplacementChainForRemoval(o, e)); + if (IntMapByDynamicHash.casTableAt(currentTable, index, o, newEntry)) { + return oldVal; + } + } else { + // Key not found, add a new entry + Entry newEntry = new Entry(key, value, o); + if (IntMapByDynamicHash.casTableAt(currentTable, index, o, newEntry)) { + this.incrementSizeAndPossiblyResize(currentTable, length, o); + return NULL_VALUE; + } + } + } + } + } + + /** + * Retrieves the value associated with the given key from the map. + * + * @param key the key whose associated value is to be returned. + * @return the value associated with the given key, or NULL_VALUE if the key does not exist + * in the map. + */ + @Override + public int get(int key) { + int hash = this.hash(key); + Entry[] currentArray = this.table; + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, hash); + if (o == RESIZED || o == RESIZING) { + return this.slowGet(key, currentArray); + } + for (Entry e = o; e != null; e = e.getNext()) { + int k; + // TODO: check why key == k is always false + if ((k = e.getKey()) == key || key == k) { + return e.value; + } + } + return NULL_VALUE; + } + + /** + * This method is used when the normal get operation fails due to a hash collision. + * It searches for the key in the chain and returns the associated value if found. + * + * @param key the key whose associated value is to be returned. + * @param currentArray the current table where the key-value pair is located. + * @return the value associated with the given key, or NULL_VALUE if the key does not exist + * in the map. + */ + private int slowGet(int key, Entry[] currentArray) { + while (true) { + int length = currentArray.length; + int hash = this.hash(key, length); + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, hash); + if (o == RESIZED || o == RESIZING) { + currentArray = this.helpWithResizeWhileCurrentIndex(currentArray, hash); + } else { + Entry e = o; + while (e != null) { + int candidate = e.getKey(); + if (candidate == key) { + return e.getValue(); + } + e = e.getNext(); + } + return NULL_VALUE; + } + } + } + + /** + * Removes the key-value pair with the given key from the map. + * + * @param key the key whose associated key-value pair is to be removed. + * @return true if the key-value pair was found and removed, false otherwise. + */ + @Override + public boolean remove(int key) { + int hash = this.hash(key); + Entry[] currentTable = this.table; + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentTable, hash); + if (o == RESIZED || o == RESIZING) { + return this.slowRemove(key, currentTable) != null; + } + + Entry e = o; + while (e != null) { + int candidate = e.getKey(); + if (candidate == key) { + Entry replacement = this.createReplacementChainForRemoval(o, e); + if (IntMapByDynamicHash.casTableAt(currentTable, hash, o, replacement)) { + this.addToSize(-1); + return true; + } + return this.slowRemove(key, currentTable) != null; + } + e = e.getNext(); + } + return false; + } + + /** + * This method is used when the normal remove operation fails due to a hash collision. + * It searches for the key in the chain and if found, removes the entry. + * + * @param key the key whose associated key-value pair is to be removed. + * @param currentTable the current table where the key-value pair is located. + * @return the removed entry if the key is found, otherwise null. + */ + private Entry slowRemove(int key, Entry[] currentTable) { + int length; + int index; + Entry o; + + while (true) { + length = currentTable.length; + index = this.hash(key, length); + o = (Entry) IntMapByDynamicHash.tableAt(currentTable, index); + if (o == RESIZED || o == RESIZING) { + currentTable = this.helpWithResizeWhileCurrentIndex(currentTable, index); + } else { + Entry e = o; + Entry prev = null; + + while (e != null) { + int candidate = e.getKey(); + if (candidate == key) { + Entry replacement = this.createReplacementChainForRemoval(o, e); + if (IntMapByDynamicHash.casTableAt(currentTable, index, o, replacement)) { + this.addToSize(-1); + return e; + } + // Key found, but CAS failed, restart the loop + break; + } + prev = e; + e = e.getNext(); + } + + if (prev != null) { + // Key doesn't found + return null; + } + } + } + } + + /** + * Checks if the map contains a key-value pair with the given key. + * + * @param key the key to be checked. + * @return true if the map contains a key-value pair with the given key, false otherwise. + */ + @Override + public boolean containsKey(int key) { + return this.getEntry(key) != null; + } + + @Override + public IntIterator keys() { + return new KeyIterator(); + } + + @Override + public IntIterator values() { + return new ValueIterator(); + } + + /** + * Removes all the mappings from this map. The map will be empty after this call returns. + */ + @Override + public void clear() { + Entry[] currentArray = this.table; + ResizeContainer resizeContainer; + do { + resizeContainer = null; + for (int i = 0; i < currentArray.length - 1; i++) { + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, i); + if (o == RESIZED || o == RESIZING) { + resizeContainer = + (ResizeContainer) IntMapByDynamicHash.tableAt(currentArray, + currentArray.length - 1); + } else if (o != null) { + Entry e = o; + if (IntMapByDynamicHash.casTableAt(currentArray, i, o, null)) { + int removedEntries = 0; + while (e != null) { + removedEntries++; + e = e.getNext(); + } + this.addToSize(-removedEntries); + } + } + } + if (resizeContainer != null) { + if (resizeContainer.isNotDone()) { + this.helpWithResize(currentArray); + resizeContainer.waitForAllResizers(); + } + currentArray = resizeContainer.nextArray; + } + } while (resizeContainer != null); + } + + @Override + public int size() { + int localSize = this.size; + if (this.partitionedSize != null) { + for (int i = 0; i < SIZE_BUCKETS; i++) { + localSize += this.partitionedSize[i << 4]; + } + } + return localSize; + } + + @Override + public boolean concurrent() { + return true; + } + + private int hash(int key) { + return key & (table.length - 2); + } + + private int hash(int key, int length) { + return key & (length - 2); + } + + private Entry getEntry(int key) { + Entry[] currentArray = this.table; + while (true) { + int length = currentArray.length; + int index = this.hash(key, length); + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, index); + if (o == RESIZED || o == RESIZING) { + currentArray = this.helpWithResizeWhileCurrentIndex(currentArray, index); + } else { + Entry e = o; + while (e != null) { + int candidate = e.getKey(); + if (candidate == key) { + return e; + } + e = e.getNext(); + } + return null; + } + } + } + + private void addToSize(int value) { + if (this.partitionedSize != null) { + if (this.incrementPartitionedSize(value)) { + return; + } + } + this.incrementLocalSize(value); + } + + private boolean incrementPartitionedSize(int value) { + int h = (int) Thread.currentThread().getId(); + h ^= (h >>> 18) ^ (h >>> 12); + h = (h ^ (h >>> 10)) & SIZE_BUCKETS; + if (h != 0) { + h = (h - 1) << 4; + long address = ((long) h << INT_ARRAY_SHIFT) + INT_ARRAY_BASE; + while (true) { + int localSize = UNSAFE.getIntVolatile(this.partitionedSize, address); + if (UNSAFE.compareAndSwapInt(this.partitionedSize, address, localSize, + localSize + value)) { + return true; + } + } + } + return false; + } + + private void incrementLocalSize(int value) { + while (true) { + int localSize = this.size; + if (UNSAFE.compareAndSwapInt(this, SIZE_OFFSET, localSize, localSize + value)) { + break; + } + } + } + + private Entry createReplacementChainForRemoval(Entry original, Entry toRemove) { + if (original == toRemove) { + return original.getNext(); + } + Entry replacement = null; + Entry e = original; + while (e != null) { + if (e != toRemove) { + replacement = new Entry(e.getKey(), e.getValue(), replacement); + } + e = e.getNext(); + } + return replacement; + } + + private void incrementSizeAndPossiblyResize(Entry[] currentArray, int length, Entry prev) { + this.addToSize(1); + if (prev != null) { + int localSize = this.size(); + int threshold = (int) (length * LOAD_FACTOR); // threshold = length * 0.75 + if (localSize + 1 > threshold) { + this.resize(currentArray); + } + } + } + + private Entry[] helpWithResizeWhileCurrentIndex(Entry[] currentArray, int index) { + Entry[] newArray = this.helpWithResize(currentArray); + int helpCount = 0; + while (IntMapByDynamicHash.tableAt(currentArray, index) != RESIZED) { + helpCount++; + newArray = this.helpWithResize(currentArray); + if ((helpCount & 7) == 0) { + Thread.yield(); + } + } + return newArray; + } + + private void resize(Entry[] oldTable) { + this.resize(oldTable, (oldTable.length - 1 << 1) + 1); + } + + /** + * Resizes the map to a new capacity. This method is called when the map's size exceeds its + * threshold. It creates a new array with the new capacity and transfers all entries from the + * old array to the new one. + * Note: newSize must be a power of 2 + 1 + * + * @param oldTable The old table to resize. + * @param newSize The new size for the table. + */ + @SuppressWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") + private void resize(Entry[] oldTable, int newSize) { + int oldCapacity = oldTable.length; + int end = oldCapacity - 1; + Entry last = (Entry) IntMapByDynamicHash.tableAt(oldTable, end); + if (this.size() < end && last == RESIZE_SENTINEL) { + return; + } + if (oldCapacity >= MAXIMUM_CAPACITY) { + throw new RuntimeException("max capacity of map exceeded"); + } + ResizeContainer resizeContainer = null; + // This ownResize records whether current thread need to perform the expansion operation of + // the map by itself + boolean ownResize = false; + if (last == null || last == RESIZE_SENTINEL) { + // allocating a new array is too expensive to make this an atomic operation + synchronized (oldTable) { + if (IntMapByDynamicHash.tableAt(oldTable, end) == null) { + IntMapByDynamicHash.setTableAt(oldTable, end, RESIZE_SENTINEL); + if (this.partitionedSize == null && newSize >= PARTITIONED_SIZE_THRESHOLD) { + this.partitionedSize = new int[SIZE_BUCKETS * 16]; + } + resizeContainer = new ResizeContainer(new Entry[newSize], oldTable.length - 1); + IntMapByDynamicHash.setTableAt(oldTable, end, resizeContainer); + ownResize = true; + } + } + } + if (ownResize) { + this.transfer(oldTable, resizeContainer); + + Entry[] src = this.table; + while (!TABLE_UPDATER.compareAndSet(this, oldTable, resizeContainer.nextArray)) { + /* + we're in a double resize situation; we'll have to go help until it's our turn + to set the table + */ + if (src != oldTable) { + this.helpWithResize(src); + } + } + } else { + this.helpWithResize(oldTable); + } + } + + /** + * Transfers all entries from the source table to the destination table. This method is + * called during the resize operation. It iterates over the source table and for each non-null + * entry, it copies the entry to the destination table. If the entry in the source table is + * marked as RESIZED or RESIZING, it helps with the resize operation. + * After all entries are transferred, it notifies the ResizeContainer that the resize operation + * is done. + * + * @param src The source table from which entries are to be transferred. + * @param resizeContainer The container that holds the state of the resize operation. + */ + private void transfer(Entry[] src, ResizeContainer resizeContainer) { + Entry[] dest = resizeContainer.nextArray; + + for (int j = 0; j < src.length - 1; ) { + Entry o = (Entry) IntMapByDynamicHash.tableAt(src, j); + if (o == null) { + if (IntMapByDynamicHash.casTableAt(src, j, null, RESIZED)) { + j++; + } + } else if (o == RESIZED || o == RESIZING) { + /* + During the expansion process, other threads have already migrated the elements at + this location to the new array. This means that the elements in the current + position have already been processed and do not need to be migrated again. + */ + j = (j & ~(ResizeContainer.QUEUE_INCREMENT - 1)) + ResizeContainer.QUEUE_INCREMENT; + /* + When there is only one thread for expansion, there is no concurrency issue + and there is no need to wait. + */ + if (resizeContainer.resizers.get() == 1) { + break; + } + } else { + Entry e = o; + if (IntMapByDynamicHash.casTableAt(src, j, o, RESIZING)) { + while (e != null) { + this.unconditionalCopy(dest, e); + e = e.getNext(); + } + IntMapByDynamicHash.setTableAt(src, j, RESIZED); + j++; + } + } + } + resizeContainer.decrementResizerAndNotify(); + resizeContainer.waitForAllResizers(); + } + + /** + * Enable the current thread to participate in the expansion + */ + private Entry[] helpWithResize(Entry[] currentArray) { + ResizeContainer resizeContainer = + (ResizeContainer) IntMapByDynamicHash.tableAt(currentArray, currentArray.length - 1); + Entry[] newTable = resizeContainer.nextArray; + if (resizeContainer.getQueuePosition() > ResizeContainer.QUEUE_INCREMENT) { + resizeContainer.incrementResizer(); + this.reverseTransfer(currentArray, resizeContainer); + resizeContainer.decrementResizerAndNotify(); + } + return newTable; + } + + /** + * Transfers entries from the old table to the new table in reverse order. This method is used + * to help the resize operation by spreading the work among multiple threads. Each thread + * transfers a portion of the entries from the end of the old table to the beginning of the new + * table. + * + * @param src The old table to transfer entries from. + * @param resizeContainer The container that holds the state of the resize operation. + */ + private void reverseTransfer(Entry[] src, ResizeContainer resizeContainer) { + Entry[] dest = resizeContainer.nextArray; + while (resizeContainer.getQueuePosition() > 0) { + int start = resizeContainer.subtractAndGetQueuePosition(); + int end = start + ResizeContainer.QUEUE_INCREMENT; + if (end > 0) { + if (start < 0) { + start = 0; + } + for (int j = end - 1; j >= start; ) { + Entry o = (Entry) IntMapByDynamicHash.tableAt(src, j); + if (o == null) { + if (IntMapByDynamicHash.casTableAt(src, j, null, RESIZED)) { + j--; + } + } else if (o == RESIZED || o == RESIZING) { + resizeContainer.zeroOutQueuePosition(); + return; + } else { + Entry e = o; + if (IntMapByDynamicHash.casTableAt(src, j, o, RESIZING)) { + while (e != null) { + this.unconditionalCopy(dest, e); + e = e.getNext(); + } + IntMapByDynamicHash.setTableAt(src, j, RESIZED); + j--; + } + } + } + } + } + } + + /** + * Copies an entry from the old table to the new table. This method is called during the resize + * operation. It does not check if the entry already exists in the new table, so it should only + * be called with entries that are not in the new table yet. + * + * @param dest The new table to copy the entry to. + * @param toCopyEntry The entry to copy. + */ + private void unconditionalCopy(Entry[] dest, Entry toCopyEntry) { + Entry[] currentArray = dest; + while (true) { + int length = currentArray.length; + int index = this.hash(toCopyEntry.getKey(), length); + Entry o = (Entry) IntMapByDynamicHash.tableAt(currentArray, index); + if (o == RESIZED || o == RESIZING) { + currentArray = + ((ResizeContainer) IntMapByDynamicHash.tableAt(currentArray, + length - 1)).nextArray; + } else { + Entry newEntry; + if (o == null) { + if (toCopyEntry.getNext() == null) { + newEntry = toCopyEntry; // no need to duplicate + } else { + newEntry = new Entry(toCopyEntry.getKey(), toCopyEntry.getValue()); + } + } else { + newEntry = new Entry(toCopyEntry.getKey(), toCopyEntry.getValue(), o); + } + if (IntMapByDynamicHash.casTableAt(currentArray, index, o, newEntry)) { + return; + } + } + } + } + + /** + * The ResizeContainer class is used to hold the state of the resize operation. + * It contains the new array to which entries are transferred, the number of threads + * participating in the resize operation, and the position in the old array from which + * entries are transferred. + */ + private static final class ResizeContainer extends Entry { + + private static final int QUEUE_INCREMENT = + Math.min(1 << 10, + Integer.highestOneBit(IntSet.CPUS) << 4); + private final AtomicInteger resizers = new AtomicInteger(1); + private final Entry[] nextArray; + private final AtomicInteger queuePosition; + + private ResizeContainer(Entry[] nextArray, int oldSize) { + super(NULL_VALUE, NULL_VALUE, (byte) 4); + this.nextArray = nextArray; + this.queuePosition = new AtomicInteger(oldSize); + } + + public void incrementResizer() { + this.resizers.incrementAndGet(); + } + + public void decrementResizerAndNotify() { + int remaining = this.resizers.decrementAndGet(); + if (remaining == 0) { + synchronized (this) { + this.notifyAll(); + } + } + } + + public int getQueuePosition() { + return this.queuePosition.get(); + } + + public int subtractAndGetQueuePosition() { + return this.queuePosition.addAndGet(-QUEUE_INCREMENT); + } + + public void waitForAllResizers() { + if (this.resizers.get() > 0) { + for (int i = 0; i < 16; i++) { + if (this.resizers.get() == 0) { + break; + } + } + for (int i = 0; i < 16; i++) { + if (this.resizers.get() == 0) { + break; + } + Thread.yield(); + } + } + if (this.resizers.get() > 0) { + synchronized (this) { + while (this.resizers.get() > 0) { + try { + this.wait(); + } catch (InterruptedException e) { + // ignore + } + } + } + } + } + + public boolean isNotDone() { + return this.resizers.get() > 0; + } + + public void zeroOutQueuePosition() { + this.queuePosition.set(0); + } + } + + private static class Entry { + + final int key; + volatile int value; + volatile Entry next; + + /** + * 0 NORMAL + * 1 RESIZING + * 2 RESIZED + * 3 RESIZE_SENTINEL + * 4 RESIZE_CONTAINER + */ + final byte state; + + public Entry(int key, int value, byte state) { + this.key = key; + this.value = value; + this.state = state; + } + + public Entry(int key, int value) { + this.key = key; + this.value = value; + this.next = null; + this.state = 0; + } + + public Entry(int key, int value, Entry next) { + this.key = key; + this.value = value; + this.next = next; + this.state = 0; + } + + public int getKey() { + return key; + } + + public int getValue() { + return value; + } + + public Entry getNext() { + return next; + } + + @Override + public String toString() { + return this.key + "=" + this.value; + } + } + + /* ---------------- Iterator -------------- */ + + private static final class IteratorState { + private Entry[] currentTable; + private int start; + private int end; + + private IteratorState(Entry[] currentTable) { + this.currentTable = currentTable; + this.end = this.currentTable.length - 1; + } + + private IteratorState(Entry[] currentTable, int start, int end) { + this.currentTable = currentTable; + this.start = start; + this.end = end; + } + } + + /** + * The HashIterator class is an abstract base class for iterators over the map. + * It maintains the current state of the iteration, which includes the current table + * being iterated over and the index of the next entry to be returned. + * The findNext() method is used to advance the iterator to the next entry. + */ + private abstract class HashIterator implements IntIterator { + + private List todo; + private IteratorState currentState; + private Entry next; + private int index; + + protected HashIterator() { + this.currentState = new IteratorState(IntMapByDynamicHash.this.table); + this.findNext(); + } + + /** + * This method is used to advance the iterator to the next entry. + * It iterates over the entries in the current table from the current index + * until it finds a non-null entry. If it encounters a RESIZED or RESIZING entry, + * it helps with the resize operation and continues the iteration in the new table. + * If it reaches the end of the current table and there are still tables left to be + * iterated over, it switches to the next table. + */ + private void findNext() { + while (this.index < this.currentState.end) { + Entry o = + (Entry) IntMapByDynamicHash.tableAt(this.currentState.currentTable, this.index); + if (o == RESIZED || o == RESIZING) { + Entry[] nextArray = + IntMapByDynamicHash.this.helpWithResizeWhileCurrentIndex( + this.currentState.currentTable, this.index); + int endResized = this.index + 1; + while (endResized < this.currentState.end) { + if (IntMapByDynamicHash.tableAt(this.currentState.currentTable, + endResized) != RESIZED) { + break; + } + endResized++; + } + if (this.todo == null) { + this.todo = new ArrayList<>(4); + } + if (endResized < this.currentState.end) { + this.todo.add(new IteratorState( + this.currentState.currentTable, endResized, this.currentState.end)); + } + int powerTwoLength = this.currentState.currentTable.length - 1; + this.todo.add(new IteratorState(nextArray, this.index + powerTwoLength, + endResized + powerTwoLength)); + this.currentState.currentTable = nextArray; + this.currentState.end = endResized; + this.currentState.start = this.index; + } else if (o != null) { + this.next = o; + this.index++; + break; + } else { + this.index++; + } + } + if (this.next == null && this.index == this.currentState.end && this.todo != null && + !this.todo.isEmpty()) { + this.currentState = this.todo.remove(this.todo.size() - 1); + this.index = this.currentState.start; + this.findNext(); + } + } + + @Override + public final boolean hasNext() { + return this.next != null; + } + + final Entry nextEntry() { + Entry e = this.next; + if (e == null) { + throw new NoSuchElementException(); + } + + if ((this.next = e.getNext()) == null) { + this.findNext(); + } + return e; + } + } + + private final class ValueIterator extends HashIterator { + @Override + public int next() { + return this.nextEntry().getValue(); + } + } + + private final class KeyIterator extends HashIterator { + @Override + public int next() { + return this.nextEntry().getKey(); + } + } + + /* ---------------- Unsafe mechanics -------------- */ + private static final Unsafe UNSAFE = IntSet.UNSAFE; + private static final long ENTRY_ARRAY_BASE; + private static final int ENTRY_ARRAY_SHIFT; + private static final long INT_ARRAY_BASE; + private static final int INT_ARRAY_SHIFT; + private static final long SIZE_OFFSET; + + static { + try { + Class tableClass = Entry[].class; + ENTRY_ARRAY_BASE = UNSAFE.arrayBaseOffset(tableClass); + int objectArrayScale = UNSAFE.arrayIndexScale(tableClass); + if ((objectArrayScale & (objectArrayScale - 1)) != 0) { + throw new AssertionError("data type scale not a power of two"); + } + ENTRY_ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(objectArrayScale); + + Class intArrayClass = int[].class; + INT_ARRAY_BASE = UNSAFE.arrayBaseOffset(intArrayClass); + int intArrayScale = UNSAFE.arrayIndexScale(intArrayClass); + if ((intArrayScale & (intArrayScale - 1)) != 0) { + throw new AssertionError("data type scale not a power of two"); + } + INT_ARRAY_SHIFT = 31 - Integer.numberOfLeadingZeros(intArrayScale); + + Class mapClass = IntMapByDynamicHash.class; + SIZE_OFFSET = UNSAFE.objectFieldOffset(mapClass.getDeclaredField("size")); + } catch (NoSuchFieldException | SecurityException e) { + throw new AssertionError(e); + } + } +} diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java index 4e2ca9c388..29755bc718 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IntMapTest.java @@ -21,17 +21,22 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.Random; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; -import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.unit.BaseUnitTest; import org.apache.hugegraph.util.collection.IntIterator; import org.apache.hugegraph.util.collection.IntMap; +import org.apache.hugegraph.util.collection.IntMapByDynamicHash; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; public class IntMapTest extends BaseUnitTest { @@ -412,6 +417,106 @@ public void testIntFixedMapBySegmentsValuesWithMultiSegs() { } } + @Test + public void testIntMapByDynamicHashSingleThread() { + IntMap map = new IntMapByDynamicHash(); + int mapSize = 2000; + for (int i = 0; i < mapSize; i++) { + map.put(i, i + 1); + Assert.assertTrue(map.containsKey(i)); + Assert.assertFalse(map.containsKey(i + mapSize)); + Assert.assertEquals(i + 1, map.get(i)); + } + + for (int i = mapSize - 1; i >= 0; i--) { + map.put(i, i - 1); + Assert.assertTrue(map.containsKey(i)); + Assert.assertFalse(map.containsKey(i + mapSize)); + Assert.assertEquals(i - 1, map.get(i)); + } + + Assert.assertEquals(mapSize, map.size()); + map.clear(); + Assert.assertEquals(0, map.size()); + } + + @Test + public void testIntMapByDynamicHashMultiThread() throws InterruptedException { + IntMap map = new IntMapByDynamicHash(); + + //int cpus = IntSet.CPUS; + int cpus = 16; + ThreadPoolExecutor executor = + new ThreadPoolExecutor(cpus, cpus, 1, TimeUnit.MINUTES, + new LinkedBlockingDeque<>()) { + @Override + protected void afterExecute(Runnable r, Throwable t) { + super.afterExecute(r, t); + if (t != null) { + Assert.fail(t.getMessage()); + } + } + }; + ; + + AtomicInteger size = new AtomicInteger(); + int mapSize = 100; + CountDownLatch latch = new CountDownLatch(cpus); + for (int i = 1; i <= cpus; i++) { + int index = i; + executor.submit(() -> { + try { + for (int j = 0; j < mapSize; j++) { + int key = j + (index - 1) * mapSize; + map.put(key, j); + size.getAndIncrement(); + //Assert.assertTrue(map.containsKey(key)); + Assert.assertEquals(j, map.get(key)); + //System.out.println(key + " " + j); + } + } catch (Exception e) { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } finally { + latch.countDown(); + } + }); + } + + latch.await(); + System.out.println(); + + Assert.assertEquals(size.get(), map.size()); + } + + @Test + public void testIntMapByDynamicHashKeys() { + IntMap map = new IntMapByDynamicHash(); + for (int i = 0; i < 10000; i++) { + map.put(i, i + 100); + } + IntIterator iterator = map.keys(); + for (int i = 0; i < 10000; i++) { + Assert.assertTrue(iterator.hasNext()); + Assert.assertEquals(i, iterator.next()); + } + Assert.assertFalse(iterator.hasNext()); + } + + @Test + public void testIntMapByDynamicHashValues() { + IntMap map = new IntMapByDynamicHash(); + for (int i = 0; i < 10000; i++) { + map.put(i, i + 100); + } + IntIterator iterator = map.values(); + for (int i = 0; i < 10000; i++) { + Assert.assertTrue(iterator.hasNext()); + Assert.assertEquals(i + 100, iterator.next()); + } + Assert.assertFalse(iterator.hasNext()); + } + private IntMap fixed(int capacity) { return new IntMap.IntMapByFixedAddr(capacity); } diff --git a/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java index 1525e8143e..1641bc95c9 100644 --- a/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java +++ b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/BenchmarkConstants.java @@ -19,5 +19,5 @@ public class BenchmarkConstants { - public static String OUTPUT_PATH = "./hugegraph-test/target/"; + public static String OUTPUT_PATH = "./hugegraph-server/hugegraph-test/target/"; } diff --git a/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java index eafe4b861f..4423351b52 100644 --- a/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java +++ b/hugegraph-server/hugegraph-test/src/test/java/org/apache/hugegraph/benchmark/map/MapRandomGetPutThroughputTest.java @@ -23,6 +23,7 @@ import org.apache.hugegraph.benchmark.BenchmarkConstants; import org.apache.hugegraph.benchmark.SimpleRandom; import org.apache.hugegraph.util.collection.IntMap; +import org.apache.hugegraph.util.collection.IntMapByDynamicHash; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -53,13 +54,15 @@ public class MapRandomGetPutThroughputTest { @Param(value = {"1000", "10000", "100000", "1000000"}) private int MAP_CAPACITY; - private ConcurrentHashMap concurrentHashMapNonCap; + private ConcurrentHashMap concurrentHashMapWithoutCap; - private ConcurrentHashMap concurrentHashMap; + private ConcurrentHashMap concurrentHashMapWithCap; - private IntMap.IntMapBySegments intMapBySegments; + private IntMap intMapBySegmentsWithCap; - private IntMap.IntMapByEcSegment intMapByEcSegments; + private IntMap intMapByDynamicHashWithoutCap; + + private IntMap intMapByDynamicHashWithCap; private static final int THREAD_COUNT = 8; @@ -67,10 +70,11 @@ public class MapRandomGetPutThroughputTest { @Setup(Level.Trial) public void prepareMap() { - this.concurrentHashMapNonCap = new ConcurrentHashMap<>(); - this.concurrentHashMap = new ConcurrentHashMap<>(MAP_CAPACITY); - this.intMapBySegments = new IntMap.IntMapBySegments(MAP_CAPACITY); - this.intMapByEcSegments = new IntMap.IntMapByEcSegment(); + this.concurrentHashMapWithoutCap = new ConcurrentHashMap<>(); + this.concurrentHashMapWithCap = new ConcurrentHashMap<>(MAP_CAPACITY); + this.intMapBySegmentsWithCap = new IntMap.IntMapBySegments(MAP_CAPACITY); + this.intMapByDynamicHashWithoutCap = new IntMapByDynamicHash(); + this.intMapByDynamicHashWithCap = new IntMapByDynamicHash(MAP_CAPACITY); } /** @@ -89,41 +93,51 @@ int next() { @Benchmark @Threads(THREAD_COUNT) public void randomGetPutOfConcurrentHashMapWithNoneInitCap(ThreadState state) { - int key = state.next() & (MAP_CAPACITY - 1); - if (!this.concurrentHashMapNonCap.containsKey(key)) { - this.concurrentHashMapNonCap.put(key, state.next()); + int key = state.next(); + if (!this.concurrentHashMapWithoutCap.containsKey(key)) { + this.concurrentHashMapWithoutCap.put(key, state.next()); } - this.concurrentHashMapNonCap.get(key); + this.concurrentHashMapWithoutCap.get(key); } @Benchmark @Threads(THREAD_COUNT) public void randomGetPutOfConcurrentHashMapWithInitCap(ThreadState state) { int key = state.next() & (MAP_CAPACITY - 1); - if (!this.concurrentHashMap.containsKey(key)) { - this.concurrentHashMap.put(key, state.next()); + if (!this.concurrentHashMapWithCap.containsKey(key)) { + this.concurrentHashMapWithCap.put(key, state.next()); } - this.concurrentHashMap.get(key); + this.concurrentHashMapWithCap.get(key); } @Benchmark @Threads(THREAD_COUNT) - public void randomGetPutOfIntMapBySegments(ThreadState state) { + public void randomGetPutOfIntMapBySegmentsWithInitCap(ThreadState state) { int key = state.next() & (MAP_CAPACITY - 1); - if (!this.intMapBySegments.containsKey(key)) { - this.intMapBySegments.put(key, state.next()); + if (!this.intMapBySegmentsWithCap.containsKey(key)) { + this.intMapBySegmentsWithCap.put(key, state.next()); + } + this.intMapBySegmentsWithCap.get(key); + } + + @Benchmark + @Threads(THREAD_COUNT) + public void randomGetPutOfIntMapByDynamicHashWithNoneCap(ThreadState state) { + int key = state.next(); + if (!this.intMapByDynamicHashWithoutCap.containsKey(key)) { + this.intMapByDynamicHashWithoutCap.put(key, state.next()); } - this.intMapBySegments.get(key); + this.intMapByDynamicHashWithoutCap.get(key); } @Benchmark @Threads(THREAD_COUNT) - public void randomGetPutOfIntMapByEcSegment(ThreadState state) { + public void randomGetPutOfIntMapByDynamicHashWithInitCap(ThreadState state) { int key = state.next() & (MAP_CAPACITY - 1); - if (!this.intMapByEcSegments.containsKey(key)) { - this.intMapByEcSegments.put(key, state.next()); + if (!this.intMapByDynamicHashWithCap.containsKey(key)) { + this.intMapByDynamicHashWithCap.put(key, state.next()); } - this.intMapByEcSegments.get(key); + this.intMapByDynamicHashWithCap.get(key); } public static void main(String[] args) throws RunnerException { From 2c6fcdc719a0afa7e2d1eaddb0c063d152445a8f Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:00:50 +0800 Subject: [PATCH 40/51] add maven args for stage or other args (#2386) --- hugegraph-server/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index a28e63ea13..47dc411c6e 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -21,7 +21,9 @@ FROM maven:3.9.0-eclipse-temurin-11 AS build COPY . /pkg WORKDIR /pkg -RUN mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +ARG MAVEN_ARGS + +RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l # 2nd stage: runtime env FROM openjdk:11-slim From 4346b44f80b316eb9cb1aa5babafc90dfc71f2b1 Mon Sep 17 00:00:00 2001 From: vaughn Date: Thu, 14 Dec 2023 17:59:31 +0800 Subject: [PATCH 41/51] fix: TinkerPop unit test lack some lables (#2387) --- .../main/java/org/apache/hugegraph/tinkerpop/TestGraph.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java index 415e804626..f5c1ac7fb5 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java @@ -874,6 +874,10 @@ private void initBasicVertexLabelAndEdgeLabelExceptV(String defaultVL) { schema.indexLabel("bTOcByGremlinPartition").onE("bTOc") .by("gremlin.partitionGraphStrategy.partition") .ifNotExist().create(); + schema.edgeLabel("blah1").link(defaultVL, defaultVL) + .ifNotExist().create(); + schema.edgeLabel("blah2").link(defaultVL, defaultVL) + .ifNotExist().create(); } public void initEdgeLabelDefaultKnowsDefault(String defaultVL) { From cb4427d9f14a45a6cf329575757db98d9b93ecf6 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Sun, 17 Dec 2023 15:59:28 +0800 Subject: [PATCH 42/51] doc: adjust docker desc in readme (#2390) * fix(dist): update relative path for the 1.2.0 * add docker policy and run server in daemon * fix: use tail to avoid container exit * adjuest the order of quick start * Update hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy * adjust desc * Update README.md * Update pom.xml --------- Co-authored-by: imbajin --- README.md | 36 +++++++++---------- hugegraph-server/Dockerfile | 1 + .../{README.md => docker/READEME.md} | 12 +++++-- .../docker/docker-entrypoint.sh | 4 ++- .../docker/scripts/detect-storage.groovy | 2 +- hugegraph-server/hugegraph-dist/pom.xml | 16 --------- .../hugegraph-dist/scripts/apache-release.sh | 4 +-- 7 files changed, 34 insertions(+), 41 deletions(-) rename hugegraph-server/hugegraph-dist/{README.md => docker/READEME.md} (81%) diff --git a/README.md b/README.md index 5e589be604..ef64f10241 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,8 @@ [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![HugeGraph-CI](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml) -[![CodeQL](https://github.com/apache/incubator-hugegraph/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/codeql-analysis.yml) [![License checker](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml) -[![Codecov](https://codecov.io/gh/apache/incubator-hugegraph/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/incubator-hugegraph) [![GitHub Releases Downloads](https://img.shields.io/github/downloads/apache/hugegraph/total.svg)](https://github.com/apache/hugegraph/releases) -[![stars](https://img.shields.io/github/stars/apache/hugegraph)](https://github.com/apache/incubator-hugegraph/stargazers) @@ -27,28 +24,18 @@ Billions of vertices and edges can be easily stored into and queried from HugeGr - Compliance to [Apache TinkerPop 3](https://tinkerpop.apache.org/), support [Gremlin](https://tinkerpop.apache.org/gremlin.html) & [Cypher](https://en.wikipedia.org/wiki/Cypher) language - Schema Metadata Management, including VertexLabel, EdgeLabel, PropertyKey and IndexLabel - Multi-type Indexes, supporting exact query, range query and complex conditions combination query -- Plug-in Backend Store Driver Framework, support `RocksDB`, `Cassandra`, `HBase`, `ScyllaDB`, and `MySQL/Postgre` now and easy to add other backend store driver if needed +- Plug-in Backend Store Driver Framework, support `RocksDB`, `Cassandra`, `HBase`, `ScyllaDB`, and `MySQL/Postgre` now and easy to add another backend store driver if needed - Integration with `Flink/Spark/HDFS`, and friendly to connect other big data platforms ## Quick Start -### 1. Docker Way +### 1. Download Way -We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner -HugeGraph server with `RocksDB` in background. - -Optional: - -1. use `docker exec -it graph bash` to enter the container to do some operations. -2. use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD="true" hugegraph/hugegraph` to start with a **built-in** (example) graph. - -### 2. Download Way - -Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) +Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#32-download-the-binary-tar-tarball) to download the latest release package and start the server. -### 3. Source Building Way +### 2. Source Building Way Visit [Source Building Page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) and follow the steps to build the source code and start the server. @@ -62,6 +49,18 @@ And here are links of other **HugeGraph** component/repositories: 3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** libs) 4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code) +### 3. Docker Way (Convenient for Test) + +We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner +HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**. +You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. + +> Note: +> +> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). +> +> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development. + ## License HugeGraph is licensed under Apache 2.0 License. @@ -81,7 +80,8 @@ HugeGraph is licensed under Apache 2.0 License. HugeGraph relies on the [TinkerPop](http://tinkerpop.apache.org) framework, we refer to the storage structure of Titan and the schema definition of DataStax. Thanks to TinkerPop, thanks to Titan, thanks to DataStax. Thanks to all other organizations or authors who contributed to the project. -You are welcome to contribute to HugeGraph, and we are looking forward to working with you to build an excellent open source community. +You are welcome to contribute to HugeGraph, +and we are looking forward to working with you to build an excellent open-source community. ## Contact Us diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 47dc411c6e..45a725786d 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -47,6 +47,7 @@ RUN set -x \ procps \ curl \ lsof \ + vim \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/hugegraph-server/hugegraph-dist/README.md b/hugegraph-server/hugegraph-dist/docker/READEME.md similarity index 81% rename from hugegraph-server/hugegraph-dist/README.md rename to hugegraph-server/hugegraph-dist/docker/READEME.md index 1aedb37bbe..8b5d2efc55 100644 --- a/hugegraph-server/hugegraph-dist/README.md +++ b/hugegraph-server/hugegraph-dist/docker/READEME.md @@ -1,5 +1,11 @@ # Deploy Hugegraph server with docker +> Note: +> +> 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). +> +> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development. + ## 1. Deploy We can use docker to quickly start an inner HugeGraph server with RocksDB in background. @@ -18,7 +24,7 @@ We can use docker to quickly start an inner HugeGraph server with RocksDB in bac graph: image: hugegraph/hugegraph ports: - - 18080:8080 + - 8080:8080 ``` ## 2. Create Sample Graph on Server Startup @@ -33,7 +39,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script to start hugegraph server. 2. Using docker compose - + We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below. [example.groovy](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/src/assembly/static/scripts/example.groovy) is a pre-defined script. If needed, we can mount a new `example.groovy` to preload different data: ```yaml @@ -46,7 +52,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script volumes: - /path/to/yourscript:/hugegraph/scripts/example.groovy ports: - - 18080:8080 + - 8080:8080 ``` 3. Using start-hugegraph.sh diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index e1fad4a9ff..cc1f8a1fcf 100644 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -21,4 +21,6 @@ ./bin/init-store.sh -./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc +./bin/start-hugegraph.sh -j "$JAVA_OPTS" -g zgc + +tail -f /dev/null diff --git a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy index df57ade988..5dff017b58 100644 --- a/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy +++ b/hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy @@ -18,7 +18,7 @@ import org.apache.hugegraph.HugeFactory import org.apache.hugegraph.dist.RegisterUtil -// register all the backend to avoid changes if docker needs to support othre backend +// register all the backend to avoid changes if needs to support other backend RegisterUtil.registerPlugins() RegisterUtil.registerRocksDB() RegisterUtil.registerCassandra() diff --git a/hugegraph-server/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml index cdec80950b..9a58ac767f 100644 --- a/hugegraph-server/hugegraph-dist/pom.xml +++ b/hugegraph-server/hugegraph-dist/pom.xml @@ -293,22 +293,6 @@ - - - - - - - - - - - diff --git a/hugegraph-server/hugegraph-dist/scripts/apache-release.sh b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh index a92a59b370..277fed8b72 100755 --- a/hugegraph-server/hugegraph-dist/scripts/apache-release.sh +++ b/hugegraph-server/hugegraph-dist/scripts/apache-release.sh @@ -33,13 +33,13 @@ WORK_DIR=$( pwd ) cd "${WORK_DIR}" || exit -echo "In the work dir: $(pwd)" +echo "Current 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 ../../ +cd ../../../ && echo "Package source in: $(pwd)" git archive --format=tar.gz \ --output="hugegraph-server/hugegraph-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \ --prefix=apache-${REPO}-incubating-"${RELEASE_VERSION}"-src/ "${GIT_BRANCH}" || exit From 965d6c137a8110c5f9d39dea0da92dc575aa9719 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Mon, 18 Dec 2023 12:33:33 +0800 Subject: [PATCH 43/51] fix: incorrect path in hugegraph assembly scripts (#2392) * fix: typo * fix: assembly hugegraph path * reset --- .../hugegraph-dist/docker/{READEME.md => README.md} | 0 hugegraph-server/hugegraph-dist/pom.xml | 3 +-- .../hugegraph-dist/src/assembly/descriptor/assembly.xml | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) rename hugegraph-server/hugegraph-dist/docker/{READEME.md => README.md} (100%) diff --git a/hugegraph-server/hugegraph-dist/docker/READEME.md b/hugegraph-server/hugegraph-dist/docker/README.md similarity index 100% rename from hugegraph-server/hugegraph-dist/docker/READEME.md rename to hugegraph-server/hugegraph-dist/docker/README.md diff --git a/hugegraph-server/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml index 9a58ac767f..890a3d5171 100644 --- a/hugegraph-server/hugegraph-dist/pom.xml +++ b/hugegraph-server/hugegraph-dist/pom.xml @@ -162,8 +162,7 @@ false false - ${top.level.dir} - + ${top.level.dir} ${assembly.descriptor.dir}/assembly.xml diff --git a/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml b/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml index 4ae2286aa2..82683268b1 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml +++ b/hugegraph-server/hugegraph-dist/src/assembly/descriptor/assembly.xml @@ -35,8 +35,6 @@ ${assembly.static.dir} / false - - README.txt @@ -49,11 +47,11 @@ - ${top.level.dir}/hugegraph-server/hugegraph-dist/release-docs/ + ${top.level.dir}/hugegraph-dist/release-docs/ / - ${top.level.dir} + ${top.level.dir}/../ / DISCLAIMER* From 7635c67865e5bd66958592572ce0557b24aa0718 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:22:35 +0800 Subject: [PATCH 44/51] chore(server): update license for 1.2.0 (#2391) --------- Co-authored-by: liuxiao Co-authored-by: Simon Cheung --- .../hugegraph-dist/release-docs/LICENSE | 132 ++- .../hugegraph-dist/release-docs/NOTICE | 870 ++++++++++++++++-- ...kedhashmap-lru.txt => LICENSE-airline.txt} | 3 +- .../LICENSE-animal-sniffer-annotations.txt | 9 + .../licenses/LICENSE-annotations.txt | 202 ++++ .../release-docs/licenses/LICENSE-asm.txt | 27 + .../licenses/LICENSE-caffeine.txt | 202 ++++ .../licenses/LICENSE-checker-compat-qual.txt | 202 ++++ .../licenses/LICENSE-checker-qual.txt | 23 + .../licenses/LICENSE-chronicle-bytes.txt | 202 ++++ .../licenses/LICENSE-chronicle-core.txt | 202 ++++ .../licenses/LICENSE-chronicle-queue.txt | 202 ++++ .../licenses/LICENSE-chronicle-threads.txt | 202 ++++ .../licenses/LICENSE-chronicle-wire.txt | 202 ++++ .../licenses/LICENSE-classgraph.txt | 21 + .../licenses/LICENSE-compress-lzf.txt | 8 - .../LICENSE-error_prone_annotations.txt | 202 ++++ .../licenses/LICENSE-failureaccess.txt | 202 ++++ .../licenses/LICENSE-grpc-api.txt | 202 ++++ .../licenses/LICENSE-grpc-context.txt | 202 ++++ .../licenses/LICENSE-grpc-core.txt | 202 ++++ .../licenses/LICENSE-grpc-netty-shaded.txt | 202 ++++ .../licenses/LICENSE-grpc-protobuf-lite.txt | 202 ++++ .../licenses/LICENSE-grpc-protobuf.txt | 202 ++++ .../release-docs/licenses/LICENSE-gson.txt | 202 ++++ .../release-docs/licenses/LICENSE-guava.txt | 202 ++++ .../licenses/LICENSE-ikanalyzer.txt | 202 ++++ .../licenses/LICENSE-j2objc-annotations.txt | 201 ++++ .../LICENSE-jackson-jakarta-rs-base.txt | 202 ++++ ...CENSE-jackson-jakarta-rs-json-provider.txt | 202 ++++ ...NSE-jackson-jaxrs-json-provider-2.12.1.txt | 8 - .../LICENSE-jackson-jaxrs-json-provider.txt | 8 - ...son-module-jakarta-xmlbind-annotations.txt | 202 ++++ .../licenses/LICENSE-jakarta.activation.txt | 10 + .../licenses/LICENSE-jakarta.xml.bind-api.txt | 10 + .../release-docs/licenses/LICENSE-jamm.txt | 202 ++++ .../licenses/LICENSE-java-cup-runtime.txt | 8 + .../licenses/LICENSE-jcommander.txt | 202 ++++ .../licenses/LICENSE-jctools-core.txt | 202 ++++ .../release-docs/licenses/LICENSE-junit.txt | 86 ++ .../licenses/LICENSE-jvm-attach-api.txt | 202 ++++ .../licenses/LICENSE-kotlin-stdlib-common.txt | 202 ++++ .../licenses/LICENSE-kotlin-stdlib.txt | 202 ++++ ...9.0-empty-to-avoid-conflict-with-guava.txt | 202 ++++ .../licenses/LICENSE-lucene-queries.txt | 202 ++++ .../licenses/LICENSE-lucene-queryparser.txt | 202 ++++ .../licenses/LICENSE-lucene-sandbox.txt | 202 ++++ .../release-docs/licenses/LICENSE-mxdump.txt | 202 ++++ ...ICENSE-netty-tcnative-boringssl-static.txt | 202 ++++ .../release-docs/licenses/LICENSE-okhttp.txt | 202 ++++ .../licenses/LICENSE-okio-jvm.txt | 202 ++++ .../licenses/LICENSE-perfmark-api.txt | 202 ++++ .../LICENSE-proto-google-common-protos.txt | 202 ++++ .../release-docs/licenses/LICENSE-psjava.txt | 21 + .../release-docs/licenses/LICENSE-sjk-cli.txt | 202 ++++ .../licenses/LICENSE-sjk-core.txt | 202 ++++ .../licenses/LICENSE-sjk-json.txt | 202 ++++ .../licenses/LICENSE-sjk-stacktrace.txt | 202 ++++ .../licenses/LICENSE-snappy-java.txt | 202 ++++ .../LICENSE-swagger-annotations-jakarta.txt | 202 ++++ .../licenses/LICENSE-swagger-core-jakarta.txt | 202 ++++ .../LICENSE-swagger-integration-jakarta.txt | 202 ++++ .../LICENSE-swagger-jaxrs2-jakarta.txt | 201 ++++ .../LICENSE-swagger-models-jakarta.txt | 202 ++++ .../licenses/LICENSE-zstd-jni.txt | 26 + 65 files changed, 11033 insertions(+), 133 deletions(-) rename hugegraph-server/hugegraph-dist/release-docs/licenses/{LICENSE-concurrentlinkedhashmap-lru.txt => LICENSE-airline.txt} (99%) create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-annotations.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-asm.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-caffeine.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-compat-qual.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-qual.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-bytes.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-core.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-queue.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-threads.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-wire.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-classgraph.txt delete mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-failureaccess.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-api.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-context.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-core.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-netty-shaded.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gson.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-guava.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-base.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-json-provider.txt delete mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt delete mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jakarta-xmlbind-annotations.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.activation.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.xml.bind-api.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jamm.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-java-cup-runtime.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcommander.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jctools-core.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-junit.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jvm-attach-api.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queries.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queryparser.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-sandbox.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-mxdump.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-netty-tcnative-boringssl-static.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okhttp.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okio-jvm.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-perfmark-api.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-psjava.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-cli.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-core.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-json.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-stacktrace.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snappy-java.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations-jakarta.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-core-jakarta.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-integration-jakarta.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-jaxrs2-jakarta.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models-jakarta.txt create mode 100644 hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zstd-jni.txt diff --git a/hugegraph-server/hugegraph-dist/release-docs/LICENSE b/hugegraph-server/hugegraph-dist/release-docs/LICENSE index b6306df6b5..807c21ffd8 100644 --- a/hugegraph-server/hugegraph-dist/release-docs/LICENSE +++ b/hugegraph-server/hugegraph-dist/release-docs/LICENSE @@ -280,7 +280,6 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * Apache Log4j API (org.apache.logging.log4j:log4j-api:2.17.1 - https://logging.apache.org/log4j/2.x/log4j-api/) (Apache License, Version 2.0) * Apache Log4j Core (org.apache.logging.log4j:log4j-core:2.17.1 - https://logging.apache.org/log4j/2.x/log4j-core/) (Apache License, Version 2.0) * Apache Log4j SLF4J Binding (org.apache.logging.log4j:log4j-slf4j-impl:2.17.1 - https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/) - (Apache License, Version 2.0) * Apache Thrift (org.apache.thrift:libthrift:0.9.2 - http://thrift.apache.org) (Apache License, Version 2.0) * Apache TinkerPop :: Gremlin Console (org.apache.tinkerpop:gremlin-console:3.5.1 - http://tinkerpop.apache.org/gremlin-console/) (Apache License, Version 2.0) * Apache TinkerPop :: Gremlin Core (org.apache.tinkerpop:gremlin-core:3.5.1 - http://tinkerpop.apache.org/gremlin-core/) (Apache License, Version 2.0) * Apache TinkerPop :: Gremlin Driver (org.apache.tinkerpop:gremlin-driver:3.5.1 - http://tinkerpop.apache.org/gremlin-driver/) @@ -295,14 +294,11 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * Byte Buddy (without dependencies) (net.bytebuddy:byte-buddy:1.10.5 - https://bytebuddy.net/byte-buddy) (Apache License, Version 2.0) * Byte Buddy agent (net.bytebuddy:byte-buddy-agent:1.10.5 - https://bytebuddy.net/byte-buddy-agent) (Apache License, Version 2.0) * CLI (commons-cli:commons-cli:1.1 - http://jakarta.apache.org/commons/cli/) - (Apache License, Version 2.0) * Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.2.6 - https://github.com/ben-manes/caffeine) (Apache License, Version 2.0) * Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine) (Apache License, Version 2.0) * Commons Lang (commons-lang:commons-lang:2.6 - http://commons.apache.org/lang/) - (Apache License, Version 2.0) * Commons Lang (org.apache.commons:commons-lang3:3.1 - http://commons.apache.org/lang/) (Apache License, Version 2.0) * Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) (Apache License, Version 2.0) * Commons Math (org.apache.commons:commons-math3:3.2 - http://commons.apache.org/proper/commons-math/) (Apache License, Version 2.0) * Concurrent-Trees (com.googlecode.concurrent-trees:concurrent-trees:2.4.0 - http://code.google.com/p/concurrent-trees/) - (Apache License, Version 2.0) * ConcurrentLinkedHashMap (com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4 - http://code.google.com/p/concurrentlinkedhashmap) (Apache License, Version 2.0) * Cypher for Gremlin: Gremlin language extensions (org.opencypher.gremlin:cypher-gremlin-extensions:1.0.4 - https://github.com/opencypher/cypher-for-gremlin) (Apache License, Version 2.0) * Cypher for Gremlin: Translation (org.opencypher.gremlin:translation:1.0.4 - https://github.com/opencypher/cypher-for-gremlin) (Apache License, Version 2.0) * DataStax Java Driver for Apache Cassandra - Core (com.datastax.cassandra:cassandra-driver-core:3.6.0 - https://github.com/datastax/java-driver/cassandra-driver-core) @@ -310,11 +306,8 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.1 - http://findbugs.sourceforge.net/) (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) * Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/) - (Apache License, Version 2.0) * Gson (com.google.code.gson:gson:2.8.6 - https://github.com/google/gson/gson) - (Apache License, Version 2.0) * Guava: Google Core Libraries for Java (com.google.guava:guava:25.1-jre - https://github.com/google/guava/guava) (Apache License, Version 2.0) * HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc) (Apache License, Version 2.0) * HanLP (com.hankcs:hanlp:portable-1.8.3 - https://github.com/hankcs/HanLP) - (Apache License, Version 2.0) * J2ObjC Annotations (com.google.j2objc:j2objc-annotations:1.1 - https://github.com/google/j2objc/) (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) * JJWT :: API (io.jsonwebtoken:jjwt-api:0.11.5 - https://github.com/jwtk/jjwt/jjwt-api) (Apache License, Version 2.0) * JJWT :: Extensions :: Jackson (io.jsonwebtoken:jjwt-jackson:0.11.5 - https://github.com/jwtk/jjwt/jjwt-jackson) @@ -322,23 +315,15 @@ See licenses/ for text of these licenses. (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) * JSON.simple (com.googlecode.json-simple:json-simple:1.1 - http://code.google.com/p/json-simple/) (Apache License, Version 2.0) * JVM Integration for Metrics (io.dropwizard.metrics:metrics-jvm:3.1.5 - http://metrics.codahale.com/metrics-jvm/) - (Apache License, Version 2.0) * Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310) (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) * Jackson-JAXRS-JSON (com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.12.1 - http://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-json-provider) (Apache License, Version 2.0) * Jackson-JAXRS-base (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.12.1 - http://github.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-base) - (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-annotations (com.fasterxml.jackson.core:jackson-annotations:2.12.5 - http://github.com/FasterXML/jackson) (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-core (com.fasterxml.jackson.core:jackson-core:2.12.5 - https://github.com/FasterXML/jackson-core) (Apache License, Version 2.0) * Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.3 - https://github.com/FasterXML/jackson-dataformats-text) (Apache License, Version 2.0) * Jakarta Bean Validation API (jakarta.validation:jakarta.validation-api:3.0.0 - https://beanvalidation.org) (Apache License, Version 2.0) * Jakarta Dependency Injection (jakarta.inject:jakarta.inject-api:2.0.0 - https://github.com/eclipse-ee4j/injection-api) - (Apache License, Version 2.0) * Java Agent for Memory Measurements (com.github.jbellis:jamm:0.3.0 - https://github.com/jbellis/jamm/) - (Apache License, Version 2.0) * Java Concurrency Tools Core Library (org.jctools:jctools-core:1.2.1 - https://github.com/JCTools) (Apache License, Version 2.0) * Java Concurrency Tools Core Library (org.jctools:jctools-core:2.1.1 - https://github.com/JCTools) (Apache License, Version 2.0) * JavaPoet (com.squareup:javapoet:1.8.0 - http://github.com/square/javapoet/) (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) * Joda-Time (joda-time:joda-time:2.4 - http://www.joda.org/joda-time/) (Apache License, Version 2.0) * Kerb Simple Kdc (org.apache.kerby:kerb-simplekdc:2.0.0 - http://directory.apache.org/kerby/kerby-kerb/kerb-simplekdc) (Apache License, Version 2.0) * Kerby ASN1 Project (org.apache.kerby:kerby-asn1:2.0.0 - http://directory.apache.org/kerby/kerby-common/kerby-asn1) (Apache License, Version 2.0) * Kerby Config (org.apache.kerby:kerby-config:2.0.0 - http://directory.apache.org/kerby/kerby-common/kerby-config) @@ -353,7 +338,6 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * Kerby-kerb Server (org.apache.kerby:kerb-server:2.0.0 - http://directory.apache.org/kerby/kerby-kerb/kerb-server) (Apache License, Version 2.0) * Kerby-kerb Util (org.apache.kerby:kerb-util:2.0.0 - http://directory.apache.org/kerby/kerby-kerb/kerb-util) (Apache License, Version 2.0) * Kerby-kerb core (org.apache.kerby:kerb-core:2.0.0 - http://directory.apache.org/kerby/kerby-kerb/kerb-core) - (Apache License, Version 2.0) * LZ4 and xxHash (net.jpountz.lz4:lz4:1.3.0 - https://github.com/jpountz/lz4-java) (Apache License, Version 2.0) * LZ4 and xxHash (org.lz4:lz4-java:1.8.0 - https://github.com/lz4/lz4-java) (Apache License, Version 2.0) * Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:8.11.2 - https://lucene.apache.org/lucene-parent/lucene-analyzers-common) (Apache License, Version 2.0) * Lucene Core (org.apache.lucene:lucene-core:8.11.2 - https://lucene.apache.org/lucene-parent/lucene-core) @@ -367,9 +351,7 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * Netty/All-in-One (io.netty:netty-all:4.1.44.Final - https://netty.io/netty-all/) (Apache License, Version 2.0) * Netty/All-in-One (io.netty:netty-all:4.1.61.Final - https://netty.io/netty-all/) (Apache License, Version 2.0) * Nimbus JOSE+JWT (com.nimbusds:nimbus-jose-jwt:4.41.2 - https://bitbucket.org/connect2id/nimbus-jose-jwt) - (Apache License, Version 2.0) * Ning-compress-LZF (com.ning:compress-lzf:0.8.4 - http://github.com/ning/compress) (Apache License, Version 2.0) * OHC core (org.caffinitas.ohc:ohc-core:0.7.4 - http://caffinitas.org/) - (Apache License, Version 2.0) * OHC core - Java8 optimization (org.caffinitas.ohc:ohc-core-j8:0.4.4 - http://caffinitas.org/) (Apache License, Version 2.0) * Objenesis (org.objenesis:objenesis:2.6 - http://objenesis.org) (Apache License, Version 2.0) * OpenTracing API (io.opentracing:opentracing-api:0.22.0 - https://github.com/opentracing/opentracing-java/opentracing-api) (Apache License, Version 2.0) * OpenTracing-mock (io.opentracing:opentracing-mock:0.22.0 - https://github.com/opentracing/opentracing-java/opentracing-mock) @@ -377,15 +359,12 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * OpenTracing-util (io.opentracing:opentracing-util:0.22.0 - https://github.com/opentracing/opentracing-java/opentracing-util) (Apache License, Version 2.0) * SnakeYAML (org.yaml:snakeyaml:1.26 - http://www.snakeyaml.org) (Apache License, Version 2.0) * SnakeYAML (org.yaml:snakeyaml:1.27 - http://www.snakeyaml.org) - (Apache License, Version 2.0) * Thrift Server implementation backed by LMAX Disruptor (com.thinkaurelius.thrift:thrift-server:0.3.7 - http://github.com/xedin/disruptor_thrift_server) (Apache License, Version 2.0) * Token provider (org.apache.kerby:token-provider:2.0.0 - http://directory.apache.org/kerby/kerby-provider/token-provider) (Apache License, Version 2.0) * ansj_seg (org.ansj:ansj_seg:5.1.6 - https://github.com/NLPchina/ansj_seg) - (Apache License, Version 2.0) * cli (io.airlift:airline:0.6 - https://github.com/airlift/airline) (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) * com.alipay.sofa:bolt (com.alipay.sofa:bolt:1.6.4 - https://github.com/alipay/sofa-bolt) (Apache License, Version 2.0) * com.alipay.sofa:hessian (com.alipay.sofa:hessian:3.3.6 - http://github.com/alipay/sofa-hessian) (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) * error-prone annotations (com.google.errorprone:error_prone_annotations:2.1.3 - http://nexus.sonatype.org/oss-repository-hosting.html/error_prone_parent/error_prone_annotations) (Apache License, Version 2.0) * exp4j (net.objecthunter:exp4j:0.4.8 - http://www.objecthunter.net/exp4j) (Apache License, Version 2.0) * fastutil (it.unimi.dsi:fastutil:8.5.9 - http://fastutil.di.unimi.it/) (Apache License, Version 2.0) * htrace-core4 (org.apache.htrace:htrace-core4:4.2.0-incubating - http://incubator.apache.org/projects/htrace.html) @@ -402,16 +381,10 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * hugegraph-rocksdb (com.baidu.hugegraph:hugegraph-rocksdb:0.13.0 - https://github.com/hugegraph/hugegraph/hugegraph-rocksdb) (Apache License, Version 2.0) * hugegraph-rpc (com.baidu.hugegraph:hugegraph-rpc:2.0.1 - https://github.com/hugegraph/hugegraph-commons/hugegraph-rpc) (Apache License, Version 2.0) * hugegraph-scylladb (com.baidu.hugegraph:hugegraph-scylladb:0.13.0 - https://github.com/hugegraph/hugegraph/hugegraph-scylladb) - (Apache License, Version 2.0) * io.grpc:grpc-api (io.grpc:grpc-api:1.28.0 - https://github.com/grpc/grpc-java) - (Apache License, Version 2.0) * io.grpc:grpc-context (io.grpc:grpc-context:1.28.0 - https://github.com/grpc/grpc-java) - (Apache License, Version 2.0) * io.grpc:grpc-core (io.grpc:grpc-core:1.28.0 - https://github.com/grpc/grpc-java) - (Apache License, Version 2.0) * io.grpc:grpc-netty-shaded (io.grpc:grpc-netty-shaded:1.28.0 - https://github.com/grpc/grpc-java) (Apache License, Version 2.0) * io.grpc:grpc-protobuf (io.grpc:grpc-protobuf:1.47.0 - https://github.com/grpc/grpc-java) (Apache License, Version 2.0) * io.grpc:grpc-protobuf-lite (io.grpc:grpc-protobuf-lite:1.47.0 - https://github.com/grpc/grpc-java) (Apache License, Version 2.0) * io.grpc:grpc-stub (io.grpc:grpc-stub:1.47.0 - https://github.com/grpc/grpc-java) (Apache License, Version 2.0) * ikanalyzer (com.janeluo.ikanalyzer:2012_u6 - https://mvnrepository.com/artifact/com.janeluo/ikanalyzer/2012_u6) - (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) * jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.12.5 - http://github.com/FasterXML/jackson) (Apache License, Version 2.0) * javatuples (org.javatuples:javatuples:1.2 - http://www.javatuples.org) (Apache License, Version 2.0) * javax.inject (javax.inject:javax.inject:1 - http://code.google.com/p/atinject/) (Apache License, Version 2.0) * jcseg-core (org.lionsoul:jcseg-core:2.6.2 - http://github.com/lionsoul2014/jcseg) @@ -431,24 +404,87 @@ See licenses/ for text of these licenses. (Apache License, Version 2.0) * openCypher Utils (org.opencypher:util-9.0:9.0.20190305 - http://components.neo4j.org/util-9.0/9.0.20190305) (Apache License, Version 2.0) * parboiled-core (org.parboiled:parboiled-core:1.2.0 - http://parboiled.org) (Apache License, Version 2.0) * parboiled-scala (org.parboiled:parboiled-scala_2.12:1.2.0 - http://parboiled.org) - (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) * picocli - a mighty tiny Command Line Interface (info.picocli:picocli:4.3.2 - http://picocli.info) (Apache License, Version 2.0) * proto-google-common-protos (com.google.api.grpc:proto-google-common-protos:2.0.1 - https://github.com/googleapis/java-iam/proto-google-common-protos) (Apache License, Version 2.0) * sigar (org.fusesource:sigar:1.6.4 - http://fusesource.com/sigar/) - (Apache License, Version 2.0) * snappy-java (org.xerial.snappy:snappy-java:1.1.1.7 - https://github.comm/xerial/snappy-java) (Apache License, Version 2.0) * stream-lib (com.clearspring.analytics:stream:2.5.2 - https://github.com/clearspring/stream-lib) (Apache License, Version 2.0) * swagger-annotations (io.swagger:swagger-annotations:1.5.18 - https://github.com/swagger-api/swagger-core/modules/swagger-annotations) - (Apache License, Version 2.0) * swagger-annotations-jakarta (io.swagger.core.v3:swagger-annotations-jakarta:2.1.9 - https://github.com/swagger-api/swagger-core/modules/swagger-annotations-jakarta) (Apache License, Version 2.0) * swagger-core (io.swagger:swagger-core:1.5.18 - https://github.com/swagger-api/swagger-core/modules/swagger-core) - (Apache License, Version 2.0) * swagger-core-jakarta (io.swagger.core.v3:swagger-core-jakarta:2.1.9 - https://github.com/swagger-api/swagger-core/modules/swagger-core-jakarta) - (Apache License, Version 2.0) * swagger-integration-jakarta (io.swagger.core.v3:swagger-integration-jakarta:2.1.9 - https://github.com/swagger-api/swagger-core/modules/swagger-integration-jakarta) - (Apache License, Version 2.0) * swagger-jaxrs2-jakarta (io.swagger.core.v3:swagger-jaxrs2-jakarta:2.1.9 - https://github.com/swagger-api/swagger-core/modules/swagger-jaxrs2-jakarta) (Apache License, Version 2.0) * swagger-models (io.swagger:swagger-models:1.5.18 - https://github.com/swagger-api/swagger-core/modules/swagger-models) - (Apache License, Version 2.0) * swagger-models-jakarta (io.swagger.core.v3:swagger-models-jakarta:2.1.9 - https://github.com/swagger-api/swagger-core/modules/swagger-models-jakarta) (Apache License, Version 2.0) * tracer-core (com.alipay.sofa:tracer-core:3.0.8 - https://projects.spring.io/spring-boot/#/spring-boot-starter-parent/sofaboot-dependencies/tracer-all-parent/tracer-core) (Apache License, Version 2.0) * 结巴分词工具(jieba for java) (com.huaban:jieba-analysis:1.0.2 - http://maven.apache.org) (Apache License, Version 2.0) * RocksDB JNI (org.rocksdb:rocksdbjni:7.2.2 - https://rocksdb.org) (Apache License, Version 2.0) * Javassist (org.javassist:javassist:3.21.0-GA - http://www.javassist.org/) + (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) * Jackson module: Jakarta XML Bind Annotations (jakarta.xml.bind) (com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.2 - https://github.com/FasterXML/jackson-modules-base) + (Apache License, Version 2.0) * okhttp (com.squareup.okhttp3:okhttp:4.10.0 - https://square.github.io/okhttp/) + (Apache License, Version 2.0) * Guava InternalFutureFailureAccess and InternalFutures (com.google.guava:failureaccess:1.0.1 - https://github.com/google/guava/failureaccess) + (Apache License, Version 2.0) * io.grpc:grpc-protobuf-lite (io.grpc:grpc-protobuf-lite:1.28.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * org.gridkit.jvmtool::sjk-json (org.gridkit.jvmtool:sjk-json:0.14 - http://code.google.com/p/gridkit/jvmtool-umbrella-pom/sjk-json) + (Apache License, Version 2.0) * Kotlin Stdlib Jdk7 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10 - https://kotlinlang.org/) + (Apache License, Version 2.0) * swagger-jaxrs2-jakarta (io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.18 - https://github.com/swagger-api/swagger-core/modules/swagger-jaxrs2-jakarta) + (Apache License, Version 2.0) * Jackson-core (com.fasterxml.jackson.core:jackson-core:2.13.2 - https://github.com/FasterXML/jackson-core) + (Apache License, Version 2.0) * Byte Buddy agent (net.bytebuddy:byte-buddy-agent:1.11.6 - https://bytebuddy.net/byte-buddy-agent) + (Apache License, Version 2.0) * org.gridkit.jvmtool::mxdump (org.gridkit.jvmtool:mxdump:0.14 - http://code.google.com/p/gridkit/jvmtool-umbrella-pom/mxdump) + (Apache License, Version 2.0) * arthas-packaging (com.taobao.arthas:arthas-packaging:3.7.1 - https://github.com/alibaba/arthas) + (Apache License, Version 2.0) * Netty/TomcatNative [BoringSSL - Static] (io.netty:netty-tcnative-boringssl-static:2.0.36.Final - https://github.com/netty/netty-tcnative/netty-tcnative-boringssl-static/) + (Apache License, Version 2.0) * OpenHFT/Chronicle-Bytes (net.openhft:chronicle-bytes:2.20.111 - https://chronicle.software/java-parent-pom/chronicle-bytes) + (Apache License, Version 2.0) * swagger-core-jakarta (io.swagger.core.v3:swagger-core-jakarta:2.2.18 - https://github.com/swagger-api/swagger-core/modules/swagger-core-jakarta) + (Apache License, Version 2.0) * swagger-models-jakarta (io.swagger.core.v3:swagger-models-jakarta:2.2.18 - https://github.com/swagger-api/swagger-core/modules/swagger-models-jakarta) + (Apache License, Version 2.0) * perfmark:perfmark-api (io.perfmark:perfmark-api:0.25.0 - https://github.com/perfmark/perfmark) + (Apache License, Version 2.0) * SnakeYAML (org.yaml:snakeyaml:2.2 - https://bitbucket.org/snakeyaml/snakeyaml) + (Apache License, Version 2.0) * io.grpc:grpc-netty-shaded (io.grpc:grpc-netty-shaded:1.47.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * arthas-agent-attach (com.taobao.arthas:arthas-agent-attach:3.7.1 - https://github.com/alibaba/arthas) + (Apache License, Version 2.0) * swagger-integration-jakarta (io.swagger.core.v3:swagger-integration-jakarta:2.2.18 - https://github.com/swagger-api/swagger-core/modules/swagger-integration-jakarta) + (Apache License, Version 2.0) * Checker Qual (org.checkerframework:checker-compat-qual:2.5.5 - https://checkerframework.org) + (Apache License, Version 2.0) * OHC core - Java8 optimization (org.caffinitas.ohc:ohc-core-j8:0.5.1 - http://caffinitas.org/) + (Apache License, Version 2.0) * okio (com.squareup.okio:okio-jvm:3.0.0 - https://github.com/square/okio/) + (Apache License, Version 2.0) * airline (io.airlift:airline:0.8 - https://github.com/airlift/airline) + (Apache License, Version 2.0) * Gson (com.google.code.gson:gson:2.9.0 - https://github.com/google/gson/gson) + (Apache License, Version 2.0) * io.grpc:grpc-context (io.grpc:grpc-context:1.47.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * io.grpc:grpc-protobuf (io.grpc:grpc-protobuf:1.28.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * OpenHFT/Chronicle-Queue (net.openhft:chronicle-queue:5.20.123 - https://chronicle.software/java-parent-pom/chronicle-queue) + (Apache License, Version 2.0) * Kotlin Stdlib Jdk8 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 - https://kotlinlang.org/) + (Apache License, Version 2.0) * Apache Cassandra (org.apache.cassandra:cassandra-all:4.0.10 - https://cassandra.apache.org) + (Apache License, Version 2.0) * org.gridkit.jvmtool::sjk-stacktrace (org.gridkit.jvmtool:sjk-stacktrace:0.14 - http://code.google.com/p/gridkit/jvmtool-umbrella-pom/sjk-stacktrace) + (Apache License, Version 2.0) * snappy-java (org.xerial.snappy:snappy-java:1.1.2.6 - https://github.com/xerial/snappy-java) + (Apache License, Version 2.0) * error-prone annotations (com.google.errorprone:error_prone_annotations:2.3.4 - http://nexus.sonatype.org/oss-repository-hosting.html/error_prone_parent/error_prone_annotations) + (Apache License, Version 2.0) * HPPC Collections (com.carrotsearch:hppc:0.8.1 - http://labs.carrotsearch.com/hppc.html/hppc) + (Apache License, Version 2.0) * org.gridkit.jvmtool::sjk-cli (org.gridkit.jvmtool:sjk-cli:0.14 - http://code.google.com/p/gridkit/jvmtool-umbrella-pom/sjk-cli) + (Apache License, Version 2.0) * Java Agent for Memory Measurements (com.github.jbellis:jamm:0.3.2 - https://github.com/jbellis/jamm/) + (Apache License, Version 2.0) * Guava: Google Core Libraries for Java (com.google.guava:guava:30.0-jre - https://github.com/google/guava/guava) + (Apache License, Version 2.0) * io.grpc:grpc-core (io.grpc:grpc-core:1.47.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * OpenHFT/Chronicle-Wire (net.openhft:chronicle-wire:2.20.117 - https://chronicle.software/java-parent-pom/chronicle-wire) + (Apache License, Version 2.0) * jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.15.2 - https://github.com/FasterXML/jackson) + (Apache License, Version 2.0) * org.gridkit.lab::jvm-attach-api (org.gridkit.lab:jvm-attach-api:1.5 - http://code.google.com/p/gridkit/jvm-attach-api) + (Apache License, Version 2.0) * Lucene QueryParsers (org.apache.lucene:lucene-queryparser:4.7.2 - http://lucene.apache.org/lucene-parent/lucene-queryparser) + (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) * JCommander (com.beust:jcommander:1.30 - http://beust.com/jcommander) + (Apache License, Version 2.0) * Guava: Google Core Libraries for Java (com.google.guava:guava:31.0.1-android - https://github.com/google/guava) + (Apache License, Version 2.0) * Jackson Jakarta-RS: JSON (com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:2.15.2 - https://github.com/FasterXML/jackson-jakarta-rs-providers/jackson-jakarta-rs-json-provider) + (Apache License, Version 2.0) * IKAnalyzer (com.janeluo:ikanalyzer:2012_u6 - https://github.com/yangyining/IKAnalyzer) + (Apache License, Version 2.0) * Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310) + (Apache License, Version 2.0) * io.grpc:grpc-api (io.grpc:grpc-api:1.47.0 - https://github.com/grpc/grpc-java) + (Apache License, Version 2.0) * OpenHFT/Chronicle-Threads (net.openhft:chronicle-threads:2.20.111 - https://chronicle.software/java-parent-pom/chronicle-threads) + (Apache License, Version 2.0) * Lucene Queries (org.apache.lucene:lucene-queries:4.7.2 - http://lucene.apache.org/lucene-parent/lucene-queries) + (Apache License, Version 2.0) * jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.13.2.2 - http://github.com/FasterXML/jackson) + (Apache License, Version 2.0) * Lucene Sandbox (org.apache.lucene:lucene-sandbox:4.7.2 - http://lucene.apache.org/lucene-parent/lucene-sandbox) + (Apache License, Version 2.0) * error-prone annotations (com.google.errorprone:error_prone_annotations:2.10.0 - https://errorprone.info/error_prone_annotations) + (Apache License, Version 2.0) * swagger-annotations-jakarta (io.swagger.core.v3:swagger-annotations-jakarta:2.2.18 - https://github.com/swagger-api/swagger-core/modules/swagger-annotations-jakarta) + (Apache License, Version 2.0) * org.gridkit.jvmtool::sjk-core (org.gridkit.jvmtool:sjk-core:0.14 - http://code.google.com/p/gridkit/jvmtool-umbrella-pom/sjk-core) + (Apache License, Version 2.0) * OpenHFT/Chronicle-Core (net.openhft:chronicle-core:2.20.126 - https://chronicle.software/java-parent-pom/chronicle-core) + (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) * IntelliJ IDEA Annotations (org.jetbrains:annotations:13.0 - http://www.jetbrains.org) + (Apache License, Version 2.0) * Guava ListenableFuture only (com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava - https://github.com/google/guava/listenablefuture) + (Apache License, Version 2.0) * Apache Commons Lang (org.apache.commons:commons-lang3:3.12.0 - https://commons.apache.org/proper/commons-lang/) + (Apache License, Version 2.0) * ZT Zip (org.zeroturnaround:zt-zip:1.14 - https://github.com/zeroturnaround/zt-zip) + (Apache License, Version 2.0) * Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.5.6 - https://github.com/ben-manes/caffeine) + (Apache License, Version 2.0) * Guava: Google Core Libraries for Java (com.google.guava:guava:27.0-jre - https://github.com/google/guava/guava) + (Apache License, Version 2.0) * Jackson Jakarta-RS: base (com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.15.2 - https://github.com/FasterXML/jackson-jakarta-rs-providers/jackson-jakarta-rs-base) + (Apache License, Version 2.0) * Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.13.2 - http://github.com/FasterXML/jackson) + (Apache License, Version 2.0) * Kotlin Stdlib (org.jetbrains.kotlin:kotlin-stdlib:1.6.20 - https://kotlinlang.org/) + (Apache License, Version 2.0) * J2ObjC Annotations (com.google.j2objc:j2objc-annotations:1.3 - https://github.com/google/j2objc/) + ======================================================================== Third party CDDL licenses @@ -466,7 +502,7 @@ Third party EPL licenses The following components are provided under the EPL License. See licenses/ for text of these licenses. - (Eclipse Public License - v1.0) * JUnit (junit:junit:4.12 - http://junit.org) + (Eclipse Public License - v1.0) * JUnit (junit:junit:4.13.1 - http://junit.org) (Eclipse Public License - v2.0) * HK2 API module (org.glassfish.hk2:hk2-api:3.0.1 - https://github.com/eclipse-ee4j/glassfish-hk2/hk2-api) (Eclipse Public License - v2.0) * HK2 Implementation Utilities (org.glassfish.hk2:hk2-utils:3.0.1 - https://github.com/eclipse-ee4j/glassfish-hk2/hk2-utils) (Eclipse Public License - v2.0) * Jakarta Annotations API (jakarta.annotation:jakarta.annotation-api:2.0.0 - https://projects.eclipse.org/projects/ee4j.ca) @@ -489,11 +525,11 @@ See licenses/ for text of these licenses. (Eclipse Distribution License - v1.0) * Eclipse Collections API (org.eclipse.collections:eclipse-collections-api:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections-api) (Eclipse Distribution License - v1.0) * Eclipse Collections Main Library (org.eclipse.collections:eclipse-collections:11.1.0 - https://github.com/eclipse/eclipse-collections/eclipse-collections) (Eclipse Distribution License - v1.0) * Jakarta Activation (com.sun.activation:jakarta.activation:2.0.1 - https://github.com/eclipse-ee4j/jaf/jakarta.activation) - (Eclipse Distribution License - v1.0) * Jakarta XML Binding API (jakarta.xml.bind:jakarta.xml.bind-api:4.0.0-RC2 - https://github.com/eclipse-ee4j/jaxb-api/jakarta.xml.bind-api) (Eclipse Distribution License - v1.0) * JavaBeans Activation Framework API jar (jakarta.activation:jakarta.activation-api:1.2.1 - https://github.com/eclipse-ee4j/jaf/jakarta.activation-api) (Eclipse Distribution License - v1.0) * Old JAXB Core (com.sun.xml.bind:jaxb-core:3.0.2 - https://eclipse-ee4j.github.io/jaxb-ri/) (Eclipse Distribution License - v1.0) * Old JAXB Runtime (com.sun.xml.bind:jaxb-impl:3.0.2 - https://eclipse-ee4j.github.io/jaxb-ri/) - + (Eclipse Distribution License - v1.0) * Jakarta Activation (com.sun.activation:jakarta.activation:2.0.0 - https://github.com/eclipse-ee4j/jaf/jakarta.activation) + (Eclipse Distribution License - v1.0) * Jakarta XML Binding API (jakarta.xml.bind:jakarta.xml.bind-api:3.0.0 - https://github.com/eclipse-ee4j/jaxb-api/jakarta.xml.bind-api) ======================================================================== Third party BSD licenses @@ -504,23 +540,24 @@ See licenses/ for text of these licenses. (The 2-Clause BSD License) * ANTLR 3 Runtime (org.antlr:antlr-runtime:3.5.2 - http://www.antlr.org) (The 2-Clause BSD License) * ASM Analysis (org.ow2.asm:asm-analysis:5.0.3 - http://asm.objectweb.org/asm-analysis/) (The 2-Clause BSD License) * ASM Commons (org.ow2.asm:asm-commons:5.0.3 - http://asm.objectweb.org/asm-commons/) - (The 2-Clause BSD License) * ASM Core (org.ow2.asm:asm:5.0.4 - http://asm.objectweb.org/asm/) (The 2-Clause BSD License) * ASM Core (org.ow2.asm:asm:6.0 - http://asm.objectweb.org/asm/) (The 2-Clause BSD License) * ASM Tree (org.ow2.asm:asm-tree:5.0.3 - http://asm.objectweb.org/asm-tree/) (The 2-Clause BSD License) * ASM Util (org.ow2.asm:asm-util:5.0.3 - http://asm.objectweb.org/asm-util/) - (The 2-Clause BSD License) * JFlex (de.jflex:jflex:1.6.0 - http://jflex.de/) (The 2-Clause BSD License) * JLine (jline:jline:2.14.6 - http://nexus.sonatype.org/oss-repository-hosting.html/jline) - (The 2-Clause BSD License) * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.4.1 - https://jdbc.postgresql.org) (The 2-Clause BSD License) * StringTemplate 4 (org.antlr:ST4:4.0.8 - http://www.stringtemplate.org) (The 2-Clause BSD License) * jcabi-log (com.jcabi:jcabi-log:0.14 - http://www.jcabi.com/jcabi-log) (The 2-Clause BSD License) * jcabi-manifests (com.jcabi:jcabi-manifests:1.1 - http://www.jcabi.com/jcabi-manifests) (The 2-Clause BSD License) * snowball-stemmer (com.github.rholder:snowball-stemmer:1.3.0.581.1 - http://snowball.tartarus.org/) + (The 2-Clause BSD License) * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.4.3 - https://jdbc.postgresql.org) + (The 2-Clause BSD License) * zstd-jni (com.github.luben:zstd-jni:1.5.5-1 - https://github.com/luben/zstd-jni) (The 3-Clause BSD License) * Hamcrest (org.hamcrest:hamcrest:2.2 - http://hamcrest.org/JavaHamcrest/) (The 3-Clause BSD License) * Hamcrest Core (org.hamcrest:hamcrest-core:1.3 - https://github.com/hamcrest/JavaHamcrest/hamcrest-core) (The 3-Clause BSD License) * Protocol Buffers [Core] (com.google.protobuf:protobuf-java:3.21.7 - https://developers.google.com/protocol-buffers/protobuf-java/) (The 3-Clause BSD License) * Scala Compiler (org.scala-lang:scala-reflect:2.12.7 - http://www.scala-lang.org/) (The 3-Clause BSD License) * Scala Library (org.scala-lang:scala-library:2.12.7 - http://www.scala-lang.org/) (The 3-Clause BSD License) * scala-java8-compat (org.scala-lang.modules:scala-java8-compat_2.12:0.8.0 - http://www.scala-lang.org/) + (The 3-Clause BSD License) * JFlex (de.jflex:jflex:1.8.2 - https://jflex-de.github.io/jflex/jflex/) + (The 3-Clause BSD License) * asm (org.ow2.asm:asm:7.1 - http://asm.ow2.org/) ======================================================================== Third party MIT licenses @@ -528,19 +565,18 @@ Third party MIT licenses The following components are provided under the MIT License. See licenses/ for text of these licenses. - (The MIT License) * Animal Sniffer Annotations (org.codehaus.mojo:animal-sniffer-annotations:1.14 - http://mojo.codehaus.org/animal-sniffer/animal-sniffer-annotations) (The MIT License) * Checker Qual (org.checkerframework:checker-qual:3.5.0 - https://checkerframework.org) - (The MIT License) * ClassGraph (io.github.classgraph:classgraph:4.8.95 - https://github.com/classgraph/classgraph) (The MIT License) * JCL 1.2 implemented over SLF4J (org.slf4j:jcl-over-slf4j:1.7.25 - http://www.slf4j.org) (The MIT License) * SLF4J API Module (org.slf4j:slf4j-api:1.7.25 - http://www.slf4j.org) - (The MIT License) * SLF4J API Module (org.slf4j:slf4j-api:1.7.7 - http://www.slf4j.org) (The MIT License) * fastparse_2.12 (com.lihaoyi:fastparse_2.12:2.0.4 - https://github.com/lihaoyi/fastparse) (The MIT License) * high-scale-lib (com.boundary:high-scale-lib:1.0.6 - https://github.com/boundary/high-scale-lib) (The MIT License) * jnr-x86asm (com.github.jnr:jnr-x86asm:1.0.2 - http://github.com/jnr/jnr-x86asm) (The MIT License) * mockito-core (org.mockito:mockito-core:3.3.3 - https://github.com/mockito/mockito) (The MIT License) * sourcecode (com.lihaoyi:sourcecode_2.12:0.1.4 - https://github.com/lihaoyi/sourcecode) - (The MIT License) * Checker Qual (org.checkerframework:checker-qual:2.0.0 - http://checkerframework.org) (The MIT License) * jopt-simple (net.sf.jopt-simple:jopt-simple:5.0.4 - https://github.com/jopt-simple/jopt-simple) + (The MIT License) * ClassGraph (io.github.classgraph:classgraph:4.8.162 - https://github.com/classgraph/classgraph) + (The MIT License) * psjava (org.psjava:psjava:0.1.19 - http://psjava.org) + (The MIT License) * Checker Qual (org.checkerframework:checker-qual:3.12.0 - https://checkerframework.org) ======================================================================== Third party Public Domain licenses @@ -556,3 +592,11 @@ Third party ISC licenses The following components are provided under the ISC License. (ISC) * jBCrypt (org.mindrot:jbcrypt:0.4 - https://github.com/djmdjm/jBCrypt) + +======================================================================== +Third party Historical Permission Notice and Disclaimer +======================================================================== +The following components are provided under the Historical Permission Notice and Disclaimer. + (Permission Notice and Disclaimer) * java-cup-time (com.github.vbmacher:java-cup-runtime:11b-20160615 - https://czt.sourceforge.net/dev/java-cup-runtime/) + + diff --git a/hugegraph-server/hugegraph-dist/release-docs/NOTICE b/hugegraph-server/hugegraph-dist/release-docs/NOTICE index 39922da249..6ed098c83d 100644 --- a/hugegraph-server/hugegraph-dist/release-docs/NOTICE +++ b/hugegraph-server/hugegraph-dist/release-docs/NOTICE @@ -62,6 +62,45 @@ It also includes software from other open source projects including, but not lim * Vavr [https://www.vavr.io/] +======================================================================== + +airline NOTICE + +======================================================================== + +Copyright Notices + +Copyright 2011 Dain Sundstrom +Copyright 2010 Cedric Beust + + +======================================================================== + +animal-sniffer-annotations NOTICE + +======================================================================== + +Copyright (c) 2009 codehaus.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. + + ======================================================================== audience-annotations NOTICE @@ -74,6 +113,16 @@ Copyright 2015-2017 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). +======================================================================== + +asm NOTICE + +======================================================================== + +ASM: a very small and fast Java bytecode manipulation framework +Copyright (c) 2000-2011 INRIA, France Telecom +All rights reserved. + ======================================================================== @@ -93,11 +142,14 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + ======================================================================== byte-buddy-agent NOTICE ======================================================================== + Copyright 2014 - 2019 Rafael Winterhalter Licensed under the Apache License, Version 2.0 (the "License"); @@ -112,6 +164,44 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +======================================================================== + +checker-qual NOTICE + +======================================================================== + +Checker Framework qualifiers +Copyright 2004-present by the Checker Framework developers + + +======================================================================== + +classgraph NOTICE + +======================================================================== + +Copyright (c) 2019 Luke Hutchison + + +======================================================================== + +failureaccess NOTICE + +======================================================================== + +Copyright (C) 2018 The Guava Authors + +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 TinkerPop NOTICE @@ -1422,6 +1512,8 @@ FasterXML.com (http://fasterxml.com). A list of contributors may be found from CREDITS file, which is included in some artifacts (usually source distributions); but is always available from the source code management (SCM) system project uses. + + ======================================================================== jackson-jaxrs-json-provider-2.12.1 NOTICE @@ -1447,6 +1539,8 @@ FasterXML.com (http://fasterxml.com). A list of contributors may be found from CREDITS file, which is included in some artifacts (usually source distributions); but is always available from the source code management (SCM) system project uses. + + ======================================================================== jackson-jaxrs-json-provider NOTICE @@ -1472,6 +1566,8 @@ FasterXML.com (http://fasterxml.com). A list of contributors may be found from CREDITS file, which is included in some artifacts (usually source distributions); but is always available from the source code management (SCM) system project uses. + + ======================================================================== jackson-module-jaxb-annotations NOTICE @@ -1497,6 +1593,8 @@ FasterXML.com (http://fasterxml.com). A list of contributors may be found from CREDITS file, which is included in some artifacts (usually source distributions); but is always available from the source code management (SCM) system project uses. + + ======================================================================== kerb-admin NOTICE @@ -1706,6 +1804,7 @@ The Apache Software Foundation (http://www.apache.org/). ResolverUtil.java Copyright 2005-2006 Tim Fennell + ======================================================================== log4j-slf4j-impl NOTICE @@ -1724,6 +1823,7 @@ The Apache Software Foundation (http://www.apache.org/). objenesis NOTICE ======================================================================== + // ------------------------------------------------------------------ // NOTICE file corresponding to the section 4d of The Apache License, // Version 2.0, in this case for Objenesis @@ -1759,8 +1859,6 @@ This product includes software developed at The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== Commons-beanutils NOTICE @@ -1773,22 +1871,26 @@ Copyright 2000-2019 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). + ======================================================================== Commons-cli NOTICE ======================================================================== + Apache Commons CLI Copyright 2001-2015 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). + ======================================================================== Commons-codec NOTICE ======================================================================== + Apache Commons Codec Copyright 2002-2009 The Apache Software Foundation @@ -1804,11 +1906,13 @@ and distribution of this entire article is permitted in any medium, provided this notice is preserved. -------------------------------------------------------------------------------- + ======================================================================== Commons-collections NOTICE - ======================================================================== +======================================================================== + Apache Commons Collections Copyright 2001-2015 The Apache Software Foundation @@ -1820,7 +1924,8 @@ The Apache Software Foundation (http://www.apache.org/). Commons-compress NOTICE - ======================================================================== +======================================================================== + Apache Commons Compress Copyright 2002-2014 The Apache Software Foundation @@ -1833,43 +1938,51 @@ which has been placed in the public domain: "LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html) + ======================================================================== Commons-configuration NOTICE - ======================================================================== +======================================================================== + Apache Commons Configuration Copyright 2001-2012 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). + ======================================================================== Commons-daemon NOTICE - ======================================================================== +======================================================================== + Apache Commons Daemon Copyright 1999-2013 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). + ======================================================================== Commons-io NOTICE - ======================================================================== +======================================================================== + Apache Commons IO Copyright 2002-2020 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (https://www.apache.org/). + ======================================================================== Commons-lang NOTICE - ======================================================================== +======================================================================== + Apache Commons Lang Copyright 2001-2011 The Apache Software Foundation @@ -1880,7 +1993,8 @@ The Apache Software Foundation (http://www.apache.org/). Commons-lang3 NOTICE - ======================================================================== +======================================================================== + Apache Commons Lang Copyright 2001-2018 The Apache Software Foundation @@ -1891,7 +2005,8 @@ The Apache Software Foundation (http://www.apache.org/). Commons-logging NOTICE - ======================================================================== +======================================================================== + Apache Commons Logging Copyright 2003-2014 The Apache Software Foundation @@ -1903,7 +2018,8 @@ The Apache Software Foundation (http://www.apache.org/). Commons-math3 NOTICE - ======================================================================== +======================================================================== + Apache Commons Math Copyright 2001-2015 The Apache Software Foundation @@ -1919,48 +2035,20 @@ Copyright 2010-2012 CS Systèmes d'Information Commons-text NOTICE - ======================================================================== +======================================================================== + Apache Commons Text Copyright 2014-2018 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -======================================================================== - - Compress-lzf NOTICE - - ======================================================================== -# Compress LZF - -This library contains efficient implementation of LZF compression format, -as well as additional helper classes that build on JDK-provided gzip (deflat) -codec. - -## Licensing - -Library is licensed under Apache License 2.0, as per accompanying LICENSE file. - -## Credit - -Library has been written by Tatu Saloranta (tatu.saloranta@iki.fi). -It was started at Ning, inc., as an official Open Source process used by -platform backend, but after initial versions has been developed outside of -Ning by supporting community. - -Other contributors include: - -* Jon Hartlaub (first versions of streaming reader/writer; unit tests) -* Cedrik Lime: parallel LZF implementation - -Various community members have contributed bug reports, and suggested minor -fixes; these can be found from file "VERSION.txt" in SCM. ======================================================================== opencypher NOTICE - ======================================================================== +======================================================================== Copyright (c) Neo4j Sweden AB (http://neo4j.com) @@ -1990,8 +2078,6 @@ cassandra NOTICE ======================================================================== - - Apache Cassandra Copyright 2009-2022 The Apache Software Foundation @@ -2003,21 +2089,6 @@ Copyright 2005-2008 The Android Open Source Project This product includes software developed as part of The Android Open Source Project (http://source.android.com). -======================================================================== - -concurrentlinkedhashmap NOTICE - -======================================================================== - - -ConcurrentLinkedHashMap -Copyright 2008, Ben Manes -Copyright 2010, Google Inc. - -Some alternate data structures provided by JSR-166e -from http://gee.cs.oswego.edu/dl/concurrency-interest/. -Written by Doug Lea and released as Public Domain. - ======================================================================== @@ -2025,7 +2096,6 @@ Groovy NOTICE ======================================================================== - Apache Groovy Copyright 2003-2022 The Apache Software Foundation @@ -2040,13 +2110,13 @@ The Java source file src/main/java/org/apache/groovy/util/concurrent/ConcurrentR is from https://github.com/hazelcast/hazelcast and the following notice applies: Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved. + ======================================================================== hppc NOTICE ======================================================================== - ACKNOWLEDGEMENT =============== @@ -2060,14 +2130,12 @@ HPPC borrowed code, ideas or both from: (Apache license) - ======================================================================== Arthas NOTICE ======================================================================== - Arthas Copyright 2018 Alibaba Group @@ -2081,7 +2149,6 @@ The greys-anatomy Project Please visit Github for more information: * https://github.com/oldmanpushcart/greys-anatomy - ------------------------------------------------------------------------------- This product contains a modified portion of 'Apache Commons Lang': * LICENSE: @@ -2096,3 +2163,678 @@ This product contains a modified portion of 'Apache Commons Net': * HOMEPAGE: * https://commons.apache.org/proper/commons-net/ + +======================================================================== + +grpc NOTICE + +======================================================================== + +Copyright 2014 The gRPC Authors + +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. + +----------------------------------------------------------------------- + +This product contains a modified portion of 'OkHttp', an open source +HTTP & SPDY client for Android and Java applications, which can be obtained +at: + + * LICENSE: + * okhttp/third_party/okhttp/LICENSE (Apache License 2.0) + * HOMEPAGE: + * https://github.com/square/okhttp + * LOCATION_IN_GRPC: + * okhttp/third_party/okhttp + +This product contains a modified portion of 'Envoy', an open source +cloud-native high-performance edge/middle/service proxy, which can be +obtained at: + + * LICENSE: + * xds/third_party/envoy/LICENSE (Apache License 2.0) + * NOTICE: + * xds/third_party/envoy/NOTICE + * HOMEPAGE: + * https://www.envoyproxy.io + * LOCATION_IN_GRPC: + * xds/third_party/envoy + +This product contains a modified portion of 'protoc-gen-validate (PGV)', +an open source protoc plugin to generate polyglot message validators, +which can be obtained at: + + * LICENSE: + * xds/third_party/protoc-gen-validate/LICENSE (Apache License 2.0) + * NOTICE: + * xds/third_party/protoc-gen-validate/NOTICE + * HOMEPAGE: + * https://github.com/envoyproxy/protoc-gen-validate + * LOCATION_IN_GRPC: + * xds/third_party/protoc-gen-validate + +This product contains a modified portion of 'udpa', +an open source universal data plane API, which can be obtained at: + + * LICENSE: + * xds/third_party/udpa/LICENSE (Apache License 2.0) + * HOMEPAGE: + * https://github.com/cncf/udpa + * LOCATION_IN_GRPC: + * xds/third_party/udpa + +======================================================================== + +jackson-core NOTICE + +======================================================================== + +# Jackson JSON processor + +Jackson is a high-performance, Free/Open Source JSON processing library. +It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has +been in development since 2007. +It is currently developed by a community of developers. + +## Copyright + +Copyright 2007-, Tatu Saloranta (tatu.saloranta@iki.fi) + +## Licensing + +Jackson 2.x core and extension components are licensed under Apache License 2.0 +To find the details that apply to this artifact see the accompanying LICENSE file. + +## Credits + +A list of contributors may be found from CREDITS(-2.x) file, which is included +in some artifacts (usually source distributions); but is always available +from the source code management (SCM) system project uses. + +## FastDoubleParser + +jackson-core bundles a shaded copy of FastDoubleParser . +That code is available under an MIT license +under the following copyright. + +Copyright © 2023 Werner Randelshofer, Switzerland. MIT License. + +See FastDoubleParser-NOTICE for details of other source code included in FastDoubleParser +and the licenses and copyrights that apply to that code. + + +======================================================================== + +jackson-datatype NOTICE + +======================================================================== + +# Jackson JSON processor + +Jackson is a high-performance, Free/Open Source JSON processing library. +It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has +been in development since 2007. +It is currently developed by a community of developers. + +## Copyright + +Copyright 2007-, Tatu Saloranta (tatu.saloranta@iki.fi) + +## Licensing + +Jackson 2.x core and extension components are licensed under Apache License 2.0 +To find the details that apply to this artifact see the accompanying LICENSE file. + +## Credits + +A list of contributors may be found from CREDITS(-2.x) file, which is included +in some artifacts (usually source distributions); but is always available +from the source code management (SCM) system project uses. + +## FastDoubleParser + +jackson-core bundles a shaded copy of FastDoubleParser . +That code is available under an MIT license +under the following copyright. + +Copyright © 2023 Werner Randelshofer, Switzerland. MIT License. + +See FastDoubleParser-NOTICE for details of other source code included in FastDoubleParser +and the licenses and copyrights that apply to that code. + + +======================================================================== + +jackson-jakarta-rs-json-provider NOTICE + +======================================================================== + +# Jackson JSON processor + +Jackson is a high-performance, Free/Open Source JSON processing library. +It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has +been in development since 2007. +It is currently developed by a community of developers, as well as supported +commercially by FasterXML.com. + +## Licensing + +Jackson core and extension components may be licensed under different licenses. +To find the details that apply to this artifact see the accompanying LICENSE file. +For more information, including possible other licensing options, contact +FasterXML.com (http://fasterxml.com). + +## Credits + +A list of contributors may be found from CREDITS file, which is included +in some artifacts (usually source distributions); but is always available +from the source code management (SCM) system project uses. + + +======================================================================== + +jakarta.xml.bind-api NOTICE + +======================================================================== + +# Notices for Jakarta XML Binding + +This content is produced and maintained by the Jakarta XML Binding +project. + +* Project home: https://projects.eclipse.org/projects/ee4j.jaxb + +## Trademarks + +Jakarta XML Binding 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 +* https://github.com/eclipse-ee4j/jaxb-tck + +## Third-party Content + +This project leverages the following third party content. + +Apache River (3.0.0) + +* License: Apache-2.0 AND BSD-3-Clause + +ASM 7 (n/a) + +* License: BSD-3-Clause +* Project: https://asm.ow2.io/ +* Source: + https://repository.ow2.org/nexus/#nexus-search;gav~org.ow2.asm~asm-commons~~~~kw,versionexpand + +normalize.css (3.0.2) + +* License: MIT + +## 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. + + +======================================================================== + +jcommander NOTICE + +======================================================================== + +JCommander Copyright Notices +============================ + +Copyright 2010 Cedric Beust + + +======================================================================== + +jflex NOTICE + +======================================================================== + +JFlex - Copying, Warranty & License + +Copyright (c) Gerwin Klein, Steve Rowe, Régis Décamps, Google LLC. +All rights reserved. + + +======================================================================== + +junit NOTICE + +======================================================================== + + =================================================================================== + == Notices and attributions required by libraries that the project depends on == + =================================================================================== + + The JUnit depends on Java Hamcrest (http://hamcrest.org/JavaHamcrest/). + + +======================================================================== + +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 + + +======================================================================== + +okhttp NOTICE + +======================================================================== + +Note that PublicSuffixDatabase.gz is compiled from The Public Suffix List: +https://publicsuffix.org/list/public_suffix_list.dat + +It is subject to the terms of the Mozilla Public License, v. 2.0: +https://mozilla.org/MPL/2.0/ + + +======================================================================== + +lucene NOTICE + +======================================================================== + +Apache Lucene +Copyright 2001-2022 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +Includes software from other Apache Software Foundation projects, +including, but not limited to: + - Apache Jakarta Regexp + - Apache Commons + - Apache Xerces + +ICU4J, (under analysis/icu) is licensed under an MIT styles license +and Copyright (c) 1995-2008 International Business Machines Corporation and others + +Some data files (under analysis/icu/src/data) are derived from Unicode data such +as the Unicode Character Database. See http://unicode.org/copyright.html for more +details. + +Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is +BSD-licensed, created by Anders Møller. See http://www.brics.dk/automaton/ + +The levenshtein automata tables (under core/src/java/org/apache/lucene/util/automaton) were +automatically generated with the moman/finenight FSA library, created by +Jean-Philippe Barrette-LaPierre. This library is available under an MIT license, +see http://sites.google.com/site/rrettesite/moman and +http://bitbucket.org/jpbarrette/moman/overview/ + +The class org.apache.lucene.util.WeakIdentityMap was derived from +the Apache CXF project and is Apache License 2.0. + +The class org.apache.lucene.util.compress.LZ4 is a Java rewrite of the LZ4 +compression library (https://github.com/lz4/lz4/tree/dev/lib) that is licensed +under the 2-clause BSD license. +(https://opensource.org/licenses/bsd-license.php) + +The Google Code Prettify is Apache License 2.0. +See http://code.google.com/p/google-code-prettify/ + +This product includes code (JaspellTernarySearchTrie) from Java Spelling Checkin +g Package (jaspell): http://jaspell.sourceforge.net/ +License: The BSD License (http://www.opensource.org/licenses/bsd-license.php) + +The snowball stemmers in + analysis/common/src/java/net/sf/snowball +were developed by Martin Porter and Richard Boulton. +The snowball stopword lists in + analysis/common/src/resources/org/apache/lucene/analysis/snowball +were developed by Martin Porter and Richard Boulton. +The full snowball package is available from + https://snowballstem.org/ + +The KStem stemmer in + analysis/common/src/org/apache/lucene/analysis/en +was developed by Bob Krovetz and Sergio Guzman-Lara (CIIR-UMass Amherst) +under the BSD-license. + +The Arabic,Persian,Romanian,Bulgarian, Hindi and Bengali analyzers (common) come with a default +stopword list that is BSD-licensed created by Jacques Savoy. These files reside in: +analysis/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/fa/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/ro/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/bg/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/hi/stopwords.txt, +analysis/common/src/resources/org/apache/lucene/analysis/bn/stopwords.txt +See http://members.unine.ch/jacques.savoy/clef/index.html. + +The German,Spanish,Finnish,French,Hungarian,Italian,Portuguese,Russian and Swedish light stemmers +(common) are based on BSD-licensed reference implementations created by Jacques Savoy and +Ljiljana Dolamic. These files reside in: +analysis/common/src/java/org/apache/lucene/analysis/de/GermanLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/de/GermanMinimalStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/es/SpanishLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fi/FinnishLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchMinimalStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/hu/HungarianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/it/ItalianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLightStemmer.java +analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishLightStemmer.java + +The Stempel analyzer (stempel) includes BSD-licensed software developed +by the Egothor project http://egothor.sf.net/, created by Leo Galambos, Martin Kvapil, +and Edmond Nolan. + +The Polish analyzer (stempel) comes with a default +stopword list that is BSD-licensed created by the Carrot2 project. The file resides +in stempel/src/resources/org/apache/lucene/analysis/pl/stopwords.txt. +See https://github.com/carrot2/carrot2. + +The SmartChineseAnalyzer source code (smartcn) was +provided by Xiaoping Gao and copyright 2009 by www.imdict.net. + +WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/) +is derived from Unicode data such as the Unicode Character Database. +See http://unicode.org/copyright.html for more details. + +The Morfologik analyzer (morfologik) includes BSD-licensed software +developed by Dawid Weiss and Marcin Miłkowski +(https://github.com/morfologik/morfologik-stemming) and uses +data from the BSD-licensed dictionary of Polish (SGJP, http://sgjp.pl/morfeusz/). + +=========================================================================== +Kuromoji Japanese Morphological Analyzer - Apache Lucene Integration +=========================================================================== + +This software includes a binary and/or source version of data from + + mecab-ipadic-2.7.0-20070801 + +which can be obtained from + + http://atilika.com/releases/mecab-ipadic/mecab-ipadic-2.7.0-20070801.tar.gz + +or + + http://jaist.dl.sourceforge.net/project/mecab/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz + +=========================================================================== +mecab-ipadic-2.7.0-20070801 Notice +=========================================================================== + +Nara Institute of Science and Technology (NAIST), +the copyright holders, disclaims all warranties with regard to this +software, including all implied warranties of merchantability and +fitness, in no event shall NAIST be liable for +any special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether in an +action of contract, negligence or other tortuous action, arising out +of or in connection with the use or performance of this software. + +A large portion of the dictionary entries +originate from ICOT Free Software. The following conditions for ICOT +Free Software applies to the current dictionary as well. + +Each User may also freely distribute the Program, whether in its +original form or modified, to any third party or parties, PROVIDED +that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear +on, or be attached to, the Program, which is distributed substantially +in the same form as set out herein and that such intended +distribution, if actually made, will neither violate or otherwise +contravene any of the laws and regulations of the countries having +jurisdiction over the User or the intended distribution itself. + +NO WARRANTY + +The program was produced on an experimental basis in the course of the +research and development conducted during the project and is provided +to users as so produced on an experimental basis. Accordingly, the +program is provided without any warranty whatsoever, whether express, +implied, statutory or otherwise. The term "warranty" used herein +includes, but is not limited to, any warranty of the quality, +performance, merchantability and fitness for a particular purpose of +the program and the nonexistence of any infringement or violation of +any right of any third party. + +Each user of the program will agree and understand, and be deemed to +have agreed and understood, that there is no warranty whatsoever for +the program and, accordingly, the entire risk arising from or +otherwise connected with the program is assumed by the user. + +Therefore, neither ICOT, the copyright holder, or any other +organization that participated in or was otherwise related to the +development of the program and their respective officials, directors, +officers and other employees shall be held liable for any and all +damages, including, without limitation, general, special, incidental +and consequential damages, arising out of or otherwise in connection +with the use or inability to use the program or any product, material +or result produced or otherwise obtained by using the program, +regardless of whether they have been advised of, or otherwise had +knowledge of, the possibility of such damages at any time during the +project or thereafter. Each user will be deemed to have agreed to the +foregoing by his or her commencement of use of the program. The term +"use" as used herein includes, but is not limited to, the use, +modification, copying and distribution of the program and the +production of secondary products from the program. + +In the case where the program, whether in its original form or +modified, was distributed or delivered to or received by a user from +any person, organization or entity other than ICOT, unless it makes or +grants independently of ICOT any specific warranty to the user in +writing, such person, organization or entity, will also be exempted +from and not be held liable to the user for any such damages as noted +above as far as the program is concerned. + +=========================================================================== +Nori Korean Morphological Analyzer - Apache Lucene Integration +=========================================================================== + +This software includes a binary and/or source version of data from + + mecab-ko-dic-2.1.1-20180720 + +which can be obtained from + + https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.1.1-20180720.tar.gz + + +======================================================================== + +perfmark NOTICE + +======================================================================== + +Copyright 2019 Google 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. + +----------------------------------------------------------------------- + +This product contains a modified portion of 'Catapult', an open source +Trace Event viewer for Chome, Linux, and Android applications, which can +be obtained at: + + * LICENSE: + * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/catapult/LICENSE (New BSD License) + * HOMEPAGE: + * https://github.com/catapult-project/catapult + +This product contains a modified portion of 'Polymer', a library for Web +Components, which can be obtained at: + * LICENSE: + * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/polymer/LICENSE (New BSD License) + * HOMEPAGE: + * https://github.com/Polymer/polymer + + +======================================================================== + +postgres NOTICE + +======================================================================== + +This product contains a modified portion of 'ASM', an open source +Java Bytecode library, which can be obtained at: + + * LICENSE: + * agent/src/main/resources/io/perfmark/agent/third_party/asm/LICENSE (BSD style License) + * HOMEPAGE: + * https://asm.ow2.io/ + + +PostgreSQL Database Management System +(formerly known as Postgres, then as Postgres95) + +Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group + +Portions Copyright (c) 1994, The Regents of the University of California + +======================================================================== + +proto-google-common-protos NOTICE + +======================================================================== + +Copyright 2016, Google Inc. +All rights reserved. + + +======================================================================== + +psjava NOTICE + +======================================================================== + +Copyright (c) 2013 psjava authors + + +======================================================================== + +snappy-java NOTICE + +======================================================================== + +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 contains 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 + +Third-Party Notices and Licenses: + +- Hadoop: Apache Hadoop is used as a dependency + License: Apache License 2.0 + Source/Reference: https://github.com/apache/hadoop/blob/trunk/NOTICE.txt + +======================================================================== + +swagger NOTICE + +======================================================================== + +Swagger Core - ${pom.name} +Copyright (c) 2015. SmartBear Software Inc. +Swagger Core - ${pom.name} is licensed under Apache 2.0 license. +Copy of the Apache 2.0 license can be found in `LICENSE` file. + + +======================================================================== + +zstd-jni NOTICE + +======================================================================== + +Zstd-jni: JNI bindings to Zstd Library + +Copyright (c) 2015-present, Luben Karavelov/ All rights reserved. + + +======================================================================== + +zt-zip NOTICE + +======================================================================== + +Copyright 2012 ZeroTurnaround 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. + +This project includes: + +Apache Commons IO +Copyright 2002-2012 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). diff --git a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-airline.txt similarity index 99% rename from hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt rename to hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-airline.txt index f49a4e16e6..d645695673 100644 --- a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-concurrentlinkedhashmap-lru.txt +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-airline.txt @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -198,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 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 + limitations under the License. diff --git a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt new file mode 100644 index 0000000000..2071b23b0e --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-animal-sniffer-annotations.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-annotations.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-annotations.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-asm.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-asm.txt new file mode 100644 index 0000000000..c71bb7bac5 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-asm.txt @@ -0,0 +1,27 @@ +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-caffeine.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-caffeine.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-caffeine.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-compat-qual.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-compat-qual.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-compat-qual.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-qual.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-qual.txt new file mode 100644 index 0000000000..1e41fbe113 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-checker-qual.txt @@ -0,0 +1,23 @@ +The Checker Framework +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. + diff --git a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-bytes.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-bytes.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-bytes.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-core.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-core.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-queue.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-queue.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-queue.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-threads.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-threads.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-threads.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-wire.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-wire.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-chronicle-wire.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-classgraph.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-classgraph.txt new file mode 100644 index 0000000000..eddec36100 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-classgraph.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Luke Hutchison + +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt deleted file mode 100644 index 07a39d174f..0000000000 --- a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-compress-lzf.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Compress-LZF library 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 \ No newline at end of file diff --git a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-error_prone_annotations.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-failureaccess.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-failureaccess.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-failureaccess.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-api.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-api.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-api.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-context.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-context.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-context.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-core.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-core.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-netty-shaded.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-netty-shaded.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-netty-shaded.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf-lite.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-grpc-protobuf.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gson.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gson.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-gson.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-guava.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-guava.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-guava.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-ikanalyzer.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt new file mode 100644 index 0000000000..8dada3edaf --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-j2objc-annotations.txt @@ -0,0 +1,201 @@ + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-base.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-base.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-base.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-json-provider.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-json-provider.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jakarta-rs-json-provider.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.txt deleted file mode 100644 index 6acf75483f..0000000000 --- a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider-2.12.1.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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.txt deleted file mode 100644 index 6acf75483f..0000000000 --- a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-jaxrs-json-provider.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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jakarta-xmlbind-annotations.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jakarta-xmlbind-annotations.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jackson-module-jakarta-xmlbind-annotations.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.activation.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.activation.txt new file mode 100644 index 0000000000..6e8f6032e7 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.activation.txt @@ -0,0 +1,10 @@ +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.xml.bind-api.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.xml.bind-api.txt new file mode 100644 index 0000000000..6e8f6032e7 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jakarta.xml.bind-api.txt @@ -0,0 +1,10 @@ +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jamm.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jamm.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jamm.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-java-cup-runtime.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-java-cup-runtime.txt new file mode 100644 index 0000000000..3d9fd979ac --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-java-cup-runtime.txt @@ -0,0 +1,8 @@ + +CUP Parser Generator Copyright Notice, License, and Disclaimer +Copyright 1996-2015 by Scott Hudson, Frank Flannery, C. Scott Ananian, Michael Petter + +Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the names of the authors or their employers not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. + +The authors and their employers disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the authors or their employers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. +This is an open source [license](https://opensource.org/license/historical-php/). diff --git a/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcommander.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcommander.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jcommander.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jctools-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jctools-core.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jctools-core.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-junit.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-junit.txt new file mode 100644 index 0000000000..b0476ee93e --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-junit.txt @@ -0,0 +1,86 @@ +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jvm-attach-api.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jvm-attach-api.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-jvm-attach-api.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib-common.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-kotlin-stdlib.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queries.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queries.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queries.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queryparser.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queryparser.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-queryparser.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-sandbox.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-sandbox.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-lucene-sandbox.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-mxdump.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-mxdump.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-mxdump.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-netty-tcnative-boringssl-static.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-netty-tcnative-boringssl-static.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-netty-tcnative-boringssl-static.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okhttp.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okhttp.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okhttp.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okio-jvm.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okio-jvm.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-okio-jvm.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-perfmark-api.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-perfmark-api.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-perfmark-api.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-proto-google-common-protos.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-psjava.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-psjava.txt new file mode 100644 index 0000000000..5acf4c1663 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-psjava.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 psjava authors + +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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-cli.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-cli.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-cli.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-core.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-core.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-core.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-json.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-json.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-json.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-stacktrace.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-stacktrace.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-sjk-stacktrace.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snappy-java.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snappy-java.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-snappy-java.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations-jakarta.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations-jakarta.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-annotations-jakarta.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-core-jakarta.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-core-jakarta.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-core-jakarta.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-integration-jakarta.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-integration-jakarta.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-integration-jakarta.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-jaxrs2-jakarta.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-jaxrs2-jakarta.txt new file mode 100644 index 0000000000..8dada3edaf --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-jaxrs2-jakarta.txt @@ -0,0 +1,201 @@ + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models-jakarta.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models-jakarta.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-swagger-models-jakarta.txt @@ -0,0 +1,202 @@ + + 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/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zstd-jni.txt b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zstd-jni.txt new file mode 100644 index 0000000000..66abb8ae78 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/release-docs/licenses/LICENSE-zstd-jni.txt @@ -0,0 +1,26 @@ +Zstd-jni: JNI bindings to Zstd Library + +Copyright (c) 2015-present, Luben Karavelov/ All rights reserved. + +BSD License + +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 HOLDER 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. From cf9ba8b31009d68bb6ea8952b8f90c96bc37ba5c Mon Sep 17 00:00:00 2001 From: xiaoleizi2016 Date: Fri, 29 Dec 2023 12:04:54 +0800 Subject: [PATCH 45/51] fix(core): task restore interrupt problem on restart server (#2401) * Update StandardTaskScheduler.java --- .../org/apache/hugegraph/task/StandardTaskScheduler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java index 120aeb0d66..99b7e8cb7f 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/StandardTaskScheduler.java @@ -142,6 +142,7 @@ private TaskTransaction tx() { @Override public void restoreTasks() { Id selfServer = this.serverManager().selfNodeId(); + List> taskList = new ArrayList<>(); // Restore 'RESTORING', 'RUNNING' and 'QUEUED' tasks in order. for (TaskStatus status : TaskStatus.PENDING_STATUSES) { String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null; @@ -151,7 +152,7 @@ public void restoreTasks() { iter.hasNext();) { HugeTask task = iter.next(); if (selfServer.equals(task.server())) { - this.restore(task); + taskList.add(task); } } if (page != null) { @@ -159,6 +160,10 @@ public void restoreTasks() { } } while (page != null); } + for (HugeTask task : taskList){ + LOG.info("restore task {}", task); + this.restore(task); + } } private Future restore(HugeTask task) { From 7965aac70dee6c412e29d5fb88acb484ff4c48bc Mon Sep 17 00:00:00 2001 From: Caican Cai <77189278+caicancai@users.noreply.github.com> Date: Thu, 4 Jan 2024 12:50:24 +0800 Subject: [PATCH 46/51] chore: add license link (#2398) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef64f10241..27d5498ef3 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph- ## License -HugeGraph is licensed under Apache 2.0 License. +HugeGraph is licensed under [Apache 2.0 License](LICENSE). ## Contributing From 57cd0e8dd7035e7dd6cb4581c1ed00ee1b2c83f4 Mon Sep 17 00:00:00 2001 From: imbajin Date: Tue, 9 Jan 2024 18:44:08 +0800 Subject: [PATCH 47/51] doc: enhance NOTICE info to keep it clear (#2409) --- .github/workflows/check-dependencies.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/licence-checker.yml | 2 +- NOTICE | 40 +-------- .../hugegraph-dist/release-docs/NOTICE | 87 +------------------ 6 files changed, 8 insertions(+), 127 deletions(-) diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml index 5350d53fe6..e3632f5d38 100644 --- a/.github/workflows/check-dependencies.yml +++ b/.github/workflows/check-dependencies.yml @@ -13,7 +13,7 @@ jobs: dependency-check: runs-on: ubuntu-latest env: - USE_STAGE: 'true' # Whether to include the stage repository. + USE_STAGE: 'false' # Whether to include the stage repository. SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency steps: - name: Checkout source diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5907bffa30..d439c31337 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-20.04 env: - USE_STAGE: 'true' # Whether to include the stage repository. + USE_STAGE: 'false' # Whether to include the stage repository. TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis REPORT_DIR: target/site/jacoco BACKEND: ${{ matrix.BACKEND }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9165bfda94..538eb7f98c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,7 +12,7 @@ on: jobs: analyze: env: - USE_STAGE: 'true' # Whether to include the stage repository. + USE_STAGE: 'false' # Whether to include the stage repository. name: Analyze runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/licence-checker.yml b/.github/workflows/licence-checker.yml index 2510b44de1..7a8e5dcca1 100644 --- a/.github/workflows/licence-checker.yml +++ b/.github/workflows/licence-checker.yml @@ -11,7 +11,7 @@ jobs: check-license: runs-on: ubuntu-latest env: - USE_STAGE: 'true' # Whether to include the stage repository. + USE_STAGE: 'false' # Whether to include the stage repository. steps: - uses: actions/checkout@v4 diff --git a/NOTICE b/NOTICE index afc5cfee4a..1ca646e9aa 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache HugeGraph(incubating) -Copyright 2022-2023 The Apache Software Foundation +Copyright 2022-2024 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). @@ -13,9 +13,6 @@ This product contains code form the Apache TinkerPop Project: Apache TinkerPop Copyright 2015-2022 The Apache Software Foundation. -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - ------------------------------------------------------------------------ Activiti ------------------------------------------------------------------------ @@ -42,7 +39,7 @@ This product contains code form the JanusGraph Project: ----------------------------------------------------------------------- ============================================================== JanusGraph: Distributed Graph Database - Copyright 2012 and onwards JanusGraph Authors + Copyright 2012 with JanusGraph Authors ============================================================== This product includes software developed by JanusGraph contributors listed @@ -56,36 +53,3 @@ DataStax) and the following individuals: * Marko A. Rodriguez * Stephen Mallette * Pavel Yaskevich - -It also includes software from other open source projects including, but not limited to (check pom.xml for complete listing): - - * Apache Cassandra [https://cassandra.apache.org/] - * Apache Commons [https://commons.apache.org/] - * Apache Groovy [http://groovy-lang.org/] - * Apache HBase [https://hbase.apache.org/] - * Apache Hadoop [https://hadoop.apache.org/] - * Apache Kerby [https://github.com/apache/directory-kerby] - * Apache Log4j [https://logging.apache.org/log4j] - * Apache Lucene [https://lucene.apache.org/] - * Apache Solr [https://lucene.apache.org/solr/] - * Apache TinkerPop [https://tinkerpop.apache.org/] - * Astyanax [https://github.com/Netflix/astyanax] - * DataStax Driver for Apache Cassandra [https://github.com/datastax/java-driver] - * EasyMock [http://easymock.org/] - * Elasticsearch [https://www.elastic.co/] - * Google Cloud Bigtable [https://github.com/googlecloudplatform/cloud-bigtable-client] - * Google Guava [https://github.com/google/guava] - * HPPC [https://labs.carrotsearch.com/hppc.html] - * JUnit [https://www.junit.org/] - * Jackson [https://github.com/FasterXML/jackson] - * Kryo [https://github.com/EsotericSoftware/kryo] - * Metrics [https://metrics.dropwizard.io] - * Mockito [https://site.mockito.org/] - * Noggit [https://github.com/yonik/noggit] - * OpenRDF [http://rdf4j.org/] - * Oracle BerkeleyDB Java Edition [https://www.oracle.com/technetwork/products/berkeleydb/] (see license below) - * Project Lombok [https://projectlombok.org/] - * Reflections8 [https://github.com/aschoerk/reflections8] - * SLF4J [https://www.slf4j.org/] - * Spatial4j [https://github.com/locationtech/spatial4j] - * Vavr [https://www.vavr.io/] diff --git a/hugegraph-server/hugegraph-dist/release-docs/NOTICE b/hugegraph-server/hugegraph-dist/release-docs/NOTICE index 6ed098c83d..281ae2408e 100644 --- a/hugegraph-server/hugegraph-dist/release-docs/NOTICE +++ b/hugegraph-server/hugegraph-dist/release-docs/NOTICE @@ -1,5 +1,5 @@ Apache HugeGraph(incubating) -Copyright 2022-2023 The Apache Software Foundation +Copyright 2022-2024 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). @@ -13,7 +13,7 @@ JanusGraph NOTICE ======================================================================== ============================================================== JanusGraph: Distributed Graph Database - Copyright 2012 and onwards JanusGraph Authors + Copyright 2012 with JanusGraph Authors ============================================================== This product includes software developed by JanusGraph contributors listed @@ -28,40 +28,6 @@ DataStax) and the following individuals: * Stephen Mallette * Pavel Yaskevich -It also includes software from other open source projects including, but not limited to (check pom.xml for complete listing): - - * Apache Cassandra [https://cassandra.apache.org/] - * Apache Commons [https://commons.apache.org/] - * Apache Groovy [http://groovy-lang.org/] - * Apache HBase [https://hbase.apache.org/] - * Apache Hadoop [https://hadoop.apache.org/] - * Apache Kerby [https://github.com/apache/directory-kerby] - * Apache Log4j [https://logging.apache.org/log4j] - * Apache Lucene [https://lucene.apache.org/] - * Apache Solr [https://lucene.apache.org/solr/] - * Apache TinkerPop [https://tinkerpop.apache.org/] - * Astyanax [https://github.com/Netflix/astyanax] - * DataStax Driver for Apache Cassandra [https://github.com/datastax/java-driver] - * EasyMock [http://easymock.org/] - * Elasticsearch [https://www.elastic.co/] - * Google Cloud Bigtable [https://github.com/googlecloudplatform/cloud-bigtable-client] - * Google Guava [https://github.com/google/guava] - * HPPC [https://labs.carrotsearch.com/hppc.html] - * JUnit [https://www.junit.org/] - * Jackson [https://github.com/FasterXML/jackson] - * Kryo [https://github.com/EsotericSoftware/kryo] - * Metrics [https://metrics.dropwizard.io] - * Mockito [https://site.mockito.org/] - * Noggit [https://github.com/yonik/noggit] - * OpenRDF [http://rdf4j.org/] - * Oracle BerkeleyDB Java Edition [https://www.oracle.com/technetwork/products/berkeleydb/] (see license below) - * Project Lombok [https://projectlombok.org/] - * Reflections8 [https://github.com/aschoerk/reflections8] - * SLF4J [https://www.slf4j.org/] - * Spatial4j [https://github.com/locationtech/spatial4j] - * Vavr [https://www.vavr.io/] - - ======================================================================== airline NOTICE @@ -110,9 +76,6 @@ audience-annotations NOTICE 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/). - ======================================================================== asm NOTICE @@ -210,9 +173,6 @@ Apache TinkerPop NOTICE Apache TinkerPop Copyright 2015-2022 The Apache Software Foundation. -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - ------------------------------------------------------------------------ Activiti ------------------------------------------------------------------------ @@ -243,10 +203,6 @@ gremlin-console NOTICE Apache TinkerPop :: Gremlin Console Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-core NOTICE @@ -257,10 +213,6 @@ This product contains code form the JanusGraph Project: Apache TinkerPop :: Gremlin Core Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-driver NOTICE @@ -270,10 +222,6 @@ gremlin-driver NOTICE Apache TinkerPop :: Gremlin Driver Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-groovy NOTICE @@ -283,10 +231,6 @@ gremlin-groovy NOTICE Apache TinkerPop :: Gremlin Groovy Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-server NOTICE @@ -296,10 +240,6 @@ gremlin-server NOTICE Apache TinkerPop :: Gremlin Server Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-shaded NOTICE @@ -309,10 +249,6 @@ gremlin-shaded NOTICE Apache TinkerPop :: Gremlin Shaded Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ======================================================================== gremlin-test NOTICE @@ -322,9 +258,6 @@ gremlin-test NOTICE Apache TinkerPop :: Gremlin Test Copyright 2013-2021 Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - ======================================================================== @@ -347,8 +280,6 @@ groovy-cli-picocli NOTICE Apache Groovy Copyright 2003-2020 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). ======================================================================== groovy-console NOTICE @@ -357,9 +288,6 @@ groovy-console NOTICE Apache Groovy Copyright 2003-2020 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - ======================================================================== groovy-swing NOTICE @@ -368,8 +296,6 @@ groovy-swing NOTICE Apache Groovy Copyright 2003-2020 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). ======================================================================== groovy-templates NOTICE @@ -378,8 +304,6 @@ groovy-templates NOTICE Apache Groovy Copyright 2003-2020 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). ======================================================================== groovy-xml NOTICE @@ -388,8 +312,6 @@ groovy-xml NOTICE Apache Groovy Copyright 2003-2020 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). ======================================================================== hbase-shaded-endpoint NOTICE @@ -399,11 +321,6 @@ hbase-shaded-endpoint NOTICE hugegraph-hbase-shaded-endpoint Copyright 2007-2021 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/). ==== hugegraph-hbase-shaded-endpoint contained works From de5904a6008707f2175a1796e280b765430e32b9 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:50:24 +0800 Subject: [PATCH 48/51] feat: support docker use the auth when starting (#2403) - allow user to set env for docker to set auth mode - download keystore when package - fix a curl error (also use curl first in `function` download) --------- Co-authored-by: imbajin --- .licenserc.yaml | 1 - LICENSE | 1 - README.md | 26 ++++----- .../hugegraph-dist/docker/README.md | 31 +++++++++-- .../docker/docker-entrypoint.sh | 17 +++++- .../example/docker-compose-cassandra.yml | 2 +- ...ker-entrypoint.sh => download_keystore.sh} | 19 +++++-- .../{dist.sh => download_swagger_ui.sh} | 0 hugegraph-server/hugegraph-dist/pom.xml | 41 +++++++++++++- .../hugegraph-dist/release-docs/LICENSE | 1 - .../src/assembly/static/bin/enable-auth.sh | 54 +++++++++++++++++++ .../assembly/static/bin/gremlin-console.sh | 2 +- .../src/assembly/static/bin/util.sh | 34 ++++++++---- .../src/assembly/static/bin/wait-storage.sh | 54 +++++++++++++------ 14 files changed, 227 insertions(+), 56 deletions(-) rename hugegraph-server/hugegraph-dist/{src/assembly/static/bin/docker-entrypoint.sh => download_keystore.sh} (56%) rename hugegraph-server/hugegraph-dist/{dist.sh => download_swagger_ui.sh} (100%) create mode 100644 hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh diff --git a/.licenserc.yaml b/.licenserc.yaml index 0c7e588bf4..69e9557ec3 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -96,7 +96,6 @@ header: # `header` section is configurations for source codes license header. - '**/util/StringEncoding.java' - 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java' - 'hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java' - - 'hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh' comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`. # license-location-threshold specifies the index threshold where the license header can be located, diff --git a/LICENSE b/LICENSE index cea0b74f43..ad08080e31 100644 --- a/LICENSE +++ b/LICENSE @@ -214,6 +214,5 @@ hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptT hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph -hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java from https://github.com/opencypher/cypher-for-gremlin hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherPlugin.java from https://github.com/opencypher/cypher-for-gremlin diff --git a/README.md b/README.md index 27d5498ef3..9ad381f1fe 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,24 @@ Billions of vertices and edges can be easily stored into and queried from HugeGr ## Quick Start -### 1. Download Way +### 1. Docker Way (Convenient for Test) + +We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner +HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**. +You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. + +> Note: +> +> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). +> +> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development. + +### 2. Download Way Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#32-download-the-binary-tar-tarball) to download the latest release package and start the server. -### 2. Source Building Way +### 3. Source Building Way Visit [Source Building Page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) and follow the steps to build the source code and start the server. @@ -49,17 +61,7 @@ And here are links of other **HugeGraph** component/repositories: 3. [hugegraph-commons](https://github.com/apache/incubator-hugegraph-commons) (**common & rpc** libs) 4. [hugegraph-website](https://github.com/apache/incubator-hugegraph-doc) (**doc & website** code) -### 3. Docker Way (Convenient for Test) - -We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner -HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**. -You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. -> Note: -> -> 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). -> -> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development. ## License diff --git a/hugegraph-server/hugegraph-dist/docker/README.md b/hugegraph-server/hugegraph-dist/docker/README.md index 8b5d2efc55..413ac7fd84 100644 --- a/hugegraph-server/hugegraph-dist/docker/README.md +++ b/hugegraph-server/hugegraph-dist/docker/README.md @@ -4,7 +4,7 @@ > > 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). > -> 2. Recommand to use `release tag`(like `1.0.0`) for the stable version. Use `latest` tag to experience the newest functions in development. +> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development. ## 1. Deploy @@ -12,7 +12,7 @@ We can use docker to quickly start an inner HugeGraph server with RocksDB in bac 1. Using docker run - Use `docker run -itd --name=graph -p 18080:8080 hugegraph/hugegraph` to start hugegraph server. + Use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to start hugegraph server. 2. Using docker compose @@ -35,7 +35,7 @@ If you want to customize the pre-loaded data, please mount the the groovy script 1. Using docker run - Use `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` + Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` to start hugegraph server. 2. Using docker compose @@ -57,4 +57,27 @@ If you want to customize the pre-loaded data, please mount the the groovy script 3. Using start-hugegraph.sh - If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`. \ No newline at end of file + If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`. + +## 3. Enable Authentication + +1. Using docker run + + Use `docker run -itd --name=graph -p 8080:8080 -e AUTH=true -e PASSWORD=123456 hugegraph/hugegraph` to enable the authentication and set the password with `-e AUTH=true -e PASSWORD=123456`. + +2. Using docker compose + + Similarly, we can set the envionment variables in the docker-compose.yaml: + + ```yaml + version: '3' + services: + server: + image: hugegraph/hugegraph + container_name: graph + ports: + - 8080:8080 + environment: + - AUTH=true + - PASSWORD=123456 + ``` \ No newline at end of file diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index cc1f8a1fcf..716dbf8c93 100644 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -16,11 +16,24 @@ # under the License. # - +# wait for storage like cassandra ./bin/wait-storage.sh -./bin/init-store.sh +# set auth if needed +if [[ $AUTH == "true" ]]; then + # set password if use do not provide + if [ -z "$PASSWORD" ]; then + echo "you have not set the password, we will use the default password" + PASSWORD="hugegraph" + fi + echo "init hugegraph with auth" + ./bin/enable-auth.sh + echo "$PASSWORD" | ./bin/init-store.sh +else + ./bin/init-store.sh +fi +# start hugegraph ./bin/start-hugegraph.sh -j "$JAVA_OPTS" -g zgc tail -f /dev/null diff --git a/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml b/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml index 3682b02f92..82b56fd288 100644 --- a/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml +++ b/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml @@ -22,7 +22,7 @@ services: image: hugegraph/hugegraph container_name: cas-graph ports: - - 18080:8080 + - 8080:8080 environment: hugegraph.backend: cassandra hugegraph.serializer: cassandra diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/download_keystore.sh similarity index 56% rename from hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh rename to hugegraph-server/hugegraph-dist/download_keystore.sh index e1fad4a9ff..1f5521e7f3 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/download_keystore.sh @@ -16,9 +16,20 @@ # under the License. # +curl --version >/dev/null 2>&1 || + { + echo 'ERROR: Please install `curl` first if you need `hugegraph-server.keystore`' + exit + } -./bin/wait-storage.sh +# TODO: perhaps it's necessary verify the checksum before reusing the existing keystore +if [[ ! -f hugegraph-server.keystore ]]; then + curl -s -S -L -o hugegraph-server.keystore \ + https://github.com/apache/hugegraph-doc/raw/binary-1.0/dist/server/hugegraph-server.keystore || + { + echo 'ERROR: Download `hugegraph-server.keystore` from GitHub failed, please check your network connection' + exit + } +fi -./bin/init-store.sh - -./bin/start-hugegraph.sh -d false -j "$JAVA_OPTS" -g zgc +echo 'INFO: Successfully download `hugegraph-server.keystore`' diff --git a/hugegraph-server/hugegraph-dist/dist.sh b/hugegraph-server/hugegraph-dist/download_swagger_ui.sh similarity index 100% rename from hugegraph-server/hugegraph-dist/dist.sh rename to hugegraph-server/hugegraph-dist/download_swagger_ui.sh diff --git a/hugegraph-server/hugegraph-dist/pom.xml b/hugegraph-server/hugegraph-dist/pom.xml index 890a3d5171..36d7b05c55 100644 --- a/hugegraph-server/hugegraph-dist/pom.xml +++ b/hugegraph-server/hugegraph-dist/pom.xml @@ -187,7 +187,7 @@ - + @@ -216,6 +216,45 @@ + + download-keystore + prepare-package + + run + + + + + + + + + + + cp-keystore + package + + run + + + + + + + + + + + + + + diff --git a/hugegraph-server/hugegraph-dist/release-docs/LICENSE b/hugegraph-server/hugegraph-dist/release-docs/LICENSE index 807c21ffd8..abb53b9073 100644 --- a/hugegraph-server/hugegraph-dist/release-docs/LICENSE +++ b/hugegraph-server/hugegraph-dist/release-docs/LICENSE @@ -220,7 +220,6 @@ The text of each license is the standard Apache 2.0 license. hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java from https://github.com/JanusGraph/janusgraph -hugegraph-dist/src/assembly/static/bin/wait-storage.sh from https://github.com/JanusGraph/janusgraph hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java from https://github.com/apache/tinkerpop hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java from https://github.com/apache/tinkerpop hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java from https://github.com/apache/tinkerpop diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh new file mode 100644 index 0000000000..924bf58f78 --- /dev/null +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh @@ -0,0 +1,54 @@ +#!/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. +# + +function abs_path() { + SOURCE="${BASH_SOURCE[0]}" + while [[ -h "$SOURCE" ]]; do + DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" + done + cd -P "$(dirname "$SOURCE")" && pwd +} + +BIN=$(abs_path) +TOP="$(cd "${BIN}"/../ && pwd)" +CONF="$TOP/conf" + +GREMLIN_SERVER_CONF="gremlin-server.yaml" +REST_SERVER_CONF="rest-server.properties" +GRAPH_CONF="hugegraph.properties" + +# make a backup +BAK_CONF="$TOP/conf-bak" +mkdir -p "$BAK_CONF" +cp "${CONF}/${GREMLIN_SERVER_CONF}" "${BAK_CONF}/${GREMLIN_SERVER_CONF}.bak" +cp "${CONF}/${REST_SERVER_CONF}" "${BAK_CONF}/${REST_SERVER_CONF}.bak" +cp "${CONF}/graphs/${GRAPH_CONF}" "${BAK_CONF}/${GRAPH_CONF}.bak" + + +sed -i -e '$a\authentication: {' \ + -e '$a\ authenticator: org.apache.hugegraph.auth.StandardAuthenticator,' \ + -e '$a\ authenticationHandler: org.apache.hugegraph.auth.WsAndHttpBasicAuthHandler,' \ + -e '$a\ config: {tokens: conf/rest-server.properties}' \ + -e '$a\}' ${CONF}/${GREMLIN_SERVER_CONF} + +sed -i -e '$a\auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator' \ + -e '$a\auth.graph_store=hugegraph' ${CONF}/${REST_SERVER_CONF} + +sed -i 's/gremlin.graph=org.apache.hugegraph.HugeFactory/gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy/g' ${CONF}/graphs/${GRAPH_CONF} diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh index edcdc0c403..06668c6b29 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/gremlin-console.sh @@ -109,7 +109,7 @@ if [ -z "${HADOOP_GREMLIN_LIBS:-}" ]; then fi if [ -z "${JAVA_OPTIONS:-}" ]; then - JAVA_OPTIONS="-Dtinkerpop.ext=$EXT -Dlog4j.configurationFile=conf/log4j2.xml -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL -javaagent:$LIB/jamm-0.3.0.jar" + JAVA_OPTIONS="-Dtinkerpop.ext=$EXT -Dlog4j.configurationFile=conf/log4j2.xml -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL -javaagent:$LIB/jamm-0.3.2.jar" fi if [ "$PROFILING_ENABLED" = true ]; then diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh index fa3f94a215..47d18e9954 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh @@ -17,10 +17,10 @@ # function command_available() { local cmd=$1 - if [ "$(command -v "$cmd" >/dev/null 2>&1)" ]; then - return 1 - else + if [[ -x "$(command -v "$cmd")" ]]; then return 0 + else + return 1 fi } @@ -131,6 +131,7 @@ function wait_for_startup() { local stop_s=$((now_s + timeout_s)) local status + local error_file_name="startup_error.txt" echo -n "Connecting to $server_name ($server_url)" while [ "$now_s" -le $stop_s ]; do @@ -141,16 +142,22 @@ function wait_for_startup() { return 1 fi - status=$(curl -I -s -k -w "%{http_code}" -o /dev/null "$server_url") + status=$(curl -I -sS -k -w "%{http_code}" -o /dev/null "$server_url" 2> "$error_file_name") if [[ $status -eq 200 || $status -eq 401 ]]; then echo "OK" echo "Started [pid $pid]" + if [ -e "$error_file_name" ]; then + rm "$error_file_name" + fi return 0 fi sleep 2 now_s=$(date '+%s') done + echo "" + cat "$error_file_name" + rm "$error_file_name" echo "The operation timed out(${timeout_s}s) when attempting to connect to $server_url" >&2 return 1 } @@ -267,15 +274,20 @@ function get_ip() { function download() { local path=$1 - local link_url=$2 - - if command_available "wget"; then + local download_url=$2 + if command_available "curl"; then + if [ ! -d "$path" ]; then + mkdir -p "$path" || { + echo "Failed to create directory: $path" + exit 1 + } + fi + curl -L "${download_url}" -o "${path}/$(basename "${download_url}")" + elif command_available "wget"; then wget --help | grep -q '\--show-progress' && progress_opt="-q --show-progress" || progress_opt="" - wget "${link_url}" -P "${path}" $progress_opt - elif command_available "curl"; then - curl "${link_url}" -o "${path}"/"${link_url}" + wget "${download_url}" -P "${path}" $progress_opt else - echo "Required wget or curl but they are unavailable" + echo "Required curl or wget but they are unavailable" exit 1 fi } diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh index bdadeab234..0fcefe4a04 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh @@ -1,18 +1,19 @@ #!/bin/bash # -# Copyright 2023 JanusGraph Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with this +# work for additional information regarding copyright ownership. The ASF +# licenses this file to You under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. # function abs_path() { @@ -33,24 +34,43 @@ DETECT_STORAGE="$TOP/scripts/detect-storage.groovy" . "$BIN"/util.sh + +function key_exists { + local key=$1 + local file_name=$2 + grep -q -E "^\s*${key}\s*=\.*" ${file_name} +} + +function update_key { + local key=$1 + local val=$2 + local file_name=$3 + sed -ri "s#^(\s*${key}\s*=).*#\\1${val}#" ${file_name} +} + +function add_key { + local key=$1 + local val=$2 + local file_name=$3 + echo "${key}=${val}" >> ${file_name} +} + # apply config from env while IFS=' ' read -r envvar_key envvar_val; do - if [[ "${envvar_key}" =~ hugegraph\. ]] && [[ ! -z ${envvar_val} ]]; then + if [[ "${envvar_key}" =~ hugegraph\. ]] && [[ -n ${envvar_val} ]]; then envvar_key=${envvar_key#"hugegraph."} - if grep -q -E "^\s*${envvar_key}\s*=\.*" ${GRAPH_CONF}; then - sed -ri "s#^(\s*${envvar_key}\s*=).*#\\1${envvar_val}#" ${GRAPH_CONF} + if key_exists ${envvar_key} ${GRAPH_CONF}; then + update_key ${envvar_key} ${envvar_val} ${GRAPH_CONF} else - echo "${envvar_key}=${envvar_val}" >> ${GRAPH_CONF} + add_key ${envvar_key} ${envvar_val} ${GRAPH_CONF} fi - else - continue fi done < <(env | sort -r | awk -F= '{ st = index($0, "="); print $1 " " substr($0, st+1) }') # wait for storage if env | grep '^hugegraph\.' > /dev/null; then - if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then + if [ -n "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \ - "until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done" + "until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"Hugegraph server are waiting for storage backend...\"; sleep 5; done" fi fi From 1dd0580d3053b7c82e5b5858705a81f25977f407 Mon Sep 17 00:00:00 2001 From: Z-HUANT <55943045+Z-HUANT@users.noreply.github.com> Date: Wed, 17 Jan 2024 20:56:25 +0800 Subject: [PATCH 49/51] fix(server): reinitialize the progress to set up graph auth friendly (#2411) --- .../src/main/java/org/apache/hugegraph/cmd/InitStore.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java index a18ae63330..eabca7fd6f 100644 --- a/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java +++ b/hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java @@ -101,6 +101,11 @@ private static HugeGraph initGraph(String configPath) throws Exception { LOG.info("Skip init-store due to the backend store of '{}' " + "had been initialized", graph.name()); backendStoreInfo.checkVersion(); + /* + * Init the required information for creating the admin account + * (when switch from non-auth mode to auth mode) + */ + graph.initSystemInfo(); } else { initBackend(graph); } From b980df86977bb1702a99933558fdce989256c274 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:48:41 +0800 Subject: [PATCH 50/51] fix(chore): remove zgc in dockerfile for ARM env (#2421) * remove zgc * Apply suggestions from code review Co-authored-by: imbajin * add comment for hugegraph-server.sh * fix enable-auth.sh * init store in entrypoint * use flag file to skip re-init * delete tar.gz * simply dockerfile * mvn optimize * simply dockerfile * add init log in docker --------- Co-authored-by: imbajin --- hugegraph-server/Dockerfile | 19 ++++++------ .../docker/docker-entrypoint.sh | 31 ++++++++++++------- .../src/assembly/static/bin/enable-auth.sh | 26 +++++++++------- .../assembly/static/bin/hugegraph-server.sh | 1 + .../src/assembly/static/bin/util.sh | 3 ++ 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 45a725786d..8eef58c5f7 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -23,13 +23,13 @@ COPY . /pkg WORKDIR /pkg ARG MAVEN_ARGS -RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l && rm ./hugegraph-server/*.tar.gz # 2nd stage: runtime env +# Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 FROM openjdk:11-slim -# TODO: get the version from the pom.xml -ENV version=1.2.0 -COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-$version/ /hugegraph-server + +COPY --from=build /pkg/hugegraph-server/apache-hugegraph-incubating-*/ /hugegraph-server/ LABEL maintainer="HugeGraph Docker Maintainers " # TODO: use g1gc or zgc as default @@ -39,7 +39,7 @@ ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:Max #COPY . /hugegraph/hugegraph-server WORKDIR /hugegraph-server/ -# 1. Install environment +# 1. Install environment and init HugeGraph Sever RUN set -x \ && apt-get -q update \ && apt-get -q install -y --no-install-recommends --no-install-suggests \ @@ -48,15 +48,14 @@ RUN set -x \ curl \ lsof \ vim \ + cron \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# 2. Init HugeGraph Sever -RUN set -e \ + && rm -rf /var/lib/apt/lists/* \ + && service cron start \ && pwd && cd /hugegraph-server/ \ && sed -i "s/^restserver.url.*$/restserver.url=http:\/\/0.0.0.0:8080/g" ./conf/rest-server.properties -# 3. Init docker script +# 2. Init docker script COPY hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts COPY hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts COPY hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh . diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index 716dbf8c93..aa503f3566 100644 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -16,24 +16,31 @@ # under the License. # -# wait for storage like cassandra -./bin/wait-storage.sh +# create a folder to save the docker-related file +DOCKER_FOLDER='./docker' +mkdir -p $DOCKER_FOLDER -# set auth if needed -if [[ $AUTH == "true" ]]; then - # set password if use do not provide +INIT_FLAG_FILE="init_complete" + +if [ ! -f "${DOCKER_FOLDER}/${INIT_FLAG_FILE}" ]; then + # wait for storage backend + ./bin/wait-storage.sh if [ -z "$PASSWORD" ]; then - echo "you have not set the password, we will use the default password" - PASSWORD="hugegraph" + echo "init hugegraph with non-auth mode" + ./bin/init-store.sh + else + echo "init hugegraph with auth mode" + ./bin/enable-auth.sh + echo "$PASSWORD" | ./bin/init-store.sh fi - echo "init hugegraph with auth" - ./bin/enable-auth.sh - echo "$PASSWORD" | ./bin/init-store.sh + # create a flag file to avoid re-init when restarting + touch ${DOCKER_FOLDER}/${INIT_FLAG_FILE} else - ./bin/init-store.sh + echo "Hugegraph Initialization already done. Skipping re-init..." fi # start hugegraph -./bin/start-hugegraph.sh -j "$JAVA_OPTS" -g zgc +# remove "-g zgc" now, which is only available on ARM-Mac with java > 13 +./bin/start-hugegraph.sh -j "$JAVA_OPTS" tail -f /dev/null diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh index 924bf58f78..2f975872ca 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/enable-auth.sh @@ -36,19 +36,21 @@ GRAPH_CONF="hugegraph.properties" # make a backup BAK_CONF="$TOP/conf-bak" -mkdir -p "$BAK_CONF" -cp "${CONF}/${GREMLIN_SERVER_CONF}" "${BAK_CONF}/${GREMLIN_SERVER_CONF}.bak" -cp "${CONF}/${REST_SERVER_CONF}" "${BAK_CONF}/${REST_SERVER_CONF}.bak" -cp "${CONF}/graphs/${GRAPH_CONF}" "${BAK_CONF}/${GRAPH_CONF}.bak" +if [ ! -d "$BAK_CONF" ]; then + mkdir -p "$BAK_CONF" + cp "${CONF}/${GREMLIN_SERVER_CONF}" "${BAK_CONF}/${GREMLIN_SERVER_CONF}.bak" + cp "${CONF}/${REST_SERVER_CONF}" "${BAK_CONF}/${REST_SERVER_CONF}.bak" + cp "${CONF}/graphs/${GRAPH_CONF}" "${BAK_CONF}/${GRAPH_CONF}.bak" -sed -i -e '$a\authentication: {' \ - -e '$a\ authenticator: org.apache.hugegraph.auth.StandardAuthenticator,' \ - -e '$a\ authenticationHandler: org.apache.hugegraph.auth.WsAndHttpBasicAuthHandler,' \ - -e '$a\ config: {tokens: conf/rest-server.properties}' \ - -e '$a\}' ${CONF}/${GREMLIN_SERVER_CONF} + sed -i -e '$a\authentication: {' \ + -e '$a\ authenticator: org.apache.hugegraph.auth.StandardAuthenticator,' \ + -e '$a\ authenticationHandler: org.apache.hugegraph.auth.WsAndHttpBasicAuthHandler,' \ + -e '$a\ config: {tokens: conf/rest-server.properties}' \ + -e '$a\}' ${CONF}/${GREMLIN_SERVER_CONF} -sed -i -e '$a\auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator' \ - -e '$a\auth.graph_store=hugegraph' ${CONF}/${REST_SERVER_CONF} + sed -i -e '$a\auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator' \ + -e '$a\auth.graph_store=hugegraph' ${CONF}/${REST_SERVER_CONF} -sed -i 's/gremlin.graph=org.apache.hugegraph.HugeFactory/gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy/g' ${CONF}/graphs/${GRAPH_CONF} + sed -i 's/gremlin.graph=org.apache.hugegraph.HugeFactory/gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy/g' ${CONF}/graphs/${GRAPH_CONF} +fi diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh index a643986833..24b10a8e9d 100644 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh @@ -127,6 +127,7 @@ if [[ $JAVA_VERSION -gt 9 ]]; then fi # Using G1GC as the default garbage collector (Recommended for large memory machines) +# mention: zgc is only available on ARM-Mac with java > 13 case "$GC_OPTION" in g1|G1|g1gc) echo "Using G1GC as the default garbage collector" diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh index 47d18e9954..5f7489e60f 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh @@ -139,6 +139,9 @@ function wait_for_startup() { process_status "$server_name" "$pid" >/dev/null if [ $? -eq 1 ]; then echo "Starting $server_name failed" + if [ -e "$error_file_name" ]; then + rm "$error_file_name" + fi return 1 fi From 1d4532cd62f9b10e2ef8648047107ae0fd5ca808 Mon Sep 17 00:00:00 2001 From: SunnyBoy-WYH <48077841+SunnyBoy-WYH@users.noreply.github.com> Date: Sun, 28 Jan 2024 14:03:38 +0800 Subject: [PATCH 51/51] chore(server): update swagger info for default server profile (#2423) --- .../java/org/apache/hugegraph/api/profile/ProfileAPI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java index c28b4878bf..5ba53792a3 100644 --- a/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java +++ b/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java @@ -34,6 +34,8 @@ import jakarta.ws.rs.core.MediaType; import org.apache.commons.lang3.StringUtils; +import org.apache.hugegraph.config.HugeConfig; +import org.apache.hugegraph.config.ServerOptions; import org.apache.tinkerpop.shaded.jackson.annotation.JsonProperty; import org.glassfish.jersey.model.Parameter.Source; import org.glassfish.jersey.server.model.Parameter; @@ -55,6 +57,7 @@ public class ProfileAPI { private static final String SERVICE = "hugegraph"; private static final String DOC = "https://hugegraph.apache.org/docs/"; private static final String API_DOC = DOC + "clients/"; + private static final String SWAGGER_UI = "/swagger-ui/index.html"; private static String SERVER_PROFILES = null; private static String API_PROFILES = null; @@ -62,7 +65,7 @@ public class ProfileAPI { @GET @Timed @Produces(MediaType.APPLICATION_JSON) - public String getProfile(@Context Application application) { + public String getProfile(@Context HugeConfig conf, @Context Application application) { // May init multi times by multi threads, but no effect on the results if (SERVER_PROFILES != null) { return SERVER_PROFILES; @@ -73,6 +76,7 @@ public String getProfile(@Context Application application) { profiles.put("version", CoreVersion.VERSION.toString()); profiles.put("doc", DOC); profiles.put("api_doc", API_DOC); + profiles.put("swagger_ui", conf.get(ServerOptions.REST_SERVER_URL) + SWAGGER_UI); Set apis = new TreeSet<>(); for (Class clazz : application.getClasses()) { if (!isAnnotatedPathClass(clazz)) {