Comments (5)
嗨,@solower!很高兴再次看到你的问题。希望你一切都好!
您遇到的错误 "No signature of method: org.apache.hugegraph.StandardHugeGraph.serverStarted() is applicable for argument types: (org.apache.hugegraph.backend.id.IdGenerator$StringId, org.apache.hugegraph.type.define.NodeRole) values: [server-tinkerpop, MASTER]" 表明 graph
对象上调用的 serverStarted
方法不接受您传递的参数。具体来说,方法签名与提供的参数 (IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
不匹配。
这可能是由以下几个原因导致的:
-
方法签名更改:
StandardHugeGraph
类中的serverStarted
方法可能不存在您正在使用的参数。可能的情况是您正在使用的库版本中,方法签名已经更改,或者该方法期望的参数类型或数量不同。 -
库版本:如果代码片段在库的早期版本中可以正常工作,那么可能是您已经更新到了一个新版本,其中
serverStarted
方法已被修改、弃用或删除。库作者有时会更改 API,这可能导致此类问题。 -
使用不正确:也有可能
serverStarted
方法并不是按照脚本中的方式来使用的。这可能是对方法用途或参数的误解。
要解决此问题,您应该:
- 查看文档:查找您正在使用的库版本的
StandardHugeGraph
类的文档。验证serverStarted
方法是否存在以及其正确的签名是什么。 - 查看库更改:如果您最近更新了库,查看更改日志或发布说明中是否有对
serverStarted
方法的重大更改或更新。 - 寻找示例或支持:在官方文档、论坛中寻找使用
serverStarted
方法的示例,或者寻求帮助。有时,库作者或社区可以提供更新的示例或澄清。
没有访问您正在使用的库版本的源代码或文档的权限,这些都是您应该遵循的一般步骤,以解决和排查问题。
在 Apache HugeGraph(incubating) Release 1.2.0 中,StandardHugeGraph
类的 serverStarted
方法的正确签名是:
public void serverStarted(GlobalMasterInfo nodeInfo)
这意味着您需要传递一个 GlobalMasterInfo
类型的参数,而不是 (IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
。您可能需要检查您的代码,确保您正在正确地使用 serverStarted
方法。
参考源码:
Sources
- hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from incubator-hugegraph.
Yes, your analysis is correct. The error you're encountering is due to the change in the method signature of serverStarted
in the StandardHugeGraph
class. As per the pull request #2370, the method signature has been changed from public void serverStarted(GlobalMasterInfo nodeInfo)
to public void serverStarted()
.
This means that the serverStarted
method no longer accepts any parameters. Therefore, the call to serverStarted
in your example.groovy
script should be updated to match this new method signature.
You should change the line:
graph.serverStarted(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
to:
graph.serverStarted()
This should resolve the issue you're encountering. Please try this solution and let me know if you encounter any further issues.
For future reference, when a method's signature is changed, all calls to that method need to be updated to match the new signature. This includes calls in scripts, tests, and any other places where the method is used.
You can find more information about the serverStarted
method and its usage in the StandardHugeGraph.java file and the example.groovy script.
Sources
- hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from incubator-hugegraph.
嗨,@solower!很高兴再次看到你的问题。希望你一切都好!
您遇到的错误 "No signature of method: org.apache.hugegraph.StandardHugeGraph.serverStarted() is applicable for argument types: (org.apache.hugegraph.backend.id.IdGenerator$StringId, org.apache.hugegraph.type.define.NodeRole) values: [server-tinkerpop, MASTER]" 表明
graph
对象上调用的serverStarted
方法不接受您传递的参数。具体来说,方法签名与提供的参数(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
不匹配。这可能是由以下几个原因导致的:
- 方法签名更改:
StandardHugeGraph
类中的serverStarted
方法可能不存在您正在使用的参数。可能的情况是您正在使用的库版本中,方法签名已经更改,或者该方法期望的参数类型或数量不同。- 库版本:如果代码片段在库的早期版本中可以正常工作,那么可能是您已经更新到了一个新版本,其中
serverStarted
方法已被修改、弃用或删除。库作者有时会更改 API,这可能导致此类问题。- 使用不正确:也有可能
serverStarted
方法并不是按照脚本中的方式来使用的。这可能是对方法用途或参数的误解。要解决此问题,您应该:
- 查看文档:查找您正在使用的库版本的
StandardHugeGraph
类的文档。验证serverStarted
方法是否存在以及其正确的签名是什么。- 查看库更改:如果您最近更新了库,查看更改日志或发布说明中是否有对
serverStarted
方法的重大更改或更新。- 寻找示例或支持:在官方文档、论坛中寻找使用
serverStarted
方法的示例,或者寻求帮助。有时,库作者或社区可以提供更新的示例或澄清。没有访问您正在使用的库版本的源代码或文档的权限,这些都是您应该遵循的一般步骤,以解决和排查问题。
在 Apache HugeGraph(incubating) Release 1.2.0 中,
StandardHugeGraph
类的serverStarted
方法的正确签名是:public void serverStarted(GlobalMasterInfo nodeInfo)这意味着您需要传递一个
GlobalMasterInfo
类型的参数,而不是(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
。您可能需要检查您的代码,确保您正在正确地使用serverStarted
方法。参考源码:
Sources
- hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Good catch, this is because there was no corresponding modification to the call to serverStarted
in the example.groovy
script in #2370.
from incubator-hugegraph.
from incubator-hugegraph.
Yes, your analysis is correct. The error you're encountering is due to the change in the method signature of
serverStarted
in theStandardHugeGraph
class. As per the pull request #2370, the method signature has been changed frompublic void serverStarted(GlobalMasterInfo nodeInfo)
topublic void serverStarted()
.This means that the
serverStarted
method no longer accepts any parameters. Therefore, the call toserverStarted
in yourexample.groovy
script should be updated to match this new method signature.You should change the line:
graph.serverStarted(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)to:
graph.serverStarted()
This should resolve the issue you're encountering. Please try this solution and let me know if you encounter any further issues.
For future reference, when a method's signature is changed, all calls to that method need to be updated to match the new signature. This includes calls in scripts, tests, and any other places where the method is used.
You can find more information about the
serverStarted
method and its usage in the StandardHugeGraph.java file and the example.groovy script.Sources
- hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
About Dosu
In #2370, what are the parameter changes for serverStarted
?
from incubator-hugegraph.
Related Issues (20)
- [Question] 通过官方tinkpop的gremlin-go客户端连接GremlinServer,序列化问题如何解决 HOT 3
- [Bug] 换hugegraph-core-1.0.0.jar后,服务正常启动,但访问报“Please wait for the server to initialize” HOT 2
- [Bug(pd-store)] hstore backend api tests failure HOT 5
- [Question] When executing OLTP with a large amount of data, if the vertex ID type is String, an OOM exception will occur HOT 5
- [Bug] server slow log, support loader import & client IP HOT 1
- [Question] oltp时,客户端多线程查询时,报“Interrupted, maybe it is timed out” HOT 2
- [Bug] MissingMethodException in SchemaManager.removeIndexLabel() HOT 5
- [Question] Docker 1.2.0 server 内置 rocksdb 磁盘满了之后未自动清理 HOT 6
- [Summary] integrate new module PD into hugegraph HOT 1
- [Summary] integrate new module Store into hugegraph
- [Summary] integrate new backend Hstore into hugegraph
- hugegraph服务挂了 HOT 6
- [Feature] Migrate the hg-style.xml to.editorconfig HOT 1
- 并发查询时 /gremlin接口返回的结果与预期不符合 HOT 2
- 并发查询时 /gremlin接口返回的结果与预期不符合 HOT 1
- [Question] call rest-api in multi-users env (concurrency) HOT 6
- Optimizing Shortest Path Calculation HOT 6
- [Bug] migrating from version 0.11 to apache release 1.2.0, but start failed HOT 3
- [Summary] Dropping Support for Java 8: Compatibility Breaks Ahead
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-hugegraph.