-
nebula 版本:3.0
-
部署方式:单机
-
安装方式:rpm
-
是否为线上版本:n
-
问题的具体描述
物理机上部署新版的nebula3.0和cpp-client3.0和3.0版的nebula-console,在线导入nba数据集,控制台可以正常读取边数据,但是编译StorageClientExample.cpp文件执行后读出边结果为空;编译SessionExample.cpp执行时无法连接graph服务。
另外换了basketballplayer数据集,结果只有部分边的属性,但是没有边数据。
3.0需要添加hosts,否则报错:Zone not enough!,添加方式如下(单机环境不知道这种添加方式对不对,但是可以用),
(root@nebula) [(none)]> :play nba;
Start loading dataset nba...
Error: load dataset failed, an error occurred when executing: CREATE SPACE nba(VID_TYPE=FIXED_STRING(32));USE nba;, [ERROR (-1005)]: Zone not enough!
(root@nebula) [(none)]> add hosts 127.0.0.1:9779;
(root@nebula) [(none)]> :play nba;
(root@nebula) [(none)]> show hosts
+-------------+------+----------+--------------+---------------------+------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+------+----------+--------------+---------------------+------------------------+---------+
| "127.0.0.1" | 9779 | "ONLINE" | 100 | "nba:100" | "nba:100" | "3.0.0" |
+-------------+------+----------+--------------+---------------------+------------------------+---------+
Got 1 rows (time spent 2060/3104 us)
通过console控制台命令可以读取边数据,但是通过StorageClientExample.cpp程序读取为空,如下:
[root@764eb88e07cd examples]# ./session_example
scan edge...
-------------------------
like.likeness|
+++++++++++++++++++++++++
通过SessionExample.cpp程序也无法正常运行,一直就卡着不动,如下:
[root@764eb88e07cd examples]# ./session_example
Current address: 127.0.0.1:9669
于是换了basketballplayer的测试集,控制台可以正常遍历边数据,但是cpp-client结果只能读取部分数据,而且只有属性值,没有边数据,如下:
[root@764eb88e07cd examples]# ./session_example
scan edge...
-------------------------
follow.degree|
95|
95|
80|
80|
90|
80|
90|
90|
+++++++++++++++++++++++++
[root@764eb88e07cd examples]# ./session_example
scan edge...
-------------------------
serve.start_year|serve.end_year|
1997|2016|
2011|2015|
2015|2017|
2017|2019|
2012|2019|
2009|2012|
2014|2019|
2012|2013|
2007|2012|
1994|2000|
+++++++++++++++++++++++++
-------------------------
serve.start_year|serve.end_year|
2000|2007|
2018|2019|
+++++++++++++++++++++++++
cpp client的示例程序的基本参数都没变,看了个帖子说貌似跟partition_num 或者partID这个有关,不知道咋设置,而且client程序关于配置和使用也没有太多的说明。
nebula::ScanEdgeIter scanEdgeIter = c.scanEdgeWithPart("basketballplayer",
1,
"serve",
std::vector<std::string>{},
10,
0,
std::numeric_limits<int64_t>::max(),
"",
true,
true);
std::cout << "scan edge..." << std::endl;
while (scanEdgeIter.hasNext()) {
std::cout << "-------------------------" << std::endl;
nebula::DataSet ds = scanEdgeIter.next();
std::cout << ds << std::endl;
std::cout << "+++++++++++++++++++++++++" << std::endl;
}
return 0;
}