-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add subgraphpaths restful api #43
Conversation
fix #39 Change-Id: I41f82b73cee0ce657b3bcaaf1a68cf3479788fbf
hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/JsonSerializer.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/optimize/HugeTraverser.java
Show resolved
Hide resolved
import com.baidu.hugegraph.util.Log; | ||
import com.codahale.metrics.annotation.Timed; | ||
|
||
@Path("graphs/{graph}/traversers/subgraphpaths") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer use "rays" as API name
MultivaluedMap<Boolean, HugeTraverser.Path> paths, | ||
boolean withCrossPoint) { | ||
try (ByteArrayOutputStream out = new ByteArrayOutputStream(LBUF_SIZE)) { | ||
out.write("{\"loop path\": ".getBytes(API.CHARSET)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loop_path
try (ByteArrayOutputStream out = new ByteArrayOutputStream(LBUF_SIZE)) { | ||
out.write("{\"loop path\": ".getBytes(API.CHARSET)); | ||
this.writePathsList(out, paths.get(true)); | ||
out.write(",\"leaf path\": ".getBytes(API.CHARSET)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaf_path
MultivaluedMap paths = traverser.subGraphPaths(source, dir, edgeLabel, | ||
depth, degree, capacity, | ||
limit); | ||
return manager.serializer(g).writeSubGraphPaths(paths, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer return a list of path
* disable etcd for auth server (apache#42) * refine MetricsAPI test for prometheus exporter (apache#43) * upgrade hugegraph config and white api list (apache#44) * fixed computer-dis api bug (apache#45) * fix rest-server.properties config item k8s.hugegraph_url (apache#46) * fix rocksdb not close after close graph (apache#47)
* disable etcd for auth server (apache#42) * refine MetricsAPI test for prometheus exporter (apache#43) * upgrade hugegraph config and white api list (apache#44) * fix rest-server.properties config item k8s.hugegraph_url (apache#46) * fix rocksdb not close after close graph (apache#47) * support none auth mode for k8s api (apache#50) * feat(api): Support adamic-adar & resource-allocation algorithms (apache#10) (apache#51) * support graph reload and ingore single graph error when start server (apache#55) * support force delete task (apache#56) * update reload api (apache#57) * fix: check neighbors count & null label (apache#54) * fixed prometheus metrics bugs Co-authored-by: zhoney <[email protected]> Co-authored-by: sunwei31 <[email protected]> Co-authored-by: imbajin <[email protected]> Co-authored-by: guoyonggang <[email protected]>
Change-Id: I01e402fc99669f53544279c752f81d886c6ce28f
Change-Id: I01e402fc99669f53544279c752f81d886c6ce28f
Change-Id: I01e402fc99669f53544279c752f81d886c6ce28f
Change-Id: I01e402fc99669f53544279c752f81d886c6ce28f
Change-Id: I3709d96fd2114fa782d6f28f8853b32d65fbd22b
fix #39
Change-Id: I41f82b73cee0ce657b3bcaaf1a68cf3479788fbf