diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java index 040bc7269f..4b7b38e51b 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/NeighborRankAPI.java @@ -42,11 +42,11 @@ import com.baidu.hugegraph.HugeGraph; import com.baidu.hugegraph.api.API; -import com.baidu.hugegraph.api.graph.VertexAPI; import com.baidu.hugegraph.backend.id.Id; import com.baidu.hugegraph.core.GraphManager; import com.baidu.hugegraph.schema.EdgeLabel; import com.baidu.hugegraph.server.RestServer; +import com.baidu.hugegraph.structure.HugeVertex; import com.baidu.hugegraph.traversal.algorithm.NeighborRankTraverser; import com.baidu.hugegraph.type.define.Directions; import com.baidu.hugegraph.util.E; @@ -82,7 +82,7 @@ public String neighborRank(@Context GraphManager manager, "alpha '{}' and capacity '{}'", graph, request.source, request.steps, request.alpha, request.capacity); - Id sourceId = VertexAPI.checkAndParseVertexId(request.source); + Id sourceId = HugeVertex.getIdValue(request.source); HugeGraph g = graph(manager, graph); List steps = steps(g, request); diff --git a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java index 17d6ae35e1..8f6445ffaa 100644 --- a/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java +++ b/hugegraph-api/src/main/java/com/baidu/hugegraph/api/traversers/PersonalRankAPI.java @@ -37,10 +37,10 @@ import com.baidu.hugegraph.HugeGraph; import com.baidu.hugegraph.api.API; -import com.baidu.hugegraph.api.graph.VertexAPI; import com.baidu.hugegraph.backend.id.Id; import com.baidu.hugegraph.core.GraphManager; import com.baidu.hugegraph.server.RestServer; +import com.baidu.hugegraph.structure.HugeVertex; import com.baidu.hugegraph.traversal.algorithm.PersonalRankTraverser; import com.baidu.hugegraph.util.CollectionUtil; import com.baidu.hugegraph.util.E; @@ -87,7 +87,7 @@ public String personalRank(@Context GraphManager manager, graph, request.source, request.label, request.alpha, request.degree, request.maxDepth, request.sorted); - Id sourceId = VertexAPI.checkAndParseVertexId(request.source); + Id sourceId = HugeVertex.getIdValue(request.source); HugeGraph g = graph(manager, graph); PersonalRankTraverser traverser; @@ -140,7 +140,7 @@ private static class RankRequest { @Override public String toString() { - return String.format("RankRequest{source=%s,label=%s,alpha=%s" + + return String.format("RankRequest{source=%s,label=%s,alpha=%s," + "degree=%s,limit=%s,maxDepth=%s," + "withLabel=%s,sorted=%s}", this.source, this.label, this.alpha, diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/NeighborRankTraverser.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/NeighborRankTraverser.java index 0766811d49..5bebb02287 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/NeighborRankTraverser.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/NeighborRankTraverser.java @@ -37,7 +37,6 @@ import com.baidu.hugegraph.type.define.Directions; import com.baidu.hugegraph.util.E; import com.baidu.hugegraph.util.OrderLimitMap; -import com.google.common.collect.ImmutableList; public class NeighborRankTraverser extends HugeTraverser {