imbajin commented on code in PR #501: URL: https://github.com/apache/hugegraph-doc/pull/501#discussion_r4113984365
########## content/cn/docs/quickstart/computing/hugegraph-computer.md: ########## @@ -1,241 +1,215 @@ --- -title: "HugeGraph-Computer Quick Start" +title: "HugeGraph-Computer 快速开始" linkTitle: "使用 Computer 进行 OLAP 分析" weight: 2 search_keywords: [HugeGraph Computer, 图计算, OLAP] search_boost: 1.6 --- -## 1 HugeGraph-Computer 概述 +## 1. 组件说明 -[`HugeGraph-Computer`](https://github.com/apache/hugegraph-computer) 是分布式图处理系统 (OLAP). 它是 [Pregel](https://kowshik.github.io/JPregel/pregel_paper.pdf)的一个实现。它可以运行在 Kubernetes(K8s)/Yarn 上。(它侧重可支持百亿~千亿的图数据量下进行图计算, 会使用磁盘进行排序和加速, 这是它和 Vermeer 相对最大的区别之一) +[`HugeGraph-Computer`](https://github.com/apache/hugegraph-computer) 是基于 BSP(Bulk Synchronous Parallel,批量同步并行)模型的 Java 分布式图计算框架,算法按超步迭代运行。它可由 Kubernetes Operator 或 YARN 调度,也可在单机上启动 master 和 worker 进程进行小规模试跑。 -### 特性 +它与同一仓库中的 Vermeer 是两套实现:Computer 使用 Java/BSP 运行时,面向分布式计算;Vermeer 是 Go 实现的内存图计算平台,采用 master-worker 结构。两者共享 HugeGraph 数据源,但部署和任务配置不能互换。 -- 支持分布式 MPP 图计算,集成 HugeGraph 作为图输入输出存储。 -- 算法基于 BSP(Bulk Synchronous Parallel) 模型,通过多次并行迭代进行计算,每一次迭代都是一次超步。 -- 自动内存管理。该框架永远不会出现 OOM(内存不足),因为如果它没有足够的内存来容纳所有数据,它会将一些数据拆分到磁盘。 -- 边的部分或超级节点的消息可以在内存中,所以你永远不会丢失它。 -- 您可以从 HDFS 或 HugeGraph 或任何其他系统加载数据。 -- 您可以将结果输出到 HDFS 或 HugeGraph,或任何其他系统。 -- 易于开发新算法。您只需要像在单个服务器中一样专注于仅顶点处理,而不必担心消息传输和内存存储管理。 +Computer 支持从 HugeGraph 或 HDFS 读取图数据,并可将结果写回 HugeGraph 或 HDFS。运行时可把部分数据溢写到磁盘;能否完成任务仍取决于输入规模、资源和配置,不应把溢写能力理解为不受资源限制。 -## 2 依赖 +## 2. 前置条件与连接 -### 2.1 安装 Java 11 (JDK 11) +构建和运行需要 JDK 11 或更高版本。源码构建还需要 Maven 3.5 或更高版本。PageRank 示例要求一个已启动且包含待计算图数据的 HugeGraph-Server,以及可供 master、worker 访问的 etcd。 -**必须**在 ≥ `Java 11` 的环境上启动 `Computer`,然后自行配置。 +| 服务 | 示例地址或端口 | 用途 | +|------|----------------|------| +| HugeGraph-Server | `http://127.0.0.1:8080` | 读取图数据并写回算法结果;以 `hugegraph.url` 为准。 | +| etcd | `http://127.0.0.1:2379` | BSP 作业协调;以 `bsp.etcd_endpoints` 为准。 | +| Computer master RPC | TCP `8190` | worker 连接 master;发行配置中的端口。 | +| Computer worker 数据传输 | 本地默认由系统分配;K8s Operator 默认 `8099` | worker 之间传输顶点和消息。跨主机时需保证公告地址和端口可达。 | +| MinIO(K8s 清单) | HTTP `9000` | 用于输入分区快照。Computer 1.7.0 清单把 Service 的 `9000` 错映射到 MinIO Console 的 `9090`;启用快照前需将 `targetPort` 改为 `9000`。默认 `snapshot.write=false`、`snapshot.load=false`,不启用快照时无需访问 MinIO。 | +| cert-manager(K8s) | 集群内服务 | Operator 清单使用 `cert-manager.io/v1` 的 `Certificate`、`Issuer` 和 CA 注入功能;部署 Operator 前必须先安装兼容版本。 | +| HDFS | 按集群配置 | 仅当输入或输出配置为 HDFS 时需要。 | -**在往下阅读之前务必执行 `java -version` 命令查看 jdk 版本** +Kubernetes 作业中的 `hugegraph.url` 必须是各计算 Pod 都能访问的地址,不能填仅在个人电脑上可用的 `localhost`。如果启用了 HugeGraph 认证,应在配置中填写用户名和密码,并为 REST 查询使用对应凭据。 -## 3 开始 +更多配置项见[Computer 配置参考](/cn/docs/quickstart/computing/hugegraph-computer-config/)。 -### 3.1 在本地运行 PageRank 算法 +## 3. 获取源码并构建发行包 -> 要使用 HugeGraph-Computer 运行算法,必须装有 Java 11 或更高版本。 -> -> 还需要首先部署 HugeGraph-Server 和 [Etcd](https://etcd.io/docs/v3.5/quickstart/). - -有两种方式可以获取 HugeGraph-Computer: - -- 下载已编译的压缩包 -- 克隆源码编译打包 - -#### 3.1.1 下载已编译的压缩包 - -下载最新版本的 HugeGraph-Computer release 包: +Apache 1.7.0 发行目录提供 Computer 源码包 `apache-hugegraph-computer-incubating-1.7.0-src.tar.gz`,不是单独的预编译 Computer 二进制包。下载时同时取得同目录下的 `.sha512` 和 `.asc` 文件。首次验签前还需取得 Apache 项目 [`KEYS`](https://downloads.apache.org/hugegraph/KEYS) 并导入公钥;应先核对密钥指纹来自 Apache 项目发布渠道,再验证签名。后续版本请从 [Apache HugeGraph 下载目录](https://downloads.apache.org/hugegraph/)选择与运行环境匹配的版本。 ```bash -wget https://downloads.apache.org/hugegraph/${version}/apache-hugegraph-computer-incubating-${version}.tar.gz -tar zxvf apache-hugegraph-computer-incubating-${version}.tar.gz -C hugegraph-computer +curl -fLO https://downloads.apache.org/hugegraph/1.7.0/apache-hugegraph-computer-incubating-1.7.0-src.tar.gz +curl -fLO https://downloads.apache.org/hugegraph/1.7.0/apache-hugegraph-computer-incubating-1.7.0-src.tar.gz.sha512 +curl -fLO https://downloads.apache.org/hugegraph/1.7.0/apache-hugegraph-computer-incubating-1.7.0-src.tar.gz.asc +curl -fLO https://downloads.apache.org/hugegraph/KEYS +shasum -a 512 -c apache-hugegraph-computer-incubating-1.7.0-src.tar.gz.sha512 +gpg --import KEYS +gpg --verify apache-hugegraph-computer-incubating-1.7.0-src.tar.gz.asc apache-hugegraph-computer-incubating-1.7.0-src.tar.gz +tar -xzf apache-hugegraph-computer-incubating-1.7.0-src.tar.gz +cd apache-hugegraph-computer-incubating-1.7.0-src/computer +mvn clean package -DskipTests +tar -xzf target/apache-hugegraph-computer-1.7.0.tar.gz Review Comment: Fixed in ebec0f715. The release example uses a VERSION variable and the -incubating- archive/directory names required by the 1.7.0 source release. Both pages distinguish those release names from the current master build naming, and general source links use master. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
