首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁Nebula:Installation”︁的源代码
←
Nebula:Installation
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
= Installation = <syntaxhighlight lang="bash"> git clone -b release-3.6 https://github.com/vesoft-inc/nebula-docker-compose.git cd nebula-docker-compose docker-compose up -d </syntaxhighlight> = Get Started = == Connect == <syntaxhighlight lang="bash"> docker ps | grep console docker exec -it c1b6410dba24 sh nebula-console -u root -p password --address=graphd --port=9669 </syntaxhighlight> <pre> / # nebula-console -u root -p password --address=graphd --port=9669 Welcome! (root@nebula) [(none)]> </pre> == Create space == <syntaxhighlight lang="bash"> (root@nebula) [(none)]> SHOW HOSTS; +-------------+------+----------+--------------+----------------------+------------------------+---------+ | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | +-------------+------+----------+--------------+----------------------+------------------------+---------+ | "storaged0" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" | | "storaged1" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" | | "storaged2" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.6.0" | +-------------+------+----------+--------------+----------------------+------------------------+---------+ Got 3 rows (time spent 6.392ms/10.383292ms) (root@nebula) [(none)]> CREATE SPACE basketballplayer(partition_num=15, replica_factor=1, vid_type=fixed_string(30)); Execution succeeded (time spent 11.969ms/12.891291ms) Fri, 13 Oct 2023 02:53:56 UTC (root@nebula) [(none)]> SHOW SPACES; +--------------------+ | Name | +--------------------+ | "basketballplayer" | +--------------------+ Got 1 rows (time spent 3.14ms/5.527791ms) (root@nebula) [(none)]> USE basketballplayer; Execution succeeded (time spent 4.402ms/5.538625ms) Fri, 13 Oct 2023 02:54:56 UTC (root@nebula) [basketballplayer]> SHOW HOSTS; +-------------+------+----------+--------------+----------------------+------------------------+---------+ | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | +-------------+------+----------+--------------+----------------------+------------------------+---------+ | "storaged0" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.6.0" | | "storaged1" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.6.0" | | "storaged2" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.6.0" | +-------------+------+----------+--------------+----------------------+------------------------+---------+ Got 3 rows (time spent 2.566ms/3.501ms) </syntaxhighlight> == Create tags== <syntaxhighlight lang="bash"> CREATE TAG player(name string, age int); CREATE TAG team(name string); CREATE EDGE follow(degree int); CREATE EDGE serve(start_year int, end_year int); show tags; +----------+ | Name | +----------+ | "player" | | "team" | +----------+ Got 2 rows (time spent 7.586ms/12.390458ms) Fri, 13 Oct 2023 02:59:50 UTC (root@nebula) [basketballplayer]> show edges; +----------+ | Name | +----------+ | "follow" | | "serve" | +----------+ Got 2 rows (time spent 2.871ms/4.843209ms) </syntaxhighlight> == Insert Data== <syntaxhighlight lang="bash"> </syntaxhighlight> == Query == <syntaxhighlight lang="bash"> </syntaxhighlight> [[Category:Database]] [[Category:Nebula]]
返回
Nebula:Installation
。