AWSJupyterNotebook修改了Gremlin设置后不显示图表页
创始人
2024-09-26 01:00:27
0次
  1. 确认您是否已成功配置了Jupyter Notebook并正确连接到您的AWS Neptune数据库。

  2. 在gremlin-console.yaml文件中,找到WebSocket配置,确保端口号为8182,这是Neptune数据库WebSocket默认端口号。

  3. 在Jupyter Notebook中运行以下Python代码来确认WebSocket是否正常连接并返回图形输出:

    %config GremlinClient.host = 'your-neptune-endpoint'
    %config GremlinClient.port = 8182
    %config GremlinClient.message_serializer = 'application/vnd.gremlin-v3.0+json'
    %config GremlinClient.username = 'your-neptune-username'
    %config GremlinClient.password = 'your-neptune-password'
    
    import gremlin_python.driver.protocol as protocl
    import gremlin_python.driver.graph as graph
    from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
    
    remote_conn = DriverRemoteConnection('ws://your-neptune-endpoint:8182/gremlin', 'g')
    g = graph.Graph().traversal().withRemote(remote_conn)
    g.V().count().next()
    remote_conn.close()
    
  4. 如果步骤3返回了正确的图表输出,那么您需要检查以下配置文件并使图表页可见:

    # 找到gremlin-server.yaml文件中的插件配置部分,并取消注释以下代码。这将启用TinkerPop插件,并使图表输出变得可见。
    
    gremlin-server:
      plugins:
        - io.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin
      scriptEngines:
        gremlin-groovy:
          plugins:
            - io.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin
    
    
  5. 重新启动AWS Neptune以使更改生效。 然后再次运行Jupyter Notebook并确认图表页是否可见。

相关内容

热门资讯

前端-session、jwt 目录:   (1)session (2&#x...
linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
关于测试,我发现了哪些新大陆 关于测试 平常也只是听说过一些关于测试的术语,但并没有使用过测试工具。偶然看到编程老师...
前缀和与对数器与二分法 1. 前缀和 假设有一个数组,我们想大量频繁的去访问L到R这个区间的和,...
nodejs:本地安装nvm实... 一、背景-使用不同版本node的原因 vue3+ts、nuxt3版本,node...
JAVA集合知识整理 Java集合知识整理 HashMap相关 HashMap的底层数据结构:jdk1.8之...
无刷直流电机介绍及单片机控制实... 无刷直流电机介绍及单片机控制实例前言基本概念优势与劣势使用寿命基本结构使用单片机控制实例电子调速器&...
fwdiary(2) dp2 1.传纸条  AcWing 275. 传纸条 - AcWing 走两条路,走一条最大的...
常用的DOS命令 常用的DOS命令 DOS(Disk Operating System,磁...
<C++> 类和对象(下) 1.const成员函数将const修饰的“成员函数”称之为const成员函数,cons...