Git Product home page Git Product logo

Comments (5)

dosubot avatar dosubot commented on June 12, 2024 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) 不匹配。

这可能是由以下几个原因导致的:

  1. 方法签名更改StandardHugeGraph 类中的 serverStarted 方法可能不存在您正在使用的参数。可能的情况是您正在使用的库版本中,方法签名已经更改,或者该方法期望的参数类型或数量不同。

  2. 库版本:如果代码片段在库的早期版本中可以正常工作,那么可能是您已经更新到了一个新版本,其中 serverStarted 方法已被修改、弃用或删除。库作者有时会更改 API,这可能导致此类问题。

  3. 使用不正确:也有可能 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

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.

dosubot avatar dosubot commented on June 12, 2024 4

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

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.

VGalaxies avatar VGalaxies commented on June 12, 2024

嗨,@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) 不匹配。

这可能是由以下几个原因导致的:

  1. 方法签名更改StandardHugeGraph 类中的 serverStarted 方法可能不存在您正在使用的参数。可能的情况是您正在使用的库版本中,方法签名已经更改,或者该方法期望的参数类型或数量不同。
  2. 库版本:如果代码片段在库的早期版本中可以正常工作,那么可能是您已经更新到了一个新版本,其中 serverStarted 方法已被修改、弃用或删除。库作者有时会更改 API,这可能导致此类问题。
  3. 使用不正确:也有可能 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

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.

VGalaxies avatar VGalaxies commented on June 12, 2024

@solower fixed in #2473

from incubator-hugegraph.

VGalaxies avatar VGalaxies commented on June 12, 2024

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

About Dosu

In #2370, what are the parameter changes for serverStarted?

from incubator-hugegraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.