zoukankan      html  css  js  c++  java
  • janusgraph-mgmt中的一些操作(转)

    关闭事务

    mgmt = graph.openManagement();
    ids = mgmt.getOpenInstances();
    for(String id : ids){if(!id.contains("(")){mgmt.forceCloseInstance(id)}};
    mgmt.commit();

    查看事务

    mgmt = graph.openManagement();
    mgmt.getOpenInstances();
    mgmt.commit();

    查看所有索引

    mgmt = graph.openManagement();
    mgmt.getGraphIndexes(Vertex.class);
    mgmt.commit();

    查看索引状态

    mgmt = graph.openManagement();
    vlabel = mgmt.getPropertyKey('vlabel');
    byvlabel=mgmt.getGraphIndex('byvlabel');
    status=byvlabel.getIndexStatus(vlabel);

    获取所有节点标签

    mgmt = graph.openManagement();
    mgmt.getVertexLabels()
    mgmt.commit()

    获取所有边的标签

    mgmt = graph.openManagement();
    mgmt.getRelationTypes(EdgeLabel.class)
    mgmt.commit()

    作者:习惯沉淀

    如果文中有误或对本文有不同的见解,欢迎在评论区留言。

    如果觉得文章对你有帮助,请点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!

    扫码关注一线码农的学习见闻与思考。

    回复"大数据","微服务","架构师","面试总结",获取更多学习资源!
  • 相关阅读:
    2020-12
    知识的深度跟知识的广度
    限额类费用报销单N+1原则
    用友实习总结
    NC57,NC63-NC二开经验总结
    union和union all的区别
    2020
    mark_rabbitMQ
    营销之路
    怎么对ORACLE里的CLOB字段进行模糊查询
  • 原文地址:https://www.cnblogs.com/yadongliang/p/14389942.html
Copyright © 2011-2022 走看看