图计算学习随笔(2)Nebula部署
一、文档
国产图数据库系统,主要开发语言为C++,纯粹的图数据系统,使用内建数据库,图计算需要外接引擎spark,flink等.
- 官网:https://nebula-graph.com.cn/
- GitHub:https://github.com/vesoft-inc/nebula-graph
- 官方文档:https://docs.nebula-graph.com.cn/
二、部署
- 不提供tarball直接部署方式,需要安装rpm包或从源码编译。集群部署详情参考https://docs.nebula-graph.com.cn/2.0.1/4.deployment-and-installation/deploy-nebula-graph-cluster/。
- 包安装
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 Meta服务配置,参考(https://docs.nebula-graph.com.cn/2.0.1/5.configurations-and-logs/1.configurations/2.meta-config/)
Graph服务配置,参考(https://docs.nebula-graph.com.cn/2.0.1/5.configurations-and-logs/1.configurations/3.graph-config/)
Storage服务配置,参考(https://docs.nebula-graph.com.cn/2.0.1/5.configurations-and-logs/1.configurations/4.storage-config/)
- 运行,参考(https://docs.nebula-graph.com.cn/2.0.1/2.quick-start/5.start-stop-service/)
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 许可协议。转载请注明来自 DoraTiger的个人天地!