zhang
1
提问参考模版:
[root@d25987a1dbb1 examples]# ./session_example
scan edge...
-------------------------
E0111 07:33:31.617168 2729 ScanEdgeIter.cpp:43] Scan edge failed, errorcode: -7
+++++++++++++++++++++++++
steam
2
你的查询语句是啥。DESCRIBE EDGE 边的名字看下结果。
zhang
3
查询代码:
int main(int argc, char* argv[]) {
nebula::init(&argc, &argv);
nebula::StorageClient c({"127.0.0.1:9559"});
nebula::ScanEdgeIter scanEdgeIter = c.scanEdgeWithPart("nba",
1,
"like",
std::vector<std::string>{"likeness"},
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;
nebula数据:
(root@nebula) [(none)]> use nba
Execution succeeded (time spent 1266/1712 us)
Tue, 11 Jan 2022 09:05:14 UTC
(root@nebula) [nba]> show edges
+------------+
| Name |
+------------+
| "like" |
| "serve" |
| "teammate" |
+------------+
Got 3 rows (time spent 1128/1813 us)
Tue, 11 Jan 2022 09:05:20 UTC
(root@nebula) [nba]> describe edge like
+------------+---------+-------+---------+---------+
| Field | Type | Null | Default | Comment |
+------------+---------+-------+---------+---------+
| "likeness" | "int64" | "YES" | | |
+------------+---------+-------+---------+---------+
Got 1 rows (time spent 1100/1744 us)
Tue, 11 Jan 2022 09:05:32 UTC
(root@nebula) [nba]>
cpp client的master已经是3.0版本的了,我们不支持新客户端连接旧版本nebula
zhang
6
疑惑! 我之前用的是nebula2.5.0对应的cpp client2.5.0,但是没有遍历边的功能; 现在是clone的cpp client的master分支,用的nebula是2.6.1, 2.6.1不是最新版的nebula么?那我现在要需要使用遍历读取边数据的功能该怎么选版本啊?
遍历的功能会在cpp client以及nebula 3.0中提供
1 个赞