apache / incubator-hugegraph-computer

HugeGraph Computer - A distributed graph processing system for hugegraph (OLAP)
https://hugegraph.apache.org/docs/quickstart/hugegraph-computer/
Apache License 2.0
42 stars 41 forks source link

[Question] computer的算法调用和HugeGraph Server项目有什么关系? #260

Closed wangyh365 closed 1 year ago

wangyh365 commented 1 year ago

Problem Type (问题类型)

others (please edit later)

Before submit

Environment (环境信息)

Your Question (问题描述)

HugeGraph Server 这个项目里面有个ComputerAPI类,暴露url让用户调用。 然后调用ComputerJob, 然后通过name 到ComputerPool 中找到算法,调用call方法执行。 call 方法里面是构造了如下的hadoop执行命令。 并且附带的注释是等待computer项目完毕。

// TODO: 2022/11/18 wait computer project adapt
private static final String MAIN_COMMAND =
        "%s/bin/hadoop jar hugegraph-computer.jar " +
        "com.baidu.hugegraph.Computer " +
        "-D libjars=./hugegraph-computer-core.jar";

请问这个方式目前能运行computer的算法吗? 还是按照官网的那个非常非常简单的文档 curl "http://localhost:8080/graphs/hugegraph/graph/vertices?page&limit=3" | gunzip 来执行?

coderzc commented 1 year ago

@wangyh365 目前sever里的Computer OLAP算法是在server内运行,只支持一些数据量比较小的图的计算,而 hugegraph computer 是用来处理大规模图计算的,目前只能通过K8S API 来调用算法。

wangyh365 commented 1 year ago

好的,非常感谢。 我再问细致一点,那OLAP调用的jar包命令: hadoop jar hugegraph-computer.jar com.baidu.hugegraph.Computer -D libjars=./hugegraph-computer-core.jar

我看包名还是com.baidu。 那么1.0.0版本的OLAP 调用computer,应该和1.0.0的computer不兼容了吧? OLAP调用的jar包是从哪里打出来的呢?后续还会保留这个入口吗?

coderzc commented 1 year ago

hadoop jar hugegraph-computer.jar com.baidu.hugegraph.Computer -D libjars=./hugegraph-computer-core.jar

这是在哪里看到的?

hugegraph computer 运行可以参考:https://hugegraph.apache.org/docs/quickstart/hugegraph-computer/

wangyh365 commented 1 year ago

HugeGraph Server 项目中: AbstractComputer.java 第59行。 他的入口是ComputerAPI。

期待您对我第二个问题的回复。ComputerAPI这条路是不是行不通的?

wangyh365 commented 1 year ago

怎么没有回复了?

coderzc commented 1 year ago

HugeGraph Server 项目中: AbstractComputer.java 第59行。 他的入口是ComputerAPI。

期待您对我第二个问题的回复。ComputerAPI这条路是不是行不通的?

这应该是之前的基于hadoop老框架已经不再维护了

imbajin commented 1 year ago

@wangyh365 目前sever里的Computer OLAP算法是在server内运行,只支持一些数据量比较小的图的计算,而 hugegraph computer 是用来处理大规模图计算的,目前只能通过K8S API 来调用算法。

这里说的 server 内置的 OLAP 算法是指的 api 模块下新增的一系列相关算法

之前那个旧的 hadoop 方式启动的确似乎 remove/archive 标识归档了 @javeme (确认一下), 应在相关类上标记 @Deprecated 以及清晰注释转向新的 OLAP API 或 computer

wangyh365 commented 1 year ago

好的,非常感谢!

wangyh365 commented 1 year ago

已答疑。