图计算学习随笔(2)Nebula部署
前言
Nebula 部署学习。
一、文档
国产图数据库系统,主要开发语言为 C++,纯粹的图数据系统,使用内建数据库,图计算需要外接引擎 spark,flink 等.
二、部署
-
不提供 tarball 直接部署方式,需要安装 rpm 包或从源码编译(集群部署详情参考)。
-
包安装
1
2
3
4
5
6# 下载
wget https://oss-cdn.nebula-graph.com.cn/package/2.0.1/nebula-graph-2.0.1.ubuntu1804.amd64.deb
wget https://oss-cdn.nebula-graph.com.cn/package/2.0.1/nebula-graph-2.0.1.ubuntu1804.amd64.deb.sha256sum.txt
# 安装 默认安装路径为/usr/local/nebula/
sudo dpkg -i --instdir==<installation_path> <package_name> -
源码安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22# 准备环境 https://docs.nebula-graph.com.cn/2.0.1/4.deployment-and-installation/1.resource-preparations/
sudo apt-get install -y make \
m4 \
git \
wget \
unzip \
xz-utils \
curl \
lsb-core \
build-essential \
libreadline-dev \
ncurses-dev \
cmake \
gettext
# 编译 https://docs.nebula-graph.com.cn/2.0.1/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code/
mkdir build && cd build
cmake -DENABLE_BUILD_STORAGE=on -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/graphDB/nebula -DNEBULA_COMMON_REPO_TAG=v2.0.1 -DNEBULA_STORAGE_REPO_TAG=v2.0.1 ..
make -j{N} # 并行数量N建议为min(CPU core,(Mem)GB/2)
sudo make install-all -
环境配置
-
测试环境服务比例
机器名称 metad 进程数量 storaged 进程数量 graphd 进程数量 A 1 1 1 B - 1 1 C - 1 1
-
-
1
sudo /path/to/nebula/scripts/nebula.service start <metad|graphd|storaged|all>
三、算法
以下算法通过Nebula Algorithm利用 spark 提供,其他需要自行实现。(需学习 nGQL 语法,spark graphX)。
算法名 | 说明 | 应用场景 |
---|---|---|
PageRank | 页面排序 | 网页排序、重点节点挖掘 |
Louvain | 社区发现 | 社团挖掘、层次化聚类 |
KCore | K 核 | 社区发现、金融风控 |
LabelPropagation | 标签传播 | 资讯传播、广告推荐、社区发现 |
ConnectedComponent | 联通分量 | 社区发现、孤岛发现 |
StronglyConnectedComponent | 强联通分量 | 社区发现 |
ShortestPath | 最短路径 | 路径规划、网络规划 |
TriangleCount | 三角形计数 | 网络结构分析 |
BetweennessCentrality | 介数中心性 | 关键节点挖掘,节点影响力计算 |
DegreeStatic | 度统计 | 图结构分析 |
参考
本站点所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 我的个人天地!