Closed zealot-shin closed 3 years ago
在nebula-python中,按照如下的方式可以查询nebula中全部的点和边:
meta_client = MetaClient([('192.168.8.16', 45500)]) meta_client.connect() storage_client = StorageClient(meta_client) scan_edge_processor = ScanEdgeProcessor(meta_client)
scan_edge_response_iterator = storage_client.scan_edge(space_name, return_cols, all_cols, limit, start_time, end_time) while scan_edge_response_iterator.has_next(): scan_edge_response = scan_edge_response_iterator.next() if scan_edge_response is None: print("Error occurs while scaning edge") break result = scan_edge_processor.process(space_name, scan_edge_response) for edge_name, edge_rows in result.rows.items(): ... ...
请问,在nebula2-python中,如何调用类似的scan_edge和scan_vertex
api全变了,找不到了。。。
You can see the examples: https://github.com/vesoft-inc/nebula-python/blob/master/example/ScanVertexEdgeExample.py. And the 2.0 data struct result has change, we will provide more example to use the new data struct in the future.
since scan has already been merged, i clone master branch into my local repo, and install nebula2-python by following cmd: python3 setup.py install
but when i use scan as example codes, error occurs:
nebula2\meta\MetaService.py", line 16815, in recv_listSpaces raise x thrift.Thrift.TApplicationException: Method name listSpaces not found
I can see that there is no listSpaces method implemented in nebula2-python. So is it because there are still some other pull requests to be merged to complete scan ?
thrift.Thrift.TApplicationException: Method name listSpaces not found
maybe you not connect to the right meta server address. you can make sure the MetaCache use the meta_ip and meta_port.
@zealot-shin Thanks for your question, if you have any questions, you can reopen it. Now I close it.
在nebula-python中,按照如下的方式可以查询nebula中全部的点和边:
meta_client = MetaClient([('192.168.8.16', 45500)]) meta_client.connect() storage_client = StorageClient(meta_client) scan_edge_processor = ScanEdgeProcessor(meta_client)
scan_edge_response_iterator = storage_client.scan_edge(space_name, return_cols, all_cols, limit, start_time, end_time) while scan_edge_response_iterator.has_next(): scan_edge_response = scan_edge_response_iterator.next() if scan_edge_response is None: print("Error occurs while scaning edge") break result = scan_edge_processor.process(space_name, scan_edge_response) for edge_name, edge_rows in result.rows.items(): ... ...
请问,在nebula2-python中,如何调用类似的scan_edge和scan_vertex
api全变了,找不到了。。。