首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TinkerPop3 > Gremlin >检查是否安装了图形库

TinkerPop3 > Gremlin >检查是否安装了图形库
EN

Stack Overflow用户
提问于 2018-08-07 03:40:50
回答 1查看 331关注 0票数 1

在Gremlin中,我像下面这样安装了NEO4J库

bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin x.y.z

有什么方法可以找出这个库是否已经安装了?

说来话长:

我正在模拟存在一些网络问题的条件,所以在运行这个问题之前,我禁用了网络连接。

剧本:

代码语言:javascript
复制
#!/bin/bash
echo "PING PING PING PING PING"
bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin x.y.z

if [ $? -eq 0 ]
then
  echo "Successfully Successfully Successfully Successfully"
else
  echo "FAILED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi

当网络关闭时的结果

代码语言:javascript
复制
PING PING PING PING PING
Redirecting to 'install org.apache.tinkerpop neo4j-gremlin 3.3.1' (-i will be removed in a future release)
Installing dependency org.apache.tinkerpop neo4j-gremlin 3.3.1
Could not install the dependency: Error grabbing Grapes -- [unresolved dependency: org.apache.tinkerpop#neo4j-gremlin;3.3.1: not found]
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: org.apache.tinkerpop#neo4j-gremlin;3.3.1: not found]
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
    at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:424)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
    at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:571)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
    at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:534)
    at groovy.grape.Grape.resolve(Grape.java:202)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:232)
    at org.apache.tinkerpop.gremlin.groovy.util.DependencyGrabber.copyDependenciesToPath(DependencyGrabber.groovy:110)
    at org.apache.tinkerpop.gremlin.server.util.GremlinServerInstall.main(GremlinServerInstall.java:38)
Successfully Successfully Successfully Successfully

为了检查bash退出代码是否运行良好,我执行了以下操作

代码语言:javascript
复制
cd wrongfolder
if [ $? -eq 0 ]
then
  echo "Successfully Successfully Successfully Successfully"
else
  echo "FAILED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi

输出

代码语言:javascript
复制
PING PING PING PING PING
/install.sh: line 5: cd: wrongfolder: No such file or directory
FAILED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

所以出口码工作得很好,但对Gremlin来说却不起作用

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-07 10:33:38

我只是看了一下密码。加载插件的实用程序似乎并没有产生错误代码,而是只打印错误并正常退出。所以,你所看到的都是意料之中的。

我添加了一个修复程序,用于3.2.10、3.3.4和3.4.0:

https://github.com/apache/tinkerpop/commit/2d315e828149a132ecabf406af91acc3caec064c

我不认为除了解析当前产生的输出之外,没有其他方法来决定成功或失败。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51718499

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档