Open forgive2077 opened 2 years ago
排版看起来有点眼花, 从404提示来看应该是 api 就没适配对把 (还是啥意思) 不太清楚为啥有404出现...
然后如果你 server 版本是0.10. 对应的 tools 应该是可以使用的, 麻烦把复现方式具体提供一下
需求:将一个url地址的图迁移到另一个地址,此处两个地址用的都是我自己改的地址,不是http://127.0.0.1:8080 执行命令:bin/hugegraph --url ip:端口① --graph test_graph migrate --target-url ip:端口② --target-graph test_graph 结果:Migrate graph 'hugegraph' from 'http://127.0.0.1:8080' to 'ip:端口②' as 'test_graph' 问题:为何我指定了待迁移的source-url和graph,这条命令执行结果还是去默认的http://127.0.0.1:8080找图
不过这个问题已经解决了,我换了tools-1.5.0, 同样的命令:bin/hugegraph --url ip:端口① --graph test_graph migrate --target-url ip:端口② --target-graph test_graph 结果:Migrate graph 'test_graph ' from 'ip:端口①' to 'ip:端口②' as 'test_graph'
但是新的问题出现了 以下是执行日志和报错:
backup summary: { property key number: 6, vertex label number: 1, edge label number: 1, index label number: 5, vertex number: 3488990, edge number: 5267598, } cost time(s): 110 Graph 'test_graph' start restore in mode 'RESTORING'! Property key restore started Property key restore finished: 6 Vertex label restore started Vertex label restore finished: 1 Edge label restore started Edge label restore finished: 1 Index label restore started Exception in thread "main" class java.lang.IllegalArgumentException: Must provide schema id if in RESTORING mode at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:47) at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:93) at com.baidu.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:198) at com.baidu.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:172) at com.baidu.hugegraph.api.schema.IndexLabelAPI.create(IndexLabelAPI.java:49) at com.baidu.hugegraph.driver.SchemaManager.addIndexLabel(SchemaManager.java:187) at com.baidu.hugegraph.driver.SchemaManager.addIndexLabel(SchemaManager.java:182) at com.baidu.hugegraph.manager.RestoreManager.lambda$restoreIndexLabels$9(RestoreManager.java:237) at com.baidu.hugegraph.manager.BackupRestoreBaseManager.read(BackupRestoreBaseManager.java:186) at com.baidu.hugegraph.manager.RestoreManager.restore(RestoreManager.java:249) at com.baidu.hugegraph.manager.RestoreManager.restoreIndexLabels(RestoreManager.java:242) at com.baidu.hugegraph.manager.RestoreManager.restore(RestoreManager.java:83) at com.baidu.hugegraph.cmd.HugeGraphCommand.execute(HugeGraphCommand.java:233) at com.baidu.hugegraph.cmd.HugeGraphCommand.main(HugeGraphCommand.java:427)
问题:Must provide schema id if in RESTORING mode 我需要在哪里去给它提供schema id ? 我看了文档和命令行,并没有schema id参数位置,要修改源码吗?
时间长了.... 这个可能得看看代码, 你可以搜一下那个类看看. 应该是参数配置哪不对, 一般不用修改源码的
另外日志信息可以用
代码块
的方式圈一下, 这样看起来会清晰不少
好的,谢谢
Problem Type (问题类型)
configs (配置项 / 文档相关)
Before submit
Environment (环境信息)
Your Question (问题描述)
bin/hugegraph --url 自己的ip:端口 --graph 自己的图名称 migrate --target-url 自己的ip:端口 --target-graph 自己的图名称 执行结果: Migrate graph 'hugegraph' from 'http://127.0.0.1:8080' to '自己的ip:端口' as '自己的图名称'
为什么我指定了自己的ip:端口和图,执行命令的时候还是去默认的位置找 在bin/hugegraph 中也修改了全局变量--url和--graph为我自己的,但也没生效
Exception in thread "main" java.lang.RuntimeException: Construct manager failed for class 'class com.baidu.hugegraph.manager.BackupManager' at com.baidu.hugegraph.cmd.HugeGraphCommand.manager(HugeGraphCommand.java:318) at com.baidu.hugegraph.cmd.HugeGraphCommand.execute(HugeGraphCommand.java:172) at com.baidu.hugegraph.cmd.HugeGraphCommand.main(HugeGraphCommand.java:379) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.baidu.hugegraph.cmd.HugeGraphCommand.manager(HugeGraphCommand.java:316) Caused by: null: <!doctype html>
HTTP Status 404 – Not Found
Type Status Report
Message /versions
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.11
at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:100) at com.baidu.hugegraph.rest.RestClient.get(RestClient.java:193) at com.baidu.hugegraph.api.version.VersionAPI.get(VersionAPI.java:41) at com.baidu.hugegraph.driver.VersionManager.getApiVersion(VersionManager.java:45) at com.baidu.hugegraph.driver.HugeClient.checkServerApiVersion(HugeClient.java:122) at com.baidu.hugegraph.driver.HugeClient.initManagers(HugeClient.java:108) at com.baidu.hugegraph.driver.HugeClient.Vertex/Edge example (问题点 / 边数据举例)
No response
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
No response